Assignment 15 - CSV dataasets
Due Friday February 23
Program how_many_vacant_housing_units.py
- Examines a user-specified housing dataset and determines the number of vacant housing units for that dataset. That number is the difference of the total number of Housing Units and the total number of Households.
- The data set is stored in web folder:
http://www.cs1112.org/datasets/csv/
.
Housing datasets
- A Housing dataset has a one-line header. The fields in the header are some arrangement of the following.
Female | Housing Units | Population |
Male | Name | Type |
Households | Owner-occupied |
- Housing dataset example: all-va-housing.csv
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
...
- Housing dataset example: city-town-va-housing.csv
Population,Male,Female,Households,Housing Units,Owner-occupied,Name,Type
23585,11434,12151,10001,10587,4567,Winchester,City
11998,5382,6616,3619,3880,1602,Williamsburg,City
...
Sample runs
Enter name of data set: all-va-housing.csv
314205
Enter name of data set: city-town-va-housing.csv
137978
Warning: fopen(/l/cs1112/public_html/defs/htm/181-trailer): Failed to open stream: No such file or directory in /l/cs1112/public_html/defs/php/read.php on line 5
Unable to open file!