Calculate SPM (Supplemental Poverty Measure) thresholds for any US geography and year
Project description
spm-calculator
Calculate Supplemental Poverty Measure (SPM) thresholds for any US geography and year.
Interactive Calculator
Try the SPM Threshold Calculator - A static web app that walks you through calculating your SPM threshold based on your household characteristics.
The calculator runs entirely in your browser with no server required - all data is pre-computed and bundled.
Run Locally
Static React App (recommended):
cd web
npm install
npm run dev
Streamlit App (alternative):
pip install spm-calculator[app]
streamlit run app/streamlit_app.py
Overview
The SPM threshold is calculated as:
threshold = base_threshold[tenure] × equivalence_scale × geoadj
Where:
- base_threshold varies by housing tenure (renter, owner with mortgage, owner without mortgage), calculated from 5-year rolling Consumer Expenditure Survey data
- equivalence_scale adjusts for family composition using the SPM three-parameter scale
- geoadj adjusts for local housing costs based on ACS median rents
Installation
pip install spm-calculator
Quick Start
from spm_calculator import SPMCalculator
# Initialize calculator for a specific year
calc = SPMCalculator(year=2024)
# Get base thresholds by tenure (national, before geographic adjustment)
base = calc.get_base_thresholds()
# {'renter': 39430, 'owner_with_mortgage': 39068, 'owner_without_mortgage': 32586}
# Get GEOADJ for a specific geography
geoadj = calc.get_geoadj("congressional_district", "0612") # CA-12
# 1.24 (24% above national average due to high housing costs)
# Calculate threshold for a specific family in a specific location
threshold = calc.calculate_threshold(
num_adults=2,
num_children=2,
tenure="renter",
geography_type="congressional_district",
geography_id="0612"
)
# ~$48,893 (base $39,430 × equiv_scale 1.0 × geoadj 1.24)
Supported Geographies
nation- National averagestate- 50 states + DCcounty- ~3,200 countiesmetro_area- Metropolitan statistical areascongressional_district- 435 congressional districtspuma- Public Use Microdata Areastract- Census tracts (limited availability)
Data Sources
- Base thresholds: BLS Consumer Expenditure Survey - 5-year rolling FCSUti (Food, Clothing, Shelter, Utilities, telephone, internet)
- Geographic adjustment: ACS 5-Year Estimates - Table B25031 (Median Gross Rent by Bedrooms)
- Methodology: Census SPM Technical Documentation
Methodology
Base Threshold Calculation
Following BLS methodology (updated September 2021):
- Download 5 years of CE Survey PUMD (Public Use Microdata)
- Filter to consumer units with children
- Calculate FCSUti expenditures
- Convert to reference family (2 adults, 2 children) using equivalence scale
- Calculate 83% of median (47th-53rd percentile average) by tenure type
Geographic Adjustment (GEOADJ)
Following Census methodology:
GEOADJ = (local_median_rent / national_median_rent) × 0.492 + 0.508
Where 0.492 is the housing portion of the SPM threshold for renters.
Equivalence Scale
The SPM uses a three-parameter equivalence scale:
- First adult: 1.0
- Additional adults: 0.5 each
- Children: 0.3 each
- Normalized to reference family (2A2C = 1.0)
Validation
Base thresholds are validated against BLS published values:
| Tenure | 2024 BLS | Calculator |
|---|---|---|
| Renter | $39,430 | $39,430 |
| Owner w/ mortgage | $39,068 | $39,068 |
| Owner w/o mortgage | $32,586 | $32,586 |
License
MIT License - see LICENSE for details.
Contributing
Contributions welcome! Please see CONTRIBUTING.md for guidelines.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file spm_calculator-0.1.0.tar.gz.
File metadata
- Download URL: spm_calculator-0.1.0.tar.gz
- Upload date:
- Size: 25.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
539ee27cccec20fd80e25627b8f1d1f7a65663187f79bdd336a873110cfae240
|
|
| MD5 |
15d10c75f3ee841ad173816d0515bb1b
|
|
| BLAKE2b-256 |
38d0f96e42ab45515e491b654e46d59318002a18e5268d3264b26566a71f8c43
|
File details
Details for the file spm_calculator-0.1.0-py3-none-any.whl.
File metadata
- Download URL: spm_calculator-0.1.0-py3-none-any.whl
- Upload date:
- Size: 19.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ef713361aac5bf764d7892be724eb69a99ec61631a75d8904a361b73fbc5b0f7
|
|
| MD5 |
df5d37545709577ed53f53203c05d08b
|
|
| BLAKE2b-256 |
5506596f4a1012984f5011ee8e6e522c0d83ae27eea74cecee42f75892aa6fb5
|