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

Đang mở
#1,731 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
8/100
Loại issue
Tính năng
Độ rõ ràng
Cần làm rõ
Mức độ hoạt động
Sôi nổi
Công nghệ
python
Lĩnh vực
data, machine-learning

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.

Ngôn ngữ chính
Python
Star
0
Fork
6
Merge trung bình
1 ngày 17 giờ
Pull request đã merge (30 ngày)
190

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của PolicyEngine/microcosm

Tất cả issue của PolicyEngine/microcosm

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.