Resolve US state and congressional-district regions to the ACS local-area dataset
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 48/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- python
- Domain
- data-engineering
Research direction
Start with src/policyengine/countries/us/regions.py lines 46–90 and src/policyengine/data/bundle/manifest.json, then inspect the existing populace_us_2024_acs_local overlay registration from #471. Done means state and congressional-district regions resolve through the pinned ACS local-area dataset with their dataset_path values, while the loading contract is agreed with the simulation API issue #717.
Written by the indexing model from the issue text.
Description
Problem
US state and congressional-district regions filter the sparse national default file; no region resolves to the ACS local-area dataset.
On main (bundle us-6.2.1):
src/policyengine/countries/us/regions.pybuilds state regions (lines 46–60) and congressional-district regions (lines 63–90) with aRowFilterStrategyand nodataset_path, so they inherit the national region'spopulace_us_2024.h5.src/policyengine/data/bundle/manifest.json→data_releases.us.region_datasetscontains onlynational.- The local-area build is registered as the named non-default overlay
populace_us_2024_acs_local(#471), pinned topopulace-us-2024-buildo-acs-local-77e2061-20260724T110908Z, but nothing selects it for a region.
#437 previously resolved state regions to per-state policyengine-us-data files; since those retired, state reports in the app run on the national file. The API's deployed bundle (policyengine[models]==5.2.0) stamps state reports with populace-us-2024-buildp-sparse-rmloss100-cae8640-20260728T011454Z.
Evidence: Pennsylvania
Kish effective sample size, ESS = (Σw)² / Σw², 2026 baseline.
| PA slice | Sparse national, app pair (buildp-sparse-rmloss100-cae8640, policyengine-us 1.764.6) |
ACS local-area (buildo-acs-local-767312d60, policyengine-us 2.19.0) |
|---|---|---|
| Household records | 1,999 | 64,981 |
| Records holding 90% of weight | 288 | 13,346 |
| ESS, all households | 314 | 558 |
| ESS, households with children | 120 | 234 |
| ESS, poor SPM units with children | 15.4 | 28.8 |
| ESS, poor SPM units with children under 6 | 5.2 | 10.5 |
| Median congressional-district ESS, all households | 18 | 34 |
What this does to results: Children First PA (via the PA CTC analysis) asked why a Pennsylvania refundable credit for children under 6 showed almost no poverty or child poverty impact at any amount. On the app's data pair, poor SPM units with children under 6 whose poverty gap is at most $1,000 per child under 6 carry 0 weighted units. At $2,200 per child they carry 2. So no credit up to $2,200 can lift a family over the line in that data. On the local-area file the same groups carry 7,582 and 10,755 weighted units (ESS 1.6 and 3.1).
Proposed change
- Add
region_datasetsentries forstateandcongressional_districtthat resolve topopulace_us_2024_acs_local.h5through the overlay's own repo, revision and sha256. Setdataset_pathon state and district regions and keep the existingRowFilterStrategy. - Bump the overlay pin from the Jul 24 Build O (
77e2061) to the Sep 23 buildpopulace-us-2024-buildo-acs-local-767312d60-20260923T074941Z(or Build P592ae5d6). In77e2061'scalibration_diagnostics.json, Pennsylvania taxable-interest targets miss by +178% (all returns) to +523% (AGI $200k–$500k).767312d60fits 94 of 96 Pennsylvania targets within 10%. Its misses are net capital gains returns (−34%) and taxable interest under $1 of AGI (−19%). - Agree the loading contract with the simulation API (sibling issue): the national local-area file is 9.8 GB.
The local-area file improves the effective sample but still concentrates weight (the top 1% of PA records hold 69% of it). That calibration question is tracked in PolicyEngine/microcosm#403.
Related
- Simulation API loading: PolicyEngine/policyengine-sim-api#717
- API v1 state reports: PolicyEngine/policyengine-api#3864
- Weight concentration: PolicyEngine/microcosm#403 (PA comment: https://github.com/PolicyEngine/microcosm/issues/403#issuecomment-5937358726)
🤖 Generated with Claude Code
- Dominant language
- Python
- Stars
- 8
- Forks
- 9
- Avg merge
- 15h 28m
- Merged PRs (30d)
- 13
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from PolicyEngine/policyengine.py
-
Raise the simulation cache memory warning to 16 GiBPossibly taken @anth-volk claimed this 4 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
PolicyEngine/policyengine.py#549 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
PolicyEngine/policyengine.py#473 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
PolicyEngine/policyengine.py#436 · 1 comment ·
Maintainers usually reply within 1 day
-
Certify populace-uk as the UK certified defaultMay be free again A pull request for this issue was closed without being merged. Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
PolicyEngine/policyengine.py#408 ·
Maintainers usually reply within 1 day
-
calculate_household raises SPMInputError for households without county_fipsPossibly taken @MaxGhenis claimed this 5 days ago. Open
Difficulty 4/5 3-5 days Newbie friendliness 58/100
PolicyEngine/policyengine.py#543 ·
Maintainers usually reply within 1 day
All issues in PolicyEngine/policyengine.py
Similar issues
-
needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
json_params_matcher fails on falsy top-level JSON primitives (0, False, "")Possibly taken @mayureshsonawane17 claimed this today. OpenWaiting for: Product Owner
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Maintainers usually reply within 5 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Maintainers usually reply within 1 day
-
Add .devin pluginOpen
Difficulty 1/5 Under an hour Newbie friendliness 88/100
ayghri/i-have-adhd#249 ·
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
modelscope/FunASR#3762 ·
Maintainers usually reply within 1 day