Skip to content

A set of scripts for downloading, slimming, and analyzing school-related data in the U.S. Census Bureau's "Household Pulse Survey."

Notifications You must be signed in to change notification settings

PostDispatchInteractive/census-pulse-schools

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

census-pulse-schools

What is this?

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.

What scripts are included?

  1. 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 file puf-urls.txt.

  2. slim.py - A script that reduces the size of the data by removing unneeded columns.

  3. analyze.py - A script for calculating household totals and percentages from the survey data.

Where do I find the data?

The Census Bureau has a detailed website for the Pulse survey, including documentation: https://www.census.gov/programs-surveys/household-pulse-survey.html

How do I use it?

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.

Other questions?

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.

About

A set of scripts for downloading, slimming, and analyzing school-related data in the U.S. Census Bureau's "Household Pulse Survey."

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages