{"id":46432,"library":"spm-calculator","title":"SPM Calculator","description":"Calculate SPM (Supplemental Poverty Measure) thresholds for any US geography and year. Version 0.3.1, actively developed on GitHub. Release cadence: irregular.","status":"active","version":"0.3.1","language":"python","source_language":"en","source_url":"https://github.com/PolicyEngine/spm-calculator","tags":["spm","poverty","threshold","us","census"],"install":[{"cmd":"pip install spm-calculator","lang":"bash","label":"Install via pip"}],"dependencies":[{"reason":"Data handling","package":"pandas","optional":false},{"reason":"Numerical operations","package":"numpy","optional":false},{"reason":"Fiscal year handling","package":"fiscalyear","optional":false}],"imports":[{"wrong":"from spm_calculator import calculate_spm_threshold","symbol":"SPMCalculator","correct":"from spm_calculator import SPMCalculator"},{"symbol":"calculate_base_thresholds","correct":"from spm_calculator import calculate_base_thresholds"},{"symbol":"forecast_thresholds","correct":"from spm_calculator import forecast_thresholds"}],"quickstart":{"code":"from spm_calculator import calculate_spm_threshold\n\n# Calculate 2023 SPM threshold for a single person in Alabama\nresult = calculate_spm_threshold(year=2023, state='AL', family_size=1, tenure='renter')\nprint(result)","lang":"python","description":"Compute SPM threshold for a given year, state, family size, and housing tenure."},"warnings":[{"fix":"Update imports and function calls to `calculate_spm_threshold`.","message":"Version 0.3.0 changed function signature from `calculate_spm` to `calculate_spm_threshold`. Old code will raise ImportError.","severity":"breaking","affected_versions":">=0.3.0"},{"fix":"Use `from spm_calculator import load_puf_data` instead.","message":"Direct access to data modules (e.g., `spm_calculator.data.load_puf_data`) is deprecated. Use top-level imports only.","severity":"deprecated","affected_versions":">=0.3.0"},{"fix":"Ensure tenure value matches exactly, including underscores.","message":"Input parameters for tenure must be exactly 'renter', 'owner_with_mortgage', 'owner_no_mortgage', or 'non_owner'. Case-sensitive.","severity":"gotcha","affected_versions":"all"},{"fix":"Use two-letter state codes.","message":"State must be a two-letter USPS abbreviation (e.g., 'AL', 'NY'). Full state names cause KeyError.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"search_vec":"'0.3.1':16 'activ':17 'cadenc':22 'calcul':2,3 'census':28 'develop':18 'geographi':12 'github':20 'irregular':23 'measur':7 'poverti':6,25 'releas':21 'spm':1,4,24 'supplement':5 'threshold':8,26 'us':11,27 'version':15 'year':14","created_at":"2026-06-07T12:59:53.828173+00:00","updated_at":"2026-06-07T12:59:53.828173+00:00","problems":null,"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/PolicyEngine/spm-calculator","github":"https://github.com/PolicyEngine/spm-calculator","docs":null,"changelog":null,"pypi":null,"npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["analytics"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"passing","verified_at":"2026-07-03","last_verified":"2026-07-03","next_check":"2026-08-02","install_tag":null}}