python-geo-utils
Reusable Python utilities for Census API access, geographic crosswalks, ArcGIS REST downloads, and file management — extracted from working research code.
python-geo-utils is a small collection of single-file Python utilities I built while working on California housing and transportation research projects. Each module solves a recurring pain point in empirical economics workflows: pulling ACS data from the Census API, building geographic crosswalk tables, and downloading data from California state GIS servers.
All modules are self-contained, well-documented, and designed to drop directly into any research project’s scripts/ directory.
Tech: Python, geopandas, pandas, requests
Utilities
| Module | What it does | Download |
|---|---|---|
download_utils.py | Download ZIP archives and individual files with skip-if-exists logic. Safe for idempotent pipelines. | raw |
census_api.py | Fetch ACS 5-year estimates via the Census Bureau Data API. Handles the 50-variable-per-request limit, builds 11-digit GEOIDs, and masks sentinel values (-666666666). | raw |
geo_crosswalk.py | Build area-proportional geographic crosswalk tables targeting 2020 Census tract boundaries: ZCTA→tract, county→tract, and precinct→tract (spatial overlay via geopandas). | raw |
arcgis_rest.py | Paginated GeoJSON downloads from ArcGIS REST feature services (CalFire, CalEPA, DWR, etc.). Handles server page limits automatically. No third-party dependencies. | raw |