skillfed

spm-calculator

Calculate SPM (Supplemental Poverty Measure) thresholds for any US geography and year

spm-calculator v0.3.1 104.2K downloads/30d#12,759 on PyPI0
Permissive license MIT Active released

What it is and what it does

spm-calculator computes official US Supplemental Poverty Measure thresholds for any supported geography and year. It combines three components: base thresholds (derived from Consumer Expenditure Survey data, varying by housing tenure), an equivalence scale that adjusts for family size and composition using the official Betson formula, and geographic adjustments that account for local housing costs using Census metro tables or ACS median rent data. The package bundles national thresholds and official metro data; for custom geographies like states, counties, and tracts, it fetches current median rents from the Census ACS API.

The package is designed for researchers, policy analysts, and developers who need to calculate poverty thresholds programmatically. It supports nation, state, county, metro area, congressional district, PUMA, and tract-level geographies. Base thresholds are validated against published BLS values, and the implementation follows official Census SPM methodology. Runtime dependencies include pandas and numpy for computation, requests for API calls, and the census and us libraries for geographic data handling.

Use it for:

  • Calculate poverty thresholds for a specific family composition in a metro area to assess eligibility for assistance programs
  • Batch-compute SPM thresholds across multiple counties or states for policy analysis or research
  • Build a web or desktop tool that lets users look up poverty thresholds for their geography and family size
  • Validate or cross-check poverty calculations in survey data or administrative records against official Census methodology
  • Generate historical poverty threshold comparisons across years for trend analysis

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Calculate Supplemental Poverty Measure (SPM) thresholds for US geographies by combining base thresholds, family composition adjustments, and local housing cost data from Census sources.

Yes, if you need to calculate official SPM thresholds programmatically. The package is actively maintained, has low install friction, carries no security vulnerabilities, and implements validated Census methodology. Set CENSUS_API_KEY if you need custom geographies beyond the bundled metro areas. Alpha status reflects ongoing development, not instability—recent commits and active maintenance indicate active use.

Install

spm-calculator on PyPI

pip

pip install spm-calculator

uv

uv add spm-calculator

poetry

poetry add spm-calculator

Installing spm-calculator

Before you install

Low install friction with a pure-Python wheel and six common dependencies (pandas, numpy, requests, census, us, openpyxl). Package is actively maintained with recent commits; status is alpha but in active development.

License in practice

MIT license permits commercial and private use with minimal restrictions; suitable for most projects without licensing concerns.

Quickstart

pip install spm-calculator

from spm_calculator import SPMCalculator

calc = SPMCalculator(year=2024)
threshold = calc.calculate_threshold(
    num_adults=2,
    num_children=2,
    tenure="renter",
    geography_type="metro_area",
    geography_id="35620"
)

Requires CENSUS_API_KEY environment variable for custom geographies (states, counties, districts, tracts); official metro areas work without it.

Verify before relying

  • Whether ACS data fetching handles rate limits or caching for batch operations on many geographies
  • Performance characteristics for tract-level calculations across large datasets
  • Availability and completeness of ACS rent data for all supported geography types

Package facts

License MIT (permissive)
Python support supports the current Python release (>=3.9)
Install friction low — pure-Python wheel
Runtime dependencies 6 — pandas, numpy, requests, census, us, openpyxl
Maintenance actively maintained — 119 days since the last release
Last repo commit
First released
Downloads 104,242/month — #12,759 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: spm_calculator-0.3.1-py3-none-any.whl

Development Status :: 3 - AlphaIntended Audience :: Science/ResearchProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.9Topic :: Scientific/Engineering

Tags

supplemental poverty measure calculatorSPM threshold computationpoverty measure by geographyUS poverty thresholdscensus poverty calculationfamily poverty adjustmenthousing cost poverty measure
poverty-measurementcensus-datapolicy-analysis

More Scientific/Engineering packages