Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

State society-wide reports run on the sparse national dataset

Aperta
#3,864 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@anth-volk ci sta già lavorando.

Dal 6/10/2026.

  • #3868 di @anth-volk — aperta

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
python, typescript

Direzione di ricerca

Start with app/src/api/societyWideCalculation.ts and policyengine_api/services/economy_service.py, then read the tracked changes in PolicyEngine/policyengine.py#551 and PolicyEngine/policyengine-sim-api#717. Verify the API v1 bundle includes both upstream changes and that a region=state/pa economy result reports the local-area data version and dataset rather than the national build.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Problem

State society-wide reports in app-v2 run on the sparse national dataset.

  1. app-v2 calls /us/economy/{reform}/over/{baseline}?region=state/xx&time_period=YYYY and passes no dataset (app/src/api/societyWideCalculation.ts).
  2. EconomyService._build_economic_impact_setup_options rejects any non-default dataset (policyengine_api/services/economy_service.py lines 844–846) and submits dataset="default" (line 860).
  3. The simulation gateway resolves state/xx to the national file (PolicyEngine/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

  • PolicyEngine/policyengine.py#551 resolves state and district regions to the local-area dataset.
  • PolicyEngine/policyengine-sim-api#717 loads it for state and district runs.
  • API v1 installs a bundle that contains both changes.
  • A region=state/pa economy result reports the local-area build in policyengine_bundle.data_version / dataset, not the national build.

🤖 Generated with Claude Code

Lingua principale
Python
Stelle
18
Fork
33
Merge medio
1g 12h
PR unite (30g)
23

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di PolicyEngine/policyengine-api

Tutte le issue di PolicyEngine/policyengine-api

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.