Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .github/workflows/reusable_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,18 @@ jobs:
TEST_LITE: ${{ !inputs.upload_data }}
PYTHON_LOG_LEVEL: INFO

- name: Build datasets for local area calibration
if: inputs.full_suite
run: |
LOCAL_AREA_CALIBRATION=true python policyengine_us_data/datasets/cps/cps.py
LOCAL_AREA_CALIBRATION=true python policyengine_us_data/datasets/puf/puf.py
LOCAL_AREA_CALIBRATION=true python policyengine_us_data/datasets/cps/extended_cps.py
python policyengine_us_data/datasets/cps/local_area_calibration/create_stratified_cps.py 10500

- name: Run local area calibration tests
if: inputs.full_suite
run: pytest policyengine_us_data/tests/test_local_area_calibration/ -v

- name: Save calibration log
if: inputs.full_suite
uses: actions/upload-artifact@v4
Expand Down
6 changes: 6 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,12 @@ data:
mv policyengine_us_data/storage/enhanced_cps_2024.h5 policyengine_us_data/storage/dense_enhanced_cps_2024.h5
cp policyengine_us_data/storage/sparse_enhanced_cps_2024.h5 policyengine_us_data/storage/enhanced_cps_2024.h5

data-local-area: data
LOCAL_AREA_CALIBRATION=true python policyengine_us_data/datasets/cps/cps.py
LOCAL_AREA_CALIBRATION=true python policyengine_us_data/datasets/puf/puf.py
LOCAL_AREA_CALIBRATION=true python policyengine_us_data/datasets/cps/extended_cps.py
python policyengine_us_data/datasets/cps/local_area_calibration/create_stratified_cps.py 10500

clean:
rm -f policyengine_us_data/storage/*.h5
rm -f policyengine_us_data/storage/*.db
Expand Down
8 changes: 8 additions & 0 deletions changelog_entry.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
- bump: minor
changes:
added:
- Sparse matrix builder for local area calibration with database-driven constraints
- Local area calibration data pipeline (make data-local-area)
- ExtendedCPS_2023 and PUF_2023 dataset classes
- Stratified CPS sampling to preserve high-income households
- Matrix verification tests for local area calibration
Loading