Registry / analytics / spm-calculator

spm-calculator

JSON →
library0.3.1pypypi✓ verified 80d ago

Calculate SPM (Supplemental Poverty Measure) thresholds for any US geography and year. Version 0.3.1, actively developed on GitHub. Release cadence: irregular.

pip install spm-calculator
INSTALL
IMPORT
SIG · SPM-CALCULATOR
S
spm-calculator
analyticspythonv0.3.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

SPMCalculator
from spm_calculator import SPMCalculator
from spm_calculator import calculate_spm_threshold
calculate_base_thresholds
from spm_calculator import calculate_base_thresholds
forecast_thresholds
from spm_calculator import forecast_thresholds

Compute SPM threshold for a given year, state, family size, and housing tenure.

from spm_calculator import calculate_spm_threshold # Calculate 2023 SPM threshold for a single person in Alabama result = calculate_spm_threshold(year=2023, state='AL', family_size=1, tenure='renter') print(result)
Debug
Known issues
breakingVersion 0.3.0 changed function signature from `calculate_spm` to `calculate_spm_threshold`. Old code will raise ImportError.
fix
Update imports and function calls to `calculate_spm_threshold`.
affects: >=0.3.0
deprecatedDirect access to data modules (e.g., `spm_calculator.data.load_puf_data`) is deprecated. Use top-level imports only.
fix
Use `from spm_calculator import load_puf_data` instead.
affects: >=0.3.0
gotchaInput parameters for tenure must be exactly 'renter', 'owner_with_mortgage', 'owner_no_mortgage', or 'non_owner'. Case-sensitive.
fix
Ensure tenure value matches exactly, including underscores.
affects: all
gotchaState must be a two-letter USPS abbreviation (e.g., 'AL', 'NY'). Full state names cause KeyError.
fix
Use two-letter state codes.
affects: all
Upgrade
Version history
0.3.1latest on PyPI · released Apr 17, 2026
Audit
Dependencies
pandasrequiredData handling
numpyrequiredNumerical operations
fiscalyearrequiredFiscal year handling
Agent activity
27 hits · last 30 days
node
22
OpenAI (training)
1
Resources
spm-calculator — pip install spm-calculator · libregistry