Skip to content

Store SPM geographic adjustments instead of thresholds#918

Merged
MaxGhenis merged 1 commit intomainfrom
codex/us-data-stop-materializing-spm-threshold
May 7, 2026
Merged

Store SPM geographic adjustments instead of thresholds#918
MaxGhenis merged 1 commit intomainfrom
codex/us-data-stop-materializing-spm-threshold

Conversation

@MaxGhenis
Copy link
Copy Markdown
Contributor

Summary

  • Stop materializing CPS/local spm_unit_spm_threshold values in us-data.
  • Store spm_unit_geographic_adjustment inputs from CPS SPM_GEOADJ and assigned local/CD geography instead.
  • Remove duplicated SPM threshold/reference-threshold math from us-data now that policyengine-us 1.689.0 owns the threshold formula.
  • Drop legacy spm_unit_spm_threshold inputs from local clone outputs if older source datasets contain them.

Dependency

  • Requires policyengine-us>=1.689.0, which includes spm_unit_geographic_adjustment and the updated SPM threshold formula.

Tests

  • uv run ruff check policyengine_us_data/utils/spm.py policyengine_us_data/calibration/calibration_utils.py policyengine_us_data/calibration/entity_clone.py policyengine_us_data/calibration/publish_local_area.py policyengine_us_data/datasets/cps/cps.py policyengine_us_data/datasets/cps/extended_cps.py policyengine_us_data/datasets/cps/small_enhanced_cps.py tests/unit/test_extended_cps.py tests/unit/calibration/test_spm_thresholds.py tests/unit/calibration/test_entity_clone.py tests/integration/test_chunked_matrix_builder.py tests/integration/support/tiny_stage_3.py tests/integration/test_tiny_stage_3_artifacts.py
  • uv run pytest tests/unit/calibration/test_spm_thresholds.py tests/unit/test_extended_cps.py tests/unit/calibration/test_entity_clone.py tests/integration/test_tiny_stage_3_artifacts.py tests/integration/test_chunked_matrix_builder.py

@MaxGhenis MaxGhenis force-pushed the codex/us-data-stop-materializing-spm-threshold branch from 7e950bb to 6b4c3e4 Compare May 7, 2026 21:32
@MaxGhenis MaxGhenis merged commit 934ec54 into main May 7, 2026
12 checks passed
@MaxGhenis MaxGhenis deleted the codex/us-data-stop-materializing-spm-threshold branch May 7, 2026 22:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant