Changes

Jump to navigation Jump to search
==get_ACS.py==
A script called '''get_ACS.py''' automates the retrieval and compiling of results from api.census.gov. It has the year, geographic unit, and dataset in a (user-editable) parameters dictionary and is called with variables as command line parameters. Note that groups of variables are called in the same way as individual variables.  The script is available in: E:\projects\census\ An example command is:
python3 get_ACS.py B06011_001E B06009 B02001
 
The script produces tab-delimited text files (to change to csv, edit line 63) with timestamped filenames.
 
Note: In the script, I rely on the response.json() method of request to handle the "JSON" produced by the API. I never use json.loads or similar. The Census doesn't adhere to any reasonable standards for encoding data.
==Examples and Documentation==

Navigation menu