Hacktoberfest 2026 : les issues que les mainteneurs ont marquées pour octobre, ouvertes et accessibles aux débutants. Parcourir les issues Hacktoberfest

State society-wide reports run on the sparse national dataset

Ouverte
#3,864 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Les mainteneurs répondent en général sous 1 jour

@anth-volk y travaille déjà.

Depuis le 6/10/2026.

  • #3868 par @anth-volk — ouverte

Évaluation

Difficulté
4/5
Temps estimé
3-5 jours
Accessibilité débutants
35/100
Type d'issue
Bug
Clarté
Plutôt claire
Activité
Active
Stack technique
python, typescript

Piste de recherche

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.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

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

Langage dominant
Python
Étoiles
18
Forks
33
Merge moyen
1 j 12 h
PR mergées (30 j)
23

Préparer son environnement

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de PolicyEngine/policyengine-api

Toutes les issues de PolicyEngine/policyengine-api

Issues similaires

Plus d'issues Python

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.