IRS SOI Table 1.4: add business, rental, royalty, farm-rental, partnership and S-corp net income/loss legs; give HT2/district 'net income (less loss)' columns their own concept ids
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
调研方向
Start with packages/irs_soi/table_1_4/source_package.yaml and compare its existing estate/trust rows with the workbook columns listed in the issue. Then inspect packages/irs_soi/congressional_district_2022/source_package.yaml and the historic_table_2 packages for the affected source column ids and concept mappings. Add the listed income/loss legs and align the signed concept ids and labels; done means mappings match the cited IRS definitions and the requested test pins each source column id to its doc-guide definition.
由索引模型根据 Issue 内容生成。
描述
Microcosm needs Table 1.4's one-sided income/loss legs for business, rental, royalty and pass-through income. They would serve as concept-matched national controls for the signed Historic Table 2 / congressional-district columns (PolicyEngine/microcosm#1228). The pinned feed carries none of them: its table_1_4 package has the estate/trust and other-income legs only.
1. Add the Table 1.4 legs (packages/irs_soi/table_1_4/source_package.yaml)
Same shape as the existing estate_trust_net_{income,loss}_{returns,amount} rows:
- amounts take
value_scale: 1000; - each leg is a
broad_matchto the positive part (net income) or the negative-part magnitude (net loss) of the signed PE-US input.
Excel columns from the workbooks Chronicle already pins (20in14ar.xls … 23in14ar.xls). The estate/trust letters this mapping produces (BH–BK / BL–BO / BX–CA / BX–CA) equal the package's current ones, which checks the mapping.
Proposed measure ids (_returns / _amount) |
Table 1.4 header | TY2020 | TY2021 | TY2022 | TY2023 | TY2022 all returns |
|---|---|---|---|---|---|---|
business_net_income |
Business or profession: Net income | T / U | T / U | AF / AG | AF / AG | 21,969,832 / $543.6B |
business_net_loss |
Business or profession: Net loss | V / W | V / W | AH / AI | AH / AI | 8,386,569 / $133.2B |
rent_net_income |
Rent: Net income | AN / AO | AN / AO | AZ / BA | AZ / BA | 4,925,212 / $97.3B |
rent_net_loss |
Rent: Net loss (includes nondeductible loss) | AP / AQ | AP / AQ | BB / BC | BB / BC | 4,345,158 / $94.7B |
royalty_net_income |
Royalty: Net income | AR / AS | AR / AS | BD / BE | BD / BE | 1,796,996 / $49.4B |
royalty_net_loss |
Royalty: Net loss | AT / AU | AT / AU | BF / BG | BF / BG | 67,913 / $0.66B |
farm_rental_net_income |
Farm rental: Net income | AV / AW | AV / AW | BH / BI | BH / BI | 330,494 / $6.7B |
farm_rental_net_loss |
Farm rental: Net loss | AX / AY | AX / AY | BJ / BK | BJ / BK | 66,392 / $0.64B |
total_rental_royalty_net_income |
Total rental and royalty: Net income | AZ / BA | AZ / BA | BL / BM | BL / BM | 6,380,131 / $148.9B |
total_rental_royalty_net_loss |
Total rental and royalty: Net loss | BB / BC | BB / BC | BN / BO | BN / BO | 3,313,901 / $55.7B |
partnership_s_corporation_net_income |
Partnership and S corporation: Net income | BD / BE | — | — | — | (TY2020: 5,901,811 / $931.6B) |
partnership_s_corporation_net_loss |
Partnership and S corporation: Net loss | BF / BG | — | — | — | (TY2020: 3,099,702 / $224.2B) |
partnership_net_income |
Partnership: Net income | — | BD / BE | BP / BQ | BP / BQ | 3,311,926 / $487.1B |
partnership_net_loss |
Partnership: Net loss | — | BF / BG | BR / BS | BR / BS | 2,094,775 / $175.6B |
s_corporation_net_income |
S corporation: Net income | — | BH / BI | BT / BU | BT / BU | 4,027,461 / $812.7B |
s_corporation_net_loss |
S corporation: Net loss | — | BJ / BK | BV / BW | BV / BW | 1,517,428 / $93.0B |
farm_net_income |
Farm: Net income | BL / BM | BP / BQ | CB / CC | CB / CC | 508,494 / $17.3B |
farm_net_loss |
Farm: Net loss | BN / BO | BR / BS | CD / CE | CD / CE | 1,258,192 / $42.6B |
Notes for the concept evidence:
- Totals include farm rental. Table 1.4's "Total rental and royalty" includes Form 4835 farm rental. Historic Table 2's A25870 (Schedule E line 26) does not. HT2 A25870 is 0.919 of the Table 1.4 total net in TY2022 and TY2023, and 0.983 / 0.992 without farm rental.
- The rent loss column is pre-limitation. "Rent: Net loss" includes nondeductible (passive-limited) loss. The total-rental-and-royalty columns are post-limitation, so they are the line-26 legs.
- Partnership and S corporation layout. TY2020 publishes them combined. TY2021+ publishes them separately, and no combined net-income count exists after TY2020. HT2 N26270 (TY2020) equals the combined NI + NL returns within 0.12%.
2. Make the HT2 / district-file concept ids say "less loss"
HT2 and the district file publish N/A00900, N/A26270 and N/A25870. Their doc guides define these as "net income (less loss)", and in Form 1040 terms they are Schedule 1 line 3, Schedule E line 32 and Schedule E line 26.
-
The district file collides with the new legs.
packages/irs_soi/congressional_district_2022/source_package.yamlgives them the one-sided labels and concept ids that the Table 1.4 legs above would naturally use:irs_soi.business_or_profession_net_income(andreturns_with_…);irs_soi.partnership_s_corporation_net_income;irs_soi.rental_and_royalty_net_income.
Labels: "Returns with business or profession net income", "Partnership and S-corporation net income", "Rental and royalty net income".
-
HT2 is close but inconsistent. The
historic_table_2packages already label them "net income less loss". Their concept ids (irs_soi.schedule_c_income,irs_soi.partnership_scorp_income,irs_soi.rental_royalty_income) differ from the district file's for the same IRS column.
Proposal:
- give both families one signed concept id per line, e.g.
irs_soi.business_or_profession_net_income_less_lossandirs_soi.returns_with_business_or_profession_net_income_or_loss; - fix the district-file labels;
- keep the
measure_ids stable, because Microcosm keys on them; - add a test pinning each
source_column_idto its doc-guide definition.
This is the same class as #307: one measure id naming two IRS measures, where net_capital_gains_* was the capital-gains case.
Consumer side
PolicyEngine/microcosm#1228 / microcosm#1230 binds the HT2 and district columns to signed model concepts that count a nonzero total. It refuses these measure ids from any family other than HT2 or the district file. Once these legs land, Microcosm can calibrate national positive and negative parts alongside the signed state rows. Its business_net_{profits,losses}, partnership_and_s_corp_{income,losses} and rent_and_royalty_net_{income,losses} concepts are reserved for exactly these columns.
- 主要语言
- Python
- 星标
- 0
- 派生
- 3
- 平均合并
- 1 天 4 小时
- 30 天内合并 PR
- 65
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
PolicyEngine/chronicle 的其他 Issue
-
难度 5/5 一周以上 新手友好度 35/100
PolicyEngine/chronicle#420 ·
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 50/100
PolicyEngine/chronicle#418 ·
维护者通常 1 天内回复
-
难度 4/5 3-5 天 新手友好度 35/100
PolicyEngine/chronicle#398 ·
维护者通常 1 天内回复
-
难度 4/5 3-5 天 新手友好度 48/100
PolicyEngine/chronicle#390 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 4/5 3-5 天 新手友好度 45/100
PolicyEngine/chronicle#362 · 1 条评论 ·
维护者通常 1 天内回复
查看 PolicyEngine/chronicle 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 82/100
维护者通常 1 天内回复
-
Treat corrupt-shape state files as missing in `load_state`可能已有人在做 @Qrytics 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 85/100
OvertureMaps/overturemaps-py#175 ·
维护者通常 1 天内回复
-
enhancement
难度 2/5 1-3 小时 新手友好度 74/100
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 83/100
awslabs/visual-asset-management-system#1278 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 82/100
aws-samples/sample-per-model-bedrock#835 ·
维护者通常 1 天内回复