US local build: district targets that exist but are not in the fit

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

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

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
8/100
issue の種類
機能追加
明瞭さ
説明が足りない
活発さ
活発
技術スタック
python

調査の方向性

This is a planning issue with open decisions, so a newcomer should not start a patch here. Read the three decisions and the linked #1728 and #1730 first. The concrete entry points are us/chronicle_feed_scope.json (ACS S0101 and S2201 scope), source_coverage.py, the REVIEWED_EXCLUDED_ALIASES and STATE_CD_DEFECTIVE_CD_FILE_MEASURES registers, and the --soi-mode and --cd-holdout-fraction options. Done means the local build fits the district age and household rows and reports their fit.

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

説明

Problem

The local build fits one district family: population totals (436 rows, from the 2020 ladder). More district facts exist. This issue lists them, says what each one needs, and gives an order. It is the district part of #1728 (work items 3 and 4).

#1038 does not cover this. #1038 corrects three district tax families on the national full surface, and it adds no target.

District facts that exist today

Source Rows Where it is What it needs
IRS district file, all returns (--soi-mode state_cd) 21,743 district rows and 302 state rows The code is ready. It is opt-in, and no production build uses it #1036 for the state capital-gains level, a measured run, a ruling
District SALT and premium tax credit rows 974 and 487 specs Kept off state_cd by STATE_CD_DEFECTIVE_CD_FILE_MEASURES, because the feed pin reads the wrong IRS columns The corrected columns in the feed (PolicyEngine/chronicle#447, item 1.1). Then remove the register entries
ACS district population by age (S0101, 2024, 119th plan) 436 districts × 18 age bands In Chronicle at the feed pin, but not in the feed scope (us/chronicle_feed_scope.json). The national tool lists its alias under REVIEWED_EXCLUDED_ALIASES A scope change, a selection in the local tool, and a rule that ties the district rows to the state age rows
ACS district households (S2201, 2024, 119th plan) 436 districts × 3 rows: all households, with SNAP, without SNAP The same. source_coverage.py marks it as validation only (#240) The same for the household total. The SNAP rows stay a check
District tax_filer_individual_count 436 Kept off state_cd: no state parent A state parent
District rows of states with one district 459 and 360 specs Kept off state_cd: they are copies of the state total Nothing. They carry no district information

One more condition for the premium tax credit rows: ACA take-up is true on every ACS tax unit (#1720). The rows cannot enter the loss before a take-up draw exists.

District facts that do not exist yet

PolicyEngine/chronicle#447 requests them:

  • the IRS district file by AGI class (9 classes for each district);
  • IRS district columns that the package does not read. 15 of them have a state twin already: wages, total income, taxable income, the child tax credit, real estate taxes, taxes paid and state refunds;
  • ACS district income brackets (B19001) and households by type (B11001);
  • ACS district median income and poverty, as checks (#1673);
  • FNS county SNAP (#292).

Limits in the local tool

  • --soi-mode is one choice. state_cd has the district SOI rows, and state_county has the county rows. No mode has both. The County Files runbook uses state_county.
  • District plans. The IRS district file is on the 117th plan and the households carry 119th districts, so those rows pass through a population crosswalk. The ACS district packages are on the 119th plan and need no crosswalk. #1526 moves the districts to the 120th Congress.
  • Size. The dense matrix for the full surface needed 184 GiB before the sparse target matrix. #1067 then solved 27,148 district targets at 1.38M rows with a sparse operator. No run has measured state_cd on the build from #1719.

Work, in order

  1. ACS district age and households.
    • This needs no Chronicle work and no re-pin: add the two packages to the feed scope.
    • Select the rows in the local tool.
    • Bind each district row as a share of its state row, so that the state level stays with the state source (Census age groups, PR #1531).
    • ACS records can meet these targets without donor rows.
  2. District SOI rows (state_cd), after #1036.
    • Measure memory, time, ESS and held-out error first.
    • Use the holdout that exists (--cd-holdout-fraction).
  3. District SOI rows and county rows in one run. This belongs with the declared target set of #1728 (work item 1).
  4. SALT and premium tax credit district rows, after PolicyEngine/chronicle#447 item 1.1.
  5. New families as Chronicle delivers them. Income brackets are first.

Rules for every step:

  • Score a new family as a held-out check before it enters the loss.
  • Group the changes that move outputs into few builds. Choose λ again after them (#1730).

Decisions needed

  1. Which district families enter the loss, and which stay as checks.
  2. Whether district age rows bind as shares of the state row or as levels. The district source is a survey (ACS), and the state source is the Census estimates.
  3. Whether district SOI rows enter the loss before the starting weights change (#1727). They are tax targets, and ACS rows carry tax detail only as a transfer from donor rows.

Done when

  • The local build fits the district age and household rows and reports their fit. The state slices stay within tolerance.
  • A measured run of state_cd exists, and a ruling follows it.
  • The kept-off register has no entry for a column that the feed reads correctly.

Related

#1730, #1728, #1038, #1036, #1040, #1224, #1528, #240, #292, #625, #1526, #1673, PolicyEngine/chronicle#447.

主要言語
Python
スター
0
フォーク
6
平均マージ
1日 17時間
マージ済み PR(30日)
190

環境構築

はじめの一歩

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

PolicyEngine/microcosm のほかの issue

PolicyEngine/microcosm の issue をすべて見る

似ている issue

Python の issue をもっと見る

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

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