Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

State society-wide reports run on the sparse national dataset

未关闭
#3,864 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 2 天内回复

@anth-volk 已经在做这个了。

开始于 2026年10月6日。

  • #3868 来自 @anth-volk —— 未关闭

评估

难度
4/5
预计耗时
3-5 天
新手友好度
35/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
活跃
技术栈
python, typescript

调研方向

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.

由索引模型根据 Issue 内容生成。

描述

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

主要语言
Python
星标
18
派生
33
平均合并
2 天 21 小时
30 天内合并 PR
24

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

PolicyEngine/policyengine-api 的其他 Issue

查看 PolicyEngine/policyengine-api 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。