--- id: spm-calculator version: "0.3.1" license: MIT license_treatment: permissive maintenance: active --- # spm-calculator — Calculate SPM (Supplemental Poverty Measure) thresholds for any US geography and year License: permissive · Maintenance: active · Downloads: 104.2K/mo ## 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 above — 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 pip install spm-calculator uv add spm-calculator 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_current - Install friction: low - Maintenance: active - Downloads: 104.2K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags supplemental poverty measure calculator, SPM threshold computation, poverty measure by geography, US poverty thresholds, census poverty calculation, family poverty adjustment, housing cost poverty measure, poverty-measurement, census-data, policy-analysis [View on SkillFed](https://skillfed.io/packages/spm-calculator) · [View on PyPI](https://pypi.org/project/spm-calculator/)