Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Resolve US state and congressional-district regions to the ACS local-area dataset

オープン
#551 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

@anth-volk がすでに取り組んでいます。

2026年10月5日 から。

  • #552 @anth-volk による — オープン

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
48/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
活発
技術スタック
python

調査の方向性

Start with src/policyengine/countries/us/regions.py lines 46–90 and src/policyengine/data/bundle/manifest.json, then inspect the existing populace_us_2024_acs_local overlay registration from #471. Done means state and congressional-district regions resolve through the pinned ACS local-area dataset with their dataset_path values, while the loading contract is agreed with the simulation API issue #717.

索引モデルが issue の本文から書いたものです。

説明

Problem

US state and congressional-district regions filter the sparse national default file; no region resolves to the ACS local-area dataset.

On main (bundle us-6.2.1):

  • src/policyengine/countries/us/regions.py builds state regions (lines 46–60) and congressional-district regions (lines 63–90) with a RowFilterStrategy and no dataset_path, so they inherit the national region's populace_us_2024.h5.
  • src/policyengine/data/bundle/manifest.json → data_releases.us.region_datasets contains only national.
  • The local-area build is registered as the named non-default overlay populace_us_2024_acs_local (#471), pinned to populace-us-2024-buildo-acs-local-77e2061-20260724T110908Z, but nothing selects it for a region.

#437 previously resolved state regions to per-state policyengine-us-data files; since those retired, state reports in the app run on the national file. The API's deployed bundle (policyengine[models]==5.2.0) stamps state reports with populace-us-2024-buildp-sparse-rmloss100-cae8640-20260728T011454Z.

Evidence: Pennsylvania

Kish effective sample size, ESS = (Σw)² / Σw², 2026 baseline.

PA slice Sparse national, app pair (buildp-sparse-rmloss100-cae8640, policyengine-us 1.764.6) ACS local-area (buildo-acs-local-767312d60, policyengine-us 2.19.0)
Household records 1,999 64,981
Records holding 90% of weight 288 13,346
ESS, all households 314 558
ESS, households with children 120 234
ESS, poor SPM units with children 15.4 28.8
ESS, poor SPM units with children under 6 5.2 10.5
Median congressional-district ESS, all households 18 34

What this does to results: Children First PA (via the PA CTC analysis) asked why a Pennsylvania refundable credit for children under 6 showed almost no poverty or child poverty impact at any amount. On the app's data pair, poor SPM units with children under 6 whose poverty gap is at most $1,000 per child under 6 carry 0 weighted units. At $2,200 per child they carry 2. So no credit up to $2,200 can lift a family over the line in that data. On the local-area file the same groups carry 7,582 and 10,755 weighted units (ESS 1.6 and 3.1).

Proposed change

  1. Add region_datasets entries for state and congressional_district that resolve to populace_us_2024_acs_local.h5 through the overlay's own repo, revision and sha256. Set dataset_path on state and district regions and keep the existing RowFilterStrategy.
  2. Bump the overlay pin from the Jul 24 Build O (77e2061) to the Sep 23 build populace-us-2024-buildo-acs-local-767312d60-20260923T074941Z (or Build P 592ae5d6). In 77e2061's calibration_diagnostics.json, Pennsylvania taxable-interest targets miss by +178% (all returns) to +523% (AGI $200k–$500k). 767312d60 fits 94 of 96 Pennsylvania targets within 10%. Its misses are net capital gains returns (−34%) and taxable interest under $1 of AGI (−19%).
  3. Agree the loading contract with the simulation API (sibling issue): the national local-area file is 9.8 GB.

The local-area file improves the effective sample but still concentrates weight (the top 1% of PA records hold 69% of it). That calibration question is tracked in PolicyEngine/microcosm#403.

Related

🤖 Generated with Claude Code

主要言語
Python
スター
8
フォーク
9
平均マージ
15時間 28分
マージ済み PR(30日)
13

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

PolicyEngine/policyengine.py のほかの issue

PolicyEngine/policyengine.py の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。