Skip to content
This repository was archived by the owner on Jun 19, 2026. It is now read-only.

Add longwise local geography weights#437

Merged
MaxGhenis merged 1 commit into
mainfrom
codex/longwise-local-geography
Jun 19, 2026
Merged

Add longwise local geography weights#437
MaxGhenis merged 1 commit into
mainfrom
codex/longwise-local-geography

Conversation

@MaxGhenis

Copy link
Copy Markdown
Contributor

Summary

  • add long_geography.py, an OA-first long local-geography sidecar with source-household provenance and support diagnostics
  • wire routine builds/uploads/downloads/manifests to include local_geography_weights.csv.gz without expanding dense local-area H5 matrices
  • keep a guarded small-diagnostic path for explicit dense H5 to long conversion, while steering production toward assigned geography and future 1D L0/local weights
  • share the area-to-household index resolver with local H5 publishing and preserve source_year / source_household_id through clone-and-assign

Testing

  • python3 -m ruff check policyengine_uk_data/calibration/long_geography.py policyengine_uk_data/tests/test_long_geography.py policyengine_uk_data/calibration/publish_local_h5s.py policyengine_uk_data/datasets/create_datasets.py policyengine_uk_data/storage/download_completed_datasets.py policyengine_uk_data/storage/upload_completed_datasets.py policyengine_uk_data/tests/test_release_manifest.py policyengine_uk_data/utils/release_manifest.py policyengine_uk_data/calibration/clone_and_assign.py
  • uv run --frozen pytest policyengine_uk_data/tests/test_long_geography.py policyengine_uk_data/tests/test_publish_local_h5s.py policyengine_uk_data/tests/test_release_manifest.py policyengine_uk_data/tests/test_clone_and_assign.py -q

Note

This is a bridge for migration off the matrix path. The long-term owner should be Populace: compact UK remains the fast default dataset, and a future populace-data variant="local" artifact can carry pooled-FRS / clone-and-assign / L0 local geography.

@MaxGhenis MaxGhenis force-pushed the codex/longwise-local-geography branch from 12b9911 to afc127d Compare June 19, 2026 13:19
@MaxGhenis MaxGhenis merged commit 2af888f into main Jun 19, 2026
5 checks passed
@MaxGhenis MaxGhenis deleted the codex/longwise-local-geography branch June 19, 2026 13:53
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant