The database is built. Here's a summary:
Database: housing_supply.duckdb (19.3 MB)
4 Tables
| Table | Rows | Coverage | Source |
|---|---|---|---|
building_permits_annual |
16,606 | 1980-2024, ~380 MSAs/CBSAs per year | Census BPS |
building_permits_monthly |
124,379 | 2000-2025, monthly by MSA/CBSA | Census BPS |
fhfa_hpi_all_transactions |
83,230 | 1975-2025, 410 metros, quarterly | FHFA HPI |
fhfa_hpi_purchase_only |
13,900 | 1991-2025, 100 largest metros, quarterly (NSA + SA) | FHFA HPI |
2 Pre-built Views
permits_with_hpi_annual- Annual permits joined with annual-average HPI by CBSA codepermits_with_hpi_quarterly- Monthly permits aggregated to quarters, joined to quarterly HPI
Key details
- Building permits columns: units and buildings by type (1-unit, 2-unit, 3-4 unit, 5+), plus valuation in $000s
- HPI columns: All-Transactions index (NSA, base 1995Q1=100) and Purchase-Only index (NSA + SA, base 1991Q1=100)
- Join key:
cbsa_code(5-digit FIPS, works for 2004+ permits data) - Pre-2004 Census data uses old MSA codes that don't directly join to FHFA's CBSA codes
- Raw files are cached in
data/raw/so re-runningbuild_db.pyskips already-downloaded files