State society-wide reports run on the sparse national dataset
维护者通常 2 天内回复
评估
- 难度
- 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.
- app-v2 calls
/us/economy/{reform}/over/{baseline}?region=state/xx&time_period=YYYYand passes no dataset (app/src/api/societyWideCalculation.ts). EconomyService._build_economic_impact_setup_optionsrejects any non-default dataset (policyengine_api/services/economy_service.pylines 844–846) and submitsdataset="default"(line 860).- The simulation gateway resolves
state/xxto 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/paeconomy result reports the local-area build inpolicyengine_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 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
PolicyEngine/policyengine-api 的其他 Issue
-
Keep staging candidate integration tests on the deployment runner可能已有人在做 @anth-volk 今天认领。 未关闭
难度 4/5 3-5 天 新手友好度 52/100
PolicyEngine/policyengine-api#3869 ·
维护者通常 2 天内回复
-
难度 5/5 一周以上 新手友好度 38/100
PolicyEngine/policyengine-api#3823 ·
维护者通常 2 天内回复
-
API v2: report validations as an append-only, provenance-keyed resource on reports可能重新可做 @anth-volk 于 30 天前认领,目前没有进行中的 PR。 未关闭
PolicyEngine/policyengine-api#3818 · 已指派 1 人 ·
维护者通常 2 天内回复
-
难度 5/5 一周以上 新手友好度 25/100
PolicyEngine/policyengine-api#3816 ·
维护者通常 2 天内回复
-
难度 4/5 3-5 天 新手友好度 45/100
PolicyEngine/policyengine-api#3814 ·
维护者通常 2 天内回复
查看 PolicyEngine/policyengine-api 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 85/100
维护者通常 1 天内回复
-
SR_SECURITY_DESCRIPTOR.fromString drops the SACL when no DACL is present可能已有人在做 @paul7436 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 88/100
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 85/100
equinor/fmu-sumo-uploader#302 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 75/100
modelscope/evalscope#1821 ·
维护者通常 1 天内回复
-
Sanity on ansible-core devel fails: ignore-2.23.txt references the removed import-3.9 test可能已有人在做 @yurnov 今天认领。 未关闭needs_triage
难度 1/5 1 小时以内 新手友好度 91/100
ansible-collections/kubernetes.core#1275 ·
维护者通常 1 天内回复