Skip to content

pycensus.census.countries.usa.housing.loader

Downloader / loader for U.S. housing price and rent data, delivered on 2020 census tracts (GEOID, 11 digits).

Sources (all keyless except the Census API key from pycensus.api_keys; raw downloads are cached under <data_dir>/raw/us_housing):

  • Census ACS 5-year (API): 2020-24 (acs5 2024) and 2012-16 (acs5 2016). Native: tract (2020 tracts / 2010 tracts respectively).
  • Census 2000 SF3 (API, 2000/dec/sf3). Native: 2000 tracts. Re-tabulation to 2020 tracts: 2000->2010 with the Census Bureau tract relationship files (weights = 2010 housing units in each overlap), then 2010->2020 with tab20_tract20_tract10_natl (weights = land area of each overlap). Medians / shares are carried over as weighted means (an approximation; the Longitudinal Tract Database is no longer distributed and NHGIS needs an account key, so neither is used).
  • FHFA annual all-transactions House Price Index at tract (2010 tracts) and 5-digit ZIP (experimental), 2000 = 100: fhfa.gov/hpi/download/annual. ZIPs are mapped to tracts with the Census 2020 ZCTA-tract relationship file (area-weighted mean over overlapping ZCTAs).
  • Realtor.com Research ZIP inventory history (econdata.s3-us-west-2.amazonaws.com/Reports/Core): median asking price per square foot of the listings of the last 12 months, converted to listing_price_per_m2 (USD per m2; asking prices, not sale prices) and listing_median_area_m2 (median listed home size, m2), mapped to tracts like the ZIP series above.
  • HUD Small Area Fair Market Rents by ZIP (FY2019 first mandatory year onward available; none older) and HUD county FMRs (FY2019+ found).

Output names (suffix = period): home_value_median, rent_median, rent_burden_median, rent_burdened_share (>=30% of income), owner_share, renter_share, rooms_median, rent_per_room_mean (median gross rent / median rooms), each with _2016 (ACS 2012-16) and _2000; house_price_index_fhfa[_YYYY], house_price_index_fhfa_zip[_YYYY] (2000=100), house_price_cagr_2016_2025_rate; hud_safmr_2br_rent_mean[_FYYYYY] and hud_fmr_2br_county_rent_mean[_FYYYYY]. No Census table has dwelling floor area at tract level, so rent_per_m2 cannot be derived; rent_per_room_mean is the closest size-normalised rent. listing_price_per_m2 is the only per-area price.

load_tract_housing(state_fips, state_abbr, data_dir=None, fhfa_zip=True, hud=True)

One state's 2020 tracts (GEOID) with every housing column listed in the module docstring (NaN where a source has no value).

Parameters:

Name Type Description Default
state_fips str

2-digit state FIPS.

required
state_abbr str

State abbreviation.

required
data_dir Optional[str]

Folder of the raw downloads; None = the pycensus cache.

None
fhfa_zip bool

Add the FHFA ZIP-level house price index.

True
hud bool

Add the HUD fair market rents.

True