Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

State society-wide reports run on the sparse national dataset

Abierto
#3,864 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 2 días

@anth-volk ya está trabajando en esto.

Desde el 6/10/2026.

  • #3868 de @anth-volk — abierto

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
35/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
python, typescript

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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

Lenguaje dominante
Python
Estrellas
18
Forks
33
Merge medio
2 d 21 h
PR fusionados (30 d)
24

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de PolicyEngine/policyengine-api

Todos los issues de PolicyEngine/policyengine-api

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.