Repository navigation
Description
Problem
State society-wide reports in app-v2 run on the sparse national dataset.
- app-v2 calls
/us/economy/{reform}/over/{baseline}?region=state/xx&time_period=YYYYand passes no dataset (app/src/api/societyWideCalculation.ts). EconomyService._build_economic_impact_setup_optionsrejects any non-default dataset (policyengine_api/services/economy_service.pylines 844–846) and submitsdataset="default"(line 860).- The simulation gateway resolves
state/xxto the national file (Load the ACS local-area dataset for US state and district runs policyengine-sim-api#717).
The deployed bundle is policyengine[models]==5.2.0 (pyproject.toml line 46), which uses policyengine-us 1.764.6 and data populace-us-2024-buildp-sparse-rmloss100-cae8640-20260728T011454Z. That matches what the app's report page shows ("Model version: 1.764.6 • Data version: populace-us-2024-buildp-sparse-rmloss100-cae8640-20260728T011454Z"). PolicyEngine.py 6.2.1 (PR #3855) moves to policyengine-us 2.2.1 and data populace-us-2024-spm-20260915. However, 6.2.1 also maps state regions to the national file, so state reports keep using national data after that bump.
Effect on a state report: Pennsylvania
With the deployed pair, the Pennsylvania slice has 1,999 household records and an effective sample of 314 (Kish ESS, 2026 baseline). Poor SPM units with children under 6 have an ESS of 5.2. A Pennsylvania refundable credit for children under 6 shows close to zero poverty impact at every amount up to $2,200 per child. The reason is that poor units with children under 6 whose poverty gap is at most $1,000 per child carry 0 weighted units, and at $2,200 per child they carry 2 (details in PolicyEngine/policyengine.py#551).
To track
- Resolve US state and congressional-district regions to the ACS local-area dataset policyengine.py#551 resolves state and district regions to the local-area dataset.
- Load the ACS local-area dataset for US state and district runs policyengine-sim-api#717 loads it for state and district runs.
- API v1 installs a bundle that contains both changes.
- A
region=state/paeconomy result reports the local-area build inpolicyengine_bundle.data_version/dataset, not the national build.
🤖 Generated with Claude Code
Activity