Class 15, Monday, February 18
CSV Chrestomathics
Make sure what you know — Be sure you know what you know — Know now that you know
Daisy Gatson Bates — Integration Warrior — Medal of Freedom
Look both ways
Agenda
- CSV chrestomathics
Aesthetics
- Be cool
Examples
- Determines a rough estimate of the center of continental USA by making use of CSV dataset continental-usa.csv.
- How should we determine the estimate?
- For a user-specified web source dataset counts the number of rows, where for a user-specied column of interest label, the column value equals a user-specified value key
Two sample program runs
Enter name of dataset: wdii.csv
Enter column of interest: GWBD
Enter column value of interest: No holiday observed
9
Enter name of dataset: wdii.csv
Enter column of interest: When
Enter column value of interest: 3rd Monday in February
37
Datasets de jeur
Zipcode, Town, State, Latitude, Longitude
00210, Portsmouth, NH, 43.005895, -71.013202
00211, Portsmouth, NH, 43.005895, -71.013202
00212, Portsmouth, NH, 43.005895, -71.013202
00213, Portsmouth, NH, 43.005895, -71.013202
00214, Portsmouth, NH, 43.005895, -71.013202
00215, Portsmouth, NH, 43.005895, -71.013202
00501, Holtsville, NY, 40.922326, -72.637078
00544, Holtsville, NY, 40.922326, -72.637078
01001, Agawam, MA, 42.07061, -72.62029
01002, Amherst, MA, 42.377651, -72.50323
01003, Amherst, MA, 42.369562, -72.63599
01004, Amherst, MA, 42.384494, -72.513191
01005, Barre, MA, 42.412094, -72.10443
....
ID, State, GWBD, Comment
AK, Alaska, Presidents' Day, 3rd Monday in February
AL, Alabama, George Washington-Thomas Jefferson Day, 3rd Monday in February
AR, Arkansas, George Washington's Birthday and Daisy Gatson Bates Day, 3rd Monday in February
AZ, Arizona, Lincoln-Washington-President's Day, 3rd Monday in February
CA, California, President's Day, 3rd Monday in February
CO, Colorado, Presidents' Day, 3rd Monday in February
CT, Connecticut, Washington's Birthday, 3rd Monday in February
DE, Delaware, No holiday observed, Non-applicable
FL, Florida, No holiday observed, Non-applicable
GA, Georgia, Washington's Birthday, Day before Christmas
....
Name,Type,Population,Male,Female,Households,Housing Units,Owner-occupied
Accomack,County,38305,18590,19715,15299,19550,11482
Albemarle,County,79236,38002,41234,31876,33720,20991
Alleghany,County,12926,6450,6476,5149,5812,4369
Amelia,County,11400,5622,5778,4240,4609,3474
Amherst,County,31894,15208,16686,11941,12958,9325
Appomattox,County,13705,6671,7034,5322,5828,4315
Arlington,County,189453,95443,94010,86352,90426,37370
Augusta,County,65615,32995,32620,24818,26738,20628
...
To do
- mins_and_maxes.py homework
- how_many_vacancies.py homework
- Review class artifacts
- Review standard documentation for built-in functions.
- Review course documentation for module str.
- Review course documentation for module list.
- Review course documentation for local module url.
- Review standard documentation for module math.
- Review ccourse documentation for module random.
- Epistle on syntax errors and exceptions.
- Epistle on accomplishments.
Lebanon, KS, 66952, 39°48′38″N 98°33′22″W
Where am i