-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
prototype for using rawdata to generate tables
- Loading branch information
1 parent
a31dc2b
commit b07a067
Showing
3 changed files
with
207 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
# raw_data_test.py | ||
|
||
import os | ||
import aikif.project as mod_prj | ||
import aikif.dataTools.cls_datatable as mod_dt | ||
import rawdata.generate | ||
import rawdata.content | ||
|
||
def main(): | ||
""" | ||
test for rawdata module to create test files | ||
""" | ||
|
||
|
||
print('Initialising rawdata for AIKIF...') | ||
|
||
# setup project for logging | ||
name = 'rawdata_gen' | ||
type = 'Data' | ||
desc = 'Creates raw data tables for aikif' | ||
desc += '\n Last updated ' + mod_dt.TodayAsString() | ||
fldr = os.getcwd() | ||
p = mod_prj.Project(name, type, desc, fldr) | ||
p.add_detail('source', 'pip install rawdata') | ||
|
||
# create the rawdata | ||
col_names = ['Year', 'name', 'Purchase', 'Location'] | ||
col_types = ['DATE', 'PEOPLE', 'CURRENCY', 'PLACE'] | ||
t = rawdata.generate.TableGenerator(50, col_types, col_names) | ||
|
||
|
||
# save the table (you can save it via rawdata class, but demonstrates other use | ||
test_data = mod_dt.DataTable('random.csv', ',', col_names=col_names) | ||
p.log_table(test_data) | ||
for row in t.tbl: | ||
#print(row) | ||
p.record(test_data, '', row) | ||
p.build_report('test_raw_data.rst', 'rst') | ||
|
||
print(test_data) | ||
|
||
|
||
|
||
|
||
main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
----------------------------------- | ||
rawdata_gen | ||
----------------------------------- | ||
|
||
:: | ||
T:\user\dev\src\python\AIKIF\aikif\.z_prototype | ||
|
||
Creates raw data tables for aikif | ||
Last updated 2015-06-10 23:46:56 | ||
|
||
.. contents:: | ||
|
||
|
||
Overview | ||
=========================================== | ||
|
||
This document contains details on the project : rawdata_gen | ||
|
||
TABLES | ||
=========================================== | ||
|
||
random.csv | ||
------------------------- | ||
|
||
======================== ======================== ======================== ======================== | ||
Year name Purchase Location | ||
======================== ======================== ======================== ======================== | ||
Year name Purchase Location | ||
1986 Annis -$91.10 Mediterranean | ||
1998 Ita +$465.00 Norway | ||
1994 Noel -$314.00 Falkland Islands | ||
1999 Jan -62.10 Faeroe Islands | ||
2001 Brett -$434.10 Aruba | ||
2005 Bailey 307.00 Croatia | ||
1991 York -162.99 Kuwait | ||
2008 Eleanor +$158.00 Pitcairn | ||
2000 Conan 138.00 Azerbaijan | ||
1989 Selene -$216.10 Comoros | ||
1986 Dario -$432.99 Turks And Caicos Islands | ||
1998 Vicky 39.00 Rwanda | ||
1997 Emil $ 119.10 Democratic Republic Of The Congo | ||
1990 Mariah $65.10 Tanzania | ||
1992 Zarifa $ 191.95 Cook Islands | ||
2009 Liana -$101.95 Antigua And Barbuda | ||
2005 Rasha $352.10 Uganda | ||
2012 Quentin 353.50 Caribbean | ||
1991 Eshe -28.95 Central African Republic | ||
2013 Tassos -279.99 Jordan | ||
1991 Appollo $ 342.50 Caucasus | ||
2010 Hestia -$341.00 Iceland | ||
2001 Jillian $ 311.99 West Bank | ||
2002 Emele $133.50 Egypt | ||
2001 Maxim 23.50 United Arab Emirates | ||
1988 Lawrence -177.99 Switzerland | ||
1985 Thea $ 254.00 Samoa | ||
2013 Paulo -$65.50 Guinea | ||
2005 Marianne -441.50 Oman | ||
2005 Iokina -$383.95 Aruba | ||
1989 Feoras -266.99 Belize | ||
2000 Scott -$450.95 Namibia | ||
1995 Kelli 213.00 Portugal | ||
2000 Maribeth -478.95 Western Sahara | ||
1996 Dewey $ 469.99 Laos | ||
1989 Skyler $404.10 Grenada | ||
2004 Marta $139.10 Zimbabwe | ||
2005 Ermin $ 120.10 Democratic Republic Of The Congo | ||
1987 Cecile $ 377.10 Ghana | ||
1992 Polo $ 67.00 Burundi | ||
2000 Jianna $ 311.10 Zambia | ||
1995 Chrissy -$493.99 Saint Vincent And The Grenadines | ||
1995 Kaycee 199.10 Iran | ||
1996 Lyre $80.50 Malaysia | ||
2013 Katina $ 187.10 Cambodia | ||
2000 Kathryn -$177.95 Peru | ||
1999 Olaf -259.10 Georgia | ||
2003 Prudence $ 262.95 Niue | ||
1987 Eilis 134.10 Turks And Caicos Islands | ||
1988 Zelia 90.10 Germany | ||
======================== ======================== ======================== ======================== | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
----------------------------------- | ||
rawdata_gen | ||
----------------------------------- | ||
|
||
:: | ||
T:\user\dev\src\python\AIKIF\aikif\.z_prototype | ||
|
||
Creates raw data tables for aikif | ||
Last updated 2015-06-10 23:47:16 | ||
|
||
.. contents:: | ||
|
||
|
||
Overview | ||
=========================================== | ||
|
||
This document contains details on the project : rawdata_gen | ||
|
||
TABLES | ||
=========================================== | ||
|
||
random.csv | ||
------------------------- | ||
|
||
======================== ======================== ======================== ======================== | ||
Year name Purchase Location | ||
======================== ======================== ======================== ======================== | ||
Year name Purchase Location | ||
1989 Ailish $217.95 Guatemala | ||
2002 Dessa 65.99 Samoa | ||
1985 Paulina $164.99 Malawi | ||
2000 Jacqui -277.00 Austria | ||
2005 Lilli -16.00 New Caledonia | ||
1996 Butterfly +$321.99 People'S Republic Of The Congo | ||
1991 Delores $ 433.00 China | ||
2011 Trinity -230.50 Spain | ||
2013 Stephen -176.99 West Africa | ||
1996 Jariath -$223.00 Central Africa | ||
1995 Barretta -$386.50 Asia | ||
2012 Selena 384.00 Zambia | ||
2007 Bevan $ 248.99 Philippines | ||
1990 Juliana $117.99 Greece | ||
1991 Jessica -$463.99 Australia | ||
2012 Shira -$126.10 Argentina | ||
2007 Esmerelda $381.10 Nepal | ||
1991 Cherie +$336.99 Czech Republic | ||
1991 Sage -$101.99 Denmark | ||
2005 Bambi 205.10 Asia | ||
2004 July 74.99 Morocco | ||
2008 Angelina +$260.50 Monaco | ||
2008 Tavia -$67.50 Micronesia | ||
1993 Oriana $ 417.99 Persian Gulf | ||
2007 Koko $ 477.00 Gabon | ||
1991 Zoan -$65.99 Belarus | ||
1990 Rabia 322.95 Maldives | ||
1992 Reagan 471.50 Sweden | ||
1990 Earlene -406.95 Malta | ||
2004 Aolani -375.99 Trinidad And Tobago | ||
1999 Mitch -$270.99 Gambia | ||
2002 Kumiko -460.95 Uruguay | ||
2002 Wyatt 155.10 Swaziland | ||
1991 Kimmy +$462.10 Senegal | ||
1999 Shelly 484.95 Paraguay | ||
2011 Bart $ 422.50 Guinea | ||
2009 Arne 142.99 Slovenia | ||
1996 Tory +$490.00 Nauru | ||
1992 Seda $463.95 Turkey | ||
1987 Lenora +$487.10 Mali | ||
2003 Tino $469.95 Fiji | ||
1998 Nalo +$334.50 Chad | ||
1986 Picabo 146.99 Mayotte | ||
1987 Alina +$55.99 Southeast Asia | ||
2012 Arnie $485.10 Switzerland | ||
2009 Erwin $152.95 El Salvador | ||
2006 Cade +$21.00 Columbia | ||
2009 Oke 15.00 Saint Pierre And Miquelon | ||
1999 Charisse $ 178.95 Cambodia | ||
2009 Darshan 63.50 Caucasus | ||
======================== ======================== ======================== ======================== | ||
|
||
|