census_getter is a tool to get Census 5-year ACS data using an expression file. The expression file provides information to the program- each row specifies information about which variables should be retrieved and how they should be aggregated. Currently, this tool returns data at the block group level- data at the tract level is apportioned to the block group either by total households or total population, which is also specified in the expresson file.
Please see example_psrc/configs/census_getter_expressions to see how this file is set up. Also see example_psrc/configs/settings.yml for how to specify geographic area and census year. Future enhancements will provide more options for census geographies and census products.
-
Clone ths repository.
-
Install Anaconda Python 2.7. Anaconda Python is required for census_getter.
-
Create and activate an Anaconda environment (basically a Python install just for this project)
- Run 'conda create -n census_getter python=2.7'
- Run 'activate census_getter' (you can re-use the environment on a later date by re-activating it or you can skip this step if you don't want to setup a new Python environment just for census_getter)
-
Get and install other required libraries, which can be found online. Run the following commands on the activated conda Python environment:
- pip install activitysim
- pip install synthpop
-
Run census_getter.
- Navigate to census_getter/example_psrc directory.
- Run
python run_census_getter.py
-
Outputs are located in example_psrc/output.