Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,9 @@ medical_expense_deduction,Medical expense deduction,Medical expenses deduction,1
charitable_deduction,Charitable contribution deduction,"Charitable contributions, other than education and health; charitable contributions, education; charitable contributions, health",60400000000,Sum of individual income tax revenue-loss rows for charitable contributions excluding corporate income tax estimates.
deductible_mortgage_interest,Deductible mortgage interest,Deductibility of mortgage interest on owner-occupied homes,24800000000,Individual income tax revenue loss for deductible mortgage interest on owner-occupied homes.
qualified_business_income_deduction,Qualified business income deduction,20-percent deduction for qualified business income,63100000000,Individual income tax revenue loss for qualified business income deduction.
self_employed_health_insurance_deduction,Self-employed health insurance deduction,Deduction for health insurance premiums and long-term care insurance premiums by the self-employed,8400000000,"Individual income tax revenue loss FY2024; JCT line includes long-term care insurance premiums deducted by the self-employed."
health_savings_account_deduction,Health savings account deduction,Health savings accounts,12200000000,"Individual income tax revenue loss FY2024; JCT footnote 14: includes employer contributions made through cafeteria plans, which also appear in other line items."
student_loan_interest_deduction,Student loan interest deduction,Deduction for interest on student loans,2400000000,"Individual income tax revenue loss FY2024."
self_employed_pension_contribution_deduction,Self-employed pension (Keogh) net exclusion,Net exclusion of pension contributions and earnings: plans covering partners and sole proprietors (sometimes referred to as Keogh plans),16600000000,"Individual income tax revenue loss FY2024; JCT measures the NET EXCLUSION of contributions and earnings (inside buildup), broader than the above-the-line contribution deduction alone - broad-fit anchor only."
traditional_ira_deduction,Traditional IRA net exclusion,Individual retirement arrangements: traditional IRAs,16000000000,"Individual income tax revenue loss FY2024; JCT measures the net exclusion of contributions and earnings, broader than the contribution deduction alone - broad-fit anchor only."
cdcc_and_employer_child_care_exclusion,CDCC and employer child care exclusion,Credit for child and dependent care and exclusion of employer-provided child care,5600000000,"Individual income tax revenue loss FY2024; COMBINED line: the credit plus the employer-provided child care exclusion (JCT footnote 11 includes dependent care FSA purchases); not a clean CDCC-only concept."
8 changes: 4 additions & 4 deletions db/data/jct/tax_expenditures_2024/manifest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,16 @@ files:
2024:
filename: jct_tax_expenditures_2024.csv
source_url: https://www.jct.gov/getattachment/765709fb-9a4b-430a-8f9e-4d342ec97f7e/x-48-24.pdf
sha256: a6db137830f744ef140c796e23da2673480a70fb3fbcba848476d5ccbf27ffa8
size_bytes: 1154
sha256: 8bfdd02de4e44040bc52fde70134bc64d15bea536f3e48e5324b1964980218ce
size_bytes: 3024
source_table: Estimates of Federal Tax Expenditures for Fiscal Years 2024-2028
year: 2024
storage:
r2:
provider: r2
bucket: ledger-raw
key: raw/jct/jct-tax-expenditures-2024/2024/a6db137830f744ef140c796e23da2673480a70fb3fbcba848476d5ccbf27ffa8/jct_tax_expenditures_2024.csv
uri: r2://ledger-raw/raw/jct/jct-tax-expenditures-2024/2024/a6db137830f744ef140c796e23da2673480a70fb3fbcba848476d5ccbf27ffa8/jct_tax_expenditures_2024.csv
key: raw/jct/jct-tax-expenditures-2024/2024/8bfdd02de4e44040bc52fde70134bc64d15bea536f3e48e5324b1964980218ce/jct_tax_expenditures_2024.csv
uri: r2://ledger-raw/raw/jct/jct-tax-expenditures-2024/2024/8bfdd02de4e44040bc52fde70134bc64d15bea536f3e48e5324b1964980218ce/jct_tax_expenditures_2024.csv
notes:
- >
Calendar-year 2024 values use the individual income tax revenue-loss column
Expand Down
84 changes: 84 additions & 0 deletions packages/jct/tax_expenditures_2024/source_package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,90 @@ record_sets:
value: qualified_business_income_deduction
label: JCT tax expenditure row
table_record_kind: total
- value_id: self_employed_health_insurance_deduction
label: Self-employed health insurance deduction
ordinal: 5
row_number: 7
expected_row_header_column: A
expected_row_header: self_employed_health_insurance_deduction
filters:
tax_expenditure: self_employed_health_insurance_deduction
constraints:
- variable: tax_expenditure
operator: "=="
value: self_employed_health_insurance_deduction
label: JCT tax expenditure row
table_record_kind: total
- value_id: health_savings_account_deduction
label: Health savings account deduction
ordinal: 6
row_number: 8
expected_row_header_column: A
expected_row_header: health_savings_account_deduction
filters:
tax_expenditure: health_savings_account_deduction
constraints:
- variable: tax_expenditure
operator: "=="
value: health_savings_account_deduction
label: JCT tax expenditure row
table_record_kind: total
- value_id: student_loan_interest_deduction
label: Student loan interest deduction
ordinal: 7
row_number: 9
expected_row_header_column: A
expected_row_header: student_loan_interest_deduction
filters:
tax_expenditure: student_loan_interest_deduction
constraints:
- variable: tax_expenditure
operator: "=="
value: student_loan_interest_deduction
label: JCT tax expenditure row
table_record_kind: total
- value_id: self_employed_pension_contribution_deduction
label: Self-employed pension (Keogh) net exclusion
ordinal: 8
row_number: 10
expected_row_header_column: A
expected_row_header: self_employed_pension_contribution_deduction
filters:
tax_expenditure: self_employed_pension_contribution_deduction
constraints:
- variable: tax_expenditure
operator: "=="
value: self_employed_pension_contribution_deduction
label: JCT tax expenditure row
table_record_kind: total
- value_id: traditional_ira_deduction
label: Traditional IRA net exclusion
ordinal: 9
row_number: 11
expected_row_header_column: A
expected_row_header: traditional_ira_deduction
filters:
tax_expenditure: traditional_ira_deduction
constraints:
- variable: tax_expenditure
operator: "=="
value: traditional_ira_deduction
label: JCT tax expenditure row
table_record_kind: total
- value_id: cdcc_and_employer_child_care_exclusion
label: CDCC and employer child care exclusion
ordinal: 10
row_number: 12
expected_row_header_column: A
expected_row_header: cdcc_and_employer_child_care_exclusion
filters:
tax_expenditure: cdcc_and_employer_child_care_exclusion
constraints:
- variable: tax_expenditure
operator: "=="
value: cdcc_and_employer_child_care_exclusion
label: JCT tax expenditure row
table_record_kind: total
measures:
- measure_id: revenue_loss
label: Individual income tax revenue loss
Expand Down
13 changes: 10 additions & 3 deletions tests/test_ledger_bundle.py
Original file line number Diff line number Diff line change
Expand Up @@ -491,15 +491,22 @@ def test_build_bundle_cli_supports_jct_tax_expenditure_source(tmp_path, capsys):
assert exit_code == 0
assert payload["valid"]
assert payload["counts"]["source_package_count"] == 1
assert payload["counts"]["fact_count"] == 5
assert payload["coverage"]["counts"]["by_source"] == {"jct": 5}
assert payload["coverage"]["counts"]["by_entity"] == {"tax_unit": 5}
assert payload["counts"]["fact_count"] == 11
assert payload["coverage"]["counts"]["by_source"] == {"jct": 11}
assert payload["coverage"]["counts"]["by_entity"] == {"tax_unit": 11}
assert {row["lineage"]["source_record_id"] for row in rows} == {
"jct.tax_expenditures.cy2024.salt_deduction.revenue_loss",
"jct.tax_expenditures.cy2024.medical_expense_deduction.revenue_loss",
"jct.tax_expenditures.cy2024.charitable_deduction.revenue_loss",
"jct.tax_expenditures.cy2024.deductible_mortgage_interest.revenue_loss",
"jct.tax_expenditures.cy2024.qualified_business_income_deduction.revenue_loss",
# JCX-48-24 extension (populace#514 anchors):
"jct.tax_expenditures.cy2024.self_employed_health_insurance_deduction.revenue_loss",
"jct.tax_expenditures.cy2024.health_savings_account_deduction.revenue_loss",
"jct.tax_expenditures.cy2024.student_loan_interest_deduction.revenue_loss",
"jct.tax_expenditures.cy2024.self_employed_pension_contribution_deduction.revenue_loss",
"jct.tax_expenditures.cy2024.traditional_ira_deduction.revenue_loss",
"jct.tax_expenditures.cy2024.cdcc_and_employer_child_care_exclusion.revenue_loss",
}


Expand Down
15 changes: 11 additions & 4 deletions tests/test_ledger_source_package.py
Original file line number Diff line number Diff line change
Expand Up @@ -1157,13 +1157,13 @@ def test_jct_tax_expenditure_package_builds_selected_individual_facts():
values_by_record = {fact.source_record_id: fact for fact in facts}

assert package.package_id == "jct-tax-expenditures-2024"
assert len(cells) == 30
assert len(cells) == 60
assert validate_source_cells(cells).valid
assert len(records) == 5
assert len(facts) == 5
assert len(records) == 11
assert len(facts) == 11
assert validate_facts(facts).valid
assert validate_consumer_fact_contract(facts).valid
assert len(consumer_rows) == 5
assert len(consumer_rows) == 11
assert all(fact.source.source_name == "jct" for fact in facts)
assert all(fact.source.raw_r2_uri for fact in facts)

Expand All @@ -1173,6 +1173,13 @@ def test_jct_tax_expenditure_package_builds_selected_individual_facts():
"jct.tax_expenditures.cy2024.charitable_deduction.revenue_loss": 60_400_000_000,
"jct.tax_expenditures.cy2024.deductible_mortgage_interest.revenue_loss": 24_800_000_000,
"jct.tax_expenditures.cy2024.qualified_business_income_deduction.revenue_loss": 63_100_000_000,
# JCX-48-24 extension (populace#514 anchors), FY2024 individuals column:
"jct.tax_expenditures.cy2024.self_employed_health_insurance_deduction.revenue_loss": 8_400_000_000,
"jct.tax_expenditures.cy2024.health_savings_account_deduction.revenue_loss": 12_200_000_000,
"jct.tax_expenditures.cy2024.student_loan_interest_deduction.revenue_loss": 2_400_000_000,
"jct.tax_expenditures.cy2024.self_employed_pension_contribution_deduction.revenue_loss": 16_600_000_000,
"jct.tax_expenditures.cy2024.traditional_ira_deduction.revenue_loss": 16_000_000_000,
"jct.tax_expenditures.cy2024.cdcc_and_employer_child_care_exclusion.revenue_loss": 5_600_000_000,
}
assert {record.source_record_id for record in records} == set(expected_values)
assert {
Expand Down
Loading