This program processes real county demographics data collected by the CORGIS project.
The program loads county demographics data from a CSV file, converting numeric fields to appropriate data types and validating entries.
The program accepts two command-line arguments: the demographics data file and the operations file.
The program supports various operations specified in the operations file, including filtering data, displaying county information, calculating population totals, and computing percentages of sub-populations.
The program handles malformed entries in both the demographics and operations files, reporting errors and continuing processing.
Load county demographics data from a CSV file. Skip column headers and handle double-quote characters in fields. Validate and convert numeric fields to appropriate data types. Print the number of valid entries loaded and report malformed entries.
Accept two arguments: demographics data file and operations file. Validate the existence and accessibility of these files.
display: Print county information for each entry. filter-state:: Filter entries by state abbreviation. filter::<ge/le>:: Filter entries based on numeric field values. population-total: Calculate the total 2014 population across all entries. population:: Calculate the total sub-population for specified fields. percent:: Calculate the percentage of the sub-population within the total population.
Determine the percentage of the population below the poverty level in counties with specific education or ethnicity percentages. Create operations files to test and verify these calculations.