- What is this?
- What scripts are included?
- Where do I find the data?
- How do I use it?
- Other questions?
This repository contains scripts for downloading, slimming, and analyzing school-related data in the U.S. Census Bureau's "Household Pulse Survey." The data from this analysis will be used in a future St. Louis Post-Dispatch story.
-
download.py
- A script for fetching the public-use files (PUFs) from census.gov. Requires you to specify the URLs of the desired PUF files in the text filepuf-urls.txt
. -
slim.py
- A script that reduces the size of the data by removing unneeded columns. -
analyze.py
- A script for calculating household totals and percentages from the survey data.
The Census Bureau has a detailed website for the Pulse survey, including documentation: https://www.census.gov/programs-surveys/household-pulse-survey.html
The scripts in this repo require the use of Python 3.8 or higher, as well as the agate data analysis library.
Use pip install -r requirements3.txt
to install the necessary libraries into your environment (or virtual environment).
After that, just clone this repo and run the scripts in the order described above. They will produce a series of CSVs in the data\analyzed
folder with the final percentages.
Contact St. Louis Post-Dispatch journalist Josh Renaud at jrenaud@post-dispatch.com with questions about this code.
Please contact the U.S. Census Bureau to ask questions about the Household Pulse Survey or its data.