Skip to content

Add IRS filing-season snapshots and annual geographic and W-2 data - #444

Closed
MaxGhenis wants to merge 4 commits into
mainfrom
us-filing-season-2025-refresh
Closed

MaxGhenis wants to merge 4 commits into
mainfrom
us-filing-season-2025-refresh

Conversation

@MaxGhenis

Copy link
Copy Markdown
Contributor

Sources

Chronicle can now compare the IRS filing seasons for tax years 2024 and 2025 through the same processing cycle. It also adds the IRS’s 2023 geographic data and three years of Form W-2 statistics.

IRS source Coverage
Filing-season Table 1 Cycles 21 and 30 for tax years 2024 and 2025. Each workbook reports 116 counts and amounts for all returns and 16 adjusted gross income bands. Each observation carries the IRS processing cutoff.
County data and congressional district data The county file supplies return counts and adjusted gross income for IRS county reporting areas. The district file supplies selected income and tax items by congressional district.
Form W-2 Table 4.B The 2021–23 workbooks report counts of returns and taxpayers with Social Security tips, dollar amounts for those tips, and traditional and Roth 401(k) contributions.

Verification

  • Compared all 7,888 filing-season observations with their workbook cells, including the conversion from thousands of dollars to dollars.
  • Retrieved all nine archived source files from R2 and matched each file’s SHA-256 and byte count to the publisher copy.
  • Built the seven packages together using the 2023 W-2 table. The bundle produced 44,001 facts and zero duplicate keys. Separate builds cover W-2 for 2021 and 2022.
  • Checked the global dimension-value register and ran 90 source, registration and regression tests.

Chronicle governance

Codex used the ledger-source-ingestor role. The filing-season tables count returns the IRS had initially processed by each cutoff. Consumers can choose how to use these filing-season counts alongside annual figures.

This draft awaits the ledger-source-fidelity and ledger-boundary reviews. The independent review job is 20261118-081851-review.

@MaxGhenis
MaxGhenis marked this pull request as ready for review November 19, 2026 01:34
juaristi22 pushed a commit that referenced this pull request Nov 27, 2026
…t, W-2) into the US vintage branch

Brings in Max Ghenis's branch of #444 at 2b10454:
seven IRS SOI packages (soi-congressional-district-2023, soi-county-2023,
the filing-season tables for cycles 21 and 30 of tax years 2024 and 2025,
and soi-w2-statistics for TY2021 to TY2023), their raw files and tests
(chronicle#449).

Conflicts:
- chronicle/source_package.py: both alias sets kept
  (soi-historic-table-2-state-eitc-2023 and soi-w2-statistics).
- chronicle/dimension_values/canonical_labels.json: the union of both
  registers, written with scripts/build_dimension_value_register.py
  (3,625 values from #444, no value labelled two ways); the static check
  finds no problem.
- tests/test_chronicle_bundle.py: this branch's file kept. Every #444 change
  to it was a pin (counts, new table and geography pins, and their
  comments); the default bundle is re-pinned separately.

No conflict in chronicle/sources/admin_packages.py (only #444 changed it):
admin_packages --check regenerates soi-county-2022 and soi-county-2023
byte for byte. .gitattributes takes #444's two lines, which mark the
TY2023 county and district CSVs binary.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
juaristi22 pushed a commit that referenced this pull request Nov 27, 2026
…ronicle#449)

soi-congressional-district-2023 now reads what chronicle#448 added to the
TY2022 district package, from 23incd.csv:

- 45 more columns in the all-returns record set, at its 481 rows: the 15
  columns whose state twin Historic Table 2's state package reads, and the
  30 columns without a state twin. Each keeps the TY2022 measure id, label,
  concept, unit and scale, and reads the column of the same IRS variable.
  The TY2023 guide defines all 45 the same way; for N03150 it spells out
  "Individual Retirement Account (IRA) payments", now a listed wording.
  The wage measure's legal vintage and evidence page name TY2023.
- Returns and AGI (N1, A00100) in the nine AGI classes, one record set
  each, at the 51 state and 429 district rows, with the TY2022 class
  filters and AGI bounds. Classes 1 to 8 are those of Historic Table 2's
  TY2023 state package; class 9 is its 500k_to_1m and 1m_plus together.
  The class selections come after the 481 all-class selections, so the
  existing facts keep their cells.

+30,285 facts (60,107 in all). The package label, class labels and
extraction method follow the TY2022 package.

The TY2023 guide says "District boundaries are based on the 118th
Congress." (the TY2022 guide: the 117th). The package keeps #444's
118th-Congress scheme: 5001800US GEOIDs and the 118th_congress vintage, and
its own record_set_spec_ids (all_returns and the new agi_class), so its
facts are a new series and no district key is a 117th-Congress key.
tests/data/irs_soi_doc_guides/incddocguide_district_boundaries.tsv quotes
both guides, and a test checks each package's GEOIDs, vintage and
one-district states against them.

Checks on 23incd.csv: the nine classes add up exactly to the all-class row
in all 480 rows; stub 9's mean AGI is above $1,000,000 in 470 of them (the
guide's stubs 9 and 10 together, as in TY2022); every class has 70 or more
returns in every row; every measure nests from districts (44 states with
more than one) to states to the US row. The US row is 0.949 to 1.000 of
Historic Table 2's for 54 of 55 pairs.

The 55th is the EITC amount: in every row of 23incd.csv, A59660 is the sum
of A59661 to A59664, and A59664 is in dollars while the others are in
thousands. The US EITC amount reads as $15.3 trillion (Historic Table 2:
$65.0 billion). The package still reads the cell as published; a test pins
the sum, and the question goes to María.

Tests: the AGI-class tests now run for both years; new tests check the
118th-Congress scheme and the copied identities; #444's district test
selects the all-returns record set.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
juaristi22 pushed a commit that referenced this pull request Nov 27, 2026
Brings in #444 (IRS filing-season snapshots for
weeks 21 and 30 of the 2025 and 2026 seasons, TY2023 county and
congressional district data, W-2 statistics for TY2021 to TY2023). The
TY2023 district package uses the 118th Congress districts that its guide
names, as its own series, and gets the record sets that #448 gave TY2022.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
juaristi22 pushed a commit that referenced this pull request Nov 27, 2026
chronicle publish-raw uploaded them on 2026-11-27 and chronicle verify-raw
found each object with its sha256 and size: the SSI December 2025 page
and CSV, the Z.1 page of 2026-06-11, the SNAP -11 zip under the FY2024
package's key, and CMS's 2025 annual effectuated enrollment CSV.
verify-raw also finds the nine raw files of #444.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
juaristi22 pushed a commit that referenced this pull request Nov 27, 2026
BEA's in-place editions remove 445 duplicate facts and five packages.
SSI December 2025 adds 4 facts, one package, one table and the period key
month:2025-12. CMS's 2025 package has no 2023 artifact and is skipped.
#444 adds 73,805 tax-unit facts, seven packages,
three tables, 429 geography keys and 3,454 semantic duplicate keys shared
with other IRS publications. New totals: facts 2,423,575, packages 538,
skipped 40, tables 467, periods 620, duplicate keys 9,373.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@juaristi22

Copy link
Copy Markdown
Collaborator

This PR continues in #451, one PR for the US part of #449 that also carries #295, #296 and the later editions of the other feed sources.

Its four commits are in #451 unchanged. After them, two commits change the TY2023 district package:

  • It gets the record sets that Add US district facts: IRS district-file extensions and ACS 2024 district tables (#447) #448 gave TY2022: the 15 state-twin columns, the 30 columns without a state twin and the nine AGI classes. The TY2023 guide defines all 45 columns as the TY2022 guide does.
  • It leaves out the EITC total A59660. In every row of 23incd.csv, A59660 equals A59661 + A59662 + A59663 + A59664, but A59664 is in dollars and the other three are in thousands, so the US total reads $15.3 trillion (Historic Table 2 TY2023: $65.0 billion). The four child columns stay as published, and a test keeps checking the file's sum.

The TY2023 guide says "District boundaries are based on the 118th Congress.", so the district facts keep this PR's 118th Congress geography ids and form their own series. #451 re-pins the bundle for the combined branch. Its judges' record: #451 (comment)

Closing this PR in favor of #451.

@juaristi22 juaristi22 closed this Nov 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants