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

Aperta
#346 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
54/100
Tipo di issue
Funzionalità
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
python, yaml
Ambito
data, databases

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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_match to 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.yaml gives 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 (and returns_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_2 packages 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_loss and irs_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_id to 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.

Lingua principale
Python
Stelle
0
Fork
3
Merge medio
1g 4h
PR unite (30g)
65

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di PolicyEngine/chronicle

Tutte le issue di PolicyEngine/chronicle

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.