Hands on materials for 2025 Spatial analysis using geographical Census data class
- Python 3
- Jupyter notebook
- pandas
- geopandas
- matplotlib
Sample pip installation:
pip install notebook pandas geopandas matplotlib
These are not the exercises we are completing today, but are some examples of real-world analyses that these and similar techniques can be used for.
Minnesota Star Tribune, 2021
Sometimes, traditional boundaries like neighborhoods may be too coarse or not comparable enough to each other for the story you are trying to tell.
This analysis took geocoded EMS calls related to suspected drug overdoses and placed each into hexagonal bins generated to show spatial clusters that were more localized than whole neighborhoods.
The hex bins were generated using QGIS's "Create Grid Layer" function and exported as a shapefile. The rest of the analysis was done with geopandas.
These maps show where Gascón and Hochman need to win over voters in the race for L.A. County District Attorney
These maps show where Gascón and Hochman need to win over voters in the race for L.A. County District Attorney
The Los Angeles Times, 2024
This analysis looked at neighborhood level demographic data to understand how people in different neighborhoods voted for the L.A. County District Attorney.
The analysis was done in geopandas and used renters vs homeowners as the main focus.
The Los Angeles Times, 2022
This piece looked at the demographic patterns of the neighborhoods that voted for Los Angeles Mayor Karen Bass versus Rick Caruso. The demographic data compiled here was done by neighborhood by tenure, race and income.
"Census Reporter is an independent project to make it easier for journalists to write stories using information from the U.S. Census bureau. Place profiles and comparison pages provide a friendly interface for navigating data, including visualizations for a more useful first look."
"IPUMS USA collects, preserves and harmonizes U.S. census microdata and provides easy access to this data with enhanced documentation. Data includes decennial censuses from 1790 to 2010 and American Community Surveys (ACS) from 2000 to the present."
International data also available, though it varies considerably by country.
"The National Historical Geographic Information System (NHGIS) provides easy access to summary tables and time series of population, housing, agriculture, and economic data, along with GIS-compatible mapping files, for years from 1790 through the present and for all levels of U.S. census geography, including states, counties, tracts, and blocks."
The amount of historical data available from the NHGIS project, based at the University of Minnesota, is truly staggering. However, using NHGIS data requires more attention to what variables and geographies have changed over time.