Skip to content

Regenerate SPI projections from 2023-24 base#414

Merged
MaxGhenis merged 1 commit into
mainfrom
codex/regenerate-spi-projections-393
May 24, 2026
Merged

Regenerate SPI projections from 2023-24 base#414
MaxGhenis merged 1 commit into
mainfrom
codex/regenerate-spi-projections-393

Conversation

@MaxGhenis
Copy link
Copy Markdown
Contributor

Summary

  • refactor SPI income projection generation to start from the same HMRC 2023-24 ODS parser used by target generation
  • regenerate storage/incomes.csv and storage/incomes_projection.csv from the 2024 SPI base through 2029
  • keep aggregate rows in the projection artifact for diagnostics while dropping only the aggregate 12_570_to_inf row from future calibration targets, preserving the real 1_000_000_to_inf top band

Closes #393.

Validation

  • uv run --python 3.13 --frozen python policyengine_uk_data/utils/incomes_projection.py
  • uv run --python 3.13 --frozen ruff format --check policyengine_uk_data/tests/test_income_projection.py policyengine_uk_data/tests/test_property_income_targets.py policyengine_uk_data/targets/sources/hmrc_spi.py policyengine_uk_data/utils/incomes_projection.py
  • uv run --python 3.13 --frozen ruff check policyengine_uk_data/tests/test_income_projection.py policyengine_uk_data/tests/test_property_income_targets.py policyengine_uk_data/targets/sources/hmrc_spi.py policyengine_uk_data/utils/incomes_projection.py
  • uv run --python 3.13 --frozen pytest policyengine_uk_data/tests/test_income_projection.py policyengine_uk_data/tests/test_property_income_targets.py policyengine_uk_data/tests/test_target_registry.py::test_hmrc_spi_targets_exist policyengine_uk_data/tests/test_spi_build.py::test_income_projection_uses_current_spi_release policyengine_uk_data/tests/test_spi_build.py::test_income_projection_reads_spi_dataset_year_read_only policyengine_uk_data/tests/test_spi_build.py::test_income_projection_builds_current_spi_dataset_when_missing policyengine_uk_data/tests/test_spi_build.py::test_income_projection_rebuilds_stale_spi_dataset_year policyengine_uk_data/tests/test_spi_build.py::test_income_projection_loads_local_h5_dataset -q

@MaxGhenis MaxGhenis force-pushed the codex/regenerate-spi-projections-393 branch from 3aea76e to 742a7be Compare May 24, 2026 16:08
@MaxGhenis MaxGhenis merged commit 1fc2dfc into main May 24, 2026
4 checks passed
@MaxGhenis MaxGhenis deleted the codex/regenerate-spi-projections-393 branch May 24, 2026 16:09
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.

Regenerate SPI income projection targets from the 2023-24 base

1 participant