Skip to content

Commit 2caef71

Browse files
authored
Add IRS SOI Historic Table 2 source package (#17)
1 parent 33930b8 commit 2caef71

6 files changed

Lines changed: 1648 additions & 9 deletions

File tree

arch/source_package.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@
8080
"irs_soi/table_2_5_eitc_agi_children_2022"
8181
),
8282
"soi-table-4-3": Path("irs_soi/table_4_3"),
83+
"soi-historic-table-2": Path("irs_soi/historic_table_2"),
8384
"soi-historic-table-2-state-agi-2022": Path(
8485
"irs_soi/historic_table_2_state_agi_2022"
8586
),

db/data/irs_soi/historic_table_2/20in55cmcsv.csv

Lines changed: 595 additions & 0 deletions
Large diffs are not rendered by default.

db/data/irs_soi/historic_table_2/21in55cmcsv.csv

Lines changed: 595 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 358 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,358 @@
1+
schema_version: arch.source_package.v1
2+
package_id: soi-historic-table-2
3+
label: IRS SOI Historic Table 2 national AGI and tax-credit records
4+
artifact:
5+
source_name: irs_soi
6+
source_table: Historic Table 2
7+
resource_package: db
8+
resource_directory: data/irs_soi/historic_table_2
9+
manifest: manifest.yaml
10+
vintage: tax_year_2022
11+
extracted_at: "2026-05-09"
12+
extraction_method: full CSV row parse with selected source-record cells
13+
parser: delimited_text_full_rows
14+
sheet_name: in55cmcsv
15+
artifact_year: 2022
16+
selected_rows:
17+
- STATE: US
18+
AGI_STUB: 0
19+
- STATE: US
20+
AGI_STUB: 1
21+
- STATE: US
22+
AGI_STUB: 2
23+
- STATE: US
24+
AGI_STUB: 3
25+
- STATE: US
26+
AGI_STUB: 4
27+
- STATE: US
28+
AGI_STUB: 5
29+
- STATE: US
30+
AGI_STUB: 6
31+
- STATE: US
32+
AGI_STUB: 7
33+
- STATE: US
34+
AGI_STUB: 8
35+
- STATE: US
36+
AGI_STUB: 9
37+
- STATE: US
38+
AGI_STUB: 10
39+
record_sets:
40+
- record_set_id: irs_soi.ty2022.historic_table_2.us
41+
record_set_spec_id: irs_soi.historic_table_2.us.v1
42+
source_record_id_prefix: irs_soi.ty2022.historic_table_2.us
43+
sheet_name: in55cmcsv
44+
period_type: tax_year
45+
period: 2022
46+
geography_id: 0100000US
47+
geography_level: country
48+
geography_name: United States
49+
geography_vintage: 2020_census
50+
entity: tax_unit
51+
entity_role: filing_unit
52+
domain: all_individual_income_tax_returns
53+
groupby_dimension: us:statutes/26/62#adjusted_gross_income
54+
rows:
55+
- value_id: all
56+
label: All returns
57+
ordinal: 0
58+
row_number: 2
59+
expected_row_header_column: B
60+
expected_row_header: 0
61+
filters:
62+
filing_status: all
63+
income_range: all
64+
table_record_kind: total
65+
- value_id: under_1
66+
label: No adjusted gross income
67+
ordinal: 1
68+
row_number: 3
69+
expected_row_header_column: B
70+
expected_row_header: 1
71+
filters:
72+
filing_status: all
73+
income_range: under_1
74+
constraints:
75+
- variable: us:statutes/26/62#adjusted_gross_income
76+
operator: <
77+
value: 1
78+
unit: usd
79+
label: Adjusted gross income upper bound
80+
- value_id: 1_to_10k
81+
label: $1 under $10,000
82+
ordinal: 2
83+
row_number: 4
84+
expected_row_header_column: B
85+
expected_row_header: 2
86+
filters:
87+
filing_status: all
88+
income_range: 1_to_10k
89+
constraints:
90+
- variable: us:statutes/26/62#adjusted_gross_income
91+
operator: ">="
92+
value: 1
93+
unit: usd
94+
label: Adjusted gross income lower bound
95+
- variable: us:statutes/26/62#adjusted_gross_income
96+
operator: <
97+
value: 10000
98+
unit: usd
99+
label: Adjusted gross income upper bound
100+
- value_id: 10k_to_25k
101+
label: $10,000 under $25,000
102+
ordinal: 3
103+
row_number: 5
104+
expected_row_header_column: B
105+
expected_row_header: 3
106+
filters:
107+
filing_status: all
108+
income_range: 10k_to_25k
109+
constraints:
110+
- variable: us:statutes/26/62#adjusted_gross_income
111+
operator: ">="
112+
value: 10000
113+
unit: usd
114+
label: Adjusted gross income lower bound
115+
- variable: us:statutes/26/62#adjusted_gross_income
116+
operator: <
117+
value: 25000
118+
unit: usd
119+
label: Adjusted gross income upper bound
120+
- value_id: 25k_to_50k
121+
label: $25,000 under $50,000
122+
ordinal: 4
123+
row_number: 6
124+
expected_row_header_column: B
125+
expected_row_header: 4
126+
filters:
127+
filing_status: all
128+
income_range: 25k_to_50k
129+
constraints:
130+
- variable: us:statutes/26/62#adjusted_gross_income
131+
operator: ">="
132+
value: 25000
133+
unit: usd
134+
label: Adjusted gross income lower bound
135+
- variable: us:statutes/26/62#adjusted_gross_income
136+
operator: <
137+
value: 50000
138+
unit: usd
139+
label: Adjusted gross income upper bound
140+
- value_id: 50k_to_75k
141+
label: $50,000 under $75,000
142+
ordinal: 5
143+
row_number: 7
144+
expected_row_header_column: B
145+
expected_row_header: 5
146+
filters:
147+
filing_status: all
148+
income_range: 50k_to_75k
149+
constraints:
150+
- variable: us:statutes/26/62#adjusted_gross_income
151+
operator: ">="
152+
value: 50000
153+
unit: usd
154+
label: Adjusted gross income lower bound
155+
- variable: us:statutes/26/62#adjusted_gross_income
156+
operator: <
157+
value: 75000
158+
unit: usd
159+
label: Adjusted gross income upper bound
160+
- value_id: 75k_to_100k
161+
label: $75,000 under $100,000
162+
ordinal: 6
163+
row_number: 8
164+
expected_row_header_column: B
165+
expected_row_header: 6
166+
filters:
167+
filing_status: all
168+
income_range: 75k_to_100k
169+
constraints:
170+
- variable: us:statutes/26/62#adjusted_gross_income
171+
operator: ">="
172+
value: 75000
173+
unit: usd
174+
label: Adjusted gross income lower bound
175+
- variable: us:statutes/26/62#adjusted_gross_income
176+
operator: <
177+
value: 100000
178+
unit: usd
179+
label: Adjusted gross income upper bound
180+
- value_id: 100k_to_200k
181+
label: $100,000 under $200,000
182+
ordinal: 7
183+
row_number: 9
184+
expected_row_header_column: B
185+
expected_row_header: 7
186+
filters:
187+
filing_status: all
188+
income_range: 100k_to_200k
189+
constraints:
190+
- variable: us:statutes/26/62#adjusted_gross_income
191+
operator: ">="
192+
value: 100000
193+
unit: usd
194+
label: Adjusted gross income lower bound
195+
- variable: us:statutes/26/62#adjusted_gross_income
196+
operator: <
197+
value: 200000
198+
unit: usd
199+
label: Adjusted gross income upper bound
200+
- value_id: 200k_to_500k
201+
label: $200,000 under $500,000
202+
ordinal: 8
203+
row_number: 10
204+
expected_row_header_column: B
205+
expected_row_header: 8
206+
filters:
207+
filing_status: all
208+
income_range: 200k_to_500k
209+
constraints:
210+
- variable: us:statutes/26/62#adjusted_gross_income
211+
operator: ">="
212+
value: 200000
213+
unit: usd
214+
label: Adjusted gross income lower bound
215+
- variable: us:statutes/26/62#adjusted_gross_income
216+
operator: <
217+
value: 500000
218+
unit: usd
219+
label: Adjusted gross income upper bound
220+
- value_id: 500k_to_1m
221+
label: $500,000 under $1,000,000
222+
ordinal: 9
223+
row_number: 11
224+
expected_row_header_column: B
225+
expected_row_header: 9
226+
filters:
227+
filing_status: all
228+
income_range: 500k_to_1m
229+
constraints:
230+
- variable: us:statutes/26/62#adjusted_gross_income
231+
operator: ">="
232+
value: 500000
233+
unit: usd
234+
label: Adjusted gross income lower bound
235+
- variable: us:statutes/26/62#adjusted_gross_income
236+
operator: <
237+
value: 1000000
238+
unit: usd
239+
label: Adjusted gross income upper bound
240+
- value_id: 1m_plus
241+
label: $1,000,000 or more
242+
ordinal: 10
243+
row_number: 12
244+
expected_row_header_column: B
245+
expected_row_header: 10
246+
filters:
247+
filing_status: all
248+
income_range: 1m_plus
249+
constraints:
250+
- variable: us:statutes/26/62#adjusted_gross_income
251+
operator: ">="
252+
value: 1000000
253+
unit: usd
254+
label: Adjusted gross income lower bound
255+
measures:
256+
- measure_id: return_count
257+
label: Number of returns
258+
ordinal: 0
259+
column: C
260+
concept: irs_soi.individual_income_tax_returns
261+
unit: count
262+
aggregation: count
263+
- measure_id: tax_filer_individual_count
264+
label: Number of individuals
265+
ordinal: 1
266+
column: L
267+
concept: irs_soi.tax_filer_individuals
268+
unit: count
269+
aggregation: count
270+
- measure_id: adjusted_gross_income
271+
label: Adjusted gross income
272+
ordinal: 2
273+
column: T
274+
concept: us:statutes/26/62#adjusted_gross_income
275+
source_concept: irs_soi.adjusted_gross_income
276+
concept_relation: exact
277+
concept_authority: arch-us
278+
concept_evidence_url: https://uscode.house.gov/view.xhtml?req=(title:26%20section:62%20edition:prelim)
279+
concept_evidence_notes: IRS SOI Historic Table 2 reports adjusted gross income for individual income tax returns; IRC section 62 defines adjusted gross income. This Arch assertion treats the SOI AGI column as exactly adopting that legal concept for the tax-year source record.
280+
legal_vintage: tax_year_{year}
281+
unit: usd
282+
aggregation: sum
283+
value_scale: 1000
284+
- measure_id: income_tax_before_credits_returns
285+
label: Returns with income tax before credits
286+
ordinal: 3
287+
column: CX
288+
concept: irs_soi.returns_with_income_tax_before_credits
289+
unit: count
290+
aggregation: count
291+
- measure_id: income_tax_before_credits_amount
292+
label: Income tax before credits
293+
ordinal: 4
294+
column: CY
295+
concept: irs_soi.income_tax_before_credits
296+
unit: usd
297+
aggregation: sum
298+
value_scale: 1000
299+
- measure_id: premium_tax_credit_returns
300+
label: Returns with premium tax credit
301+
ordinal: 5
302+
column: DT
303+
concept: irs_soi.returns_with_premium_tax_credit
304+
unit: count
305+
aggregation: count
306+
- measure_id: premium_tax_credit_amount
307+
label: Premium tax credit
308+
ordinal: 6
309+
column: DU
310+
concept: irs_soi.premium_tax_credit
311+
unit: usd
312+
aggregation: sum
313+
value_scale: 1000
314+
- measure_id: eitc_claims
315+
label: Returns with earned income credit
316+
ordinal: 7
317+
column: DZ
318+
concept: irs_soi.returns_with_earned_income_credit
319+
unit: count
320+
aggregation: count
321+
- measure_id: eitc_amount
322+
label: Earned income credit
323+
ordinal: 8
324+
column: EA
325+
concept: irs_soi.earned_income_credit
326+
unit: usd
327+
aggregation: sum
328+
value_scale: 1000
329+
- measure_id: real_estate_taxes_claims
330+
label: Returns with real estate taxes
331+
ordinal: 9
332+
column: BZ
333+
concept: irs_soi.returns_with_real_estate_taxes
334+
unit: count
335+
aggregation: count
336+
- measure_id: real_estate_taxes_amount
337+
label: Real estate taxes
338+
ordinal: 10
339+
column: CA
340+
concept: irs_soi.real_estate_taxes
341+
unit: usd
342+
aggregation: sum
343+
value_scale: 1000
344+
- measure_id: limited_state_local_taxes_returns
345+
label: Returns with limited state and local taxes
346+
ordinal: 11
347+
column: CB
348+
concept: irs_soi.returns_with_limited_state_local_taxes
349+
unit: count
350+
aggregation: count
351+
- measure_id: limited_state_local_taxes_amount
352+
label: Limited state and local taxes
353+
ordinal: 12
354+
column: CC
355+
concept: irs_soi.limited_state_local_taxes
356+
unit: usd
357+
aggregation: sum
358+
value_scale: 1000

0 commit comments

Comments
 (0)