Check the setup
- Python 3.10 or newer
- A notebook environment such as Jupyter or Google Colab
- An internet connection
Statistics of Income tables on individual and business tax returns for building income, filing, and geographic tax-profile tools.
From source to product signal
SOI publishes aggregated individual-income tables, including ZIP-code products. Start with one state's ZIP-code AGI table. These are tabulated tax returns, not household surveys, and ZIP totals can be suppressed for disclosure.
Install the packages, then run the notebook cell.
python -m pip install pandas
import pandas as pd
soi = pd.read_csv(
"https://www.irs.gov/pub/irs-soi/22zpallagi.csv",
nrows=200,
)
print(soi.head())Test a useful signal
Test whether a SOI ZIP extract can power a bounded local-income sketch.
Internal Revenue Service is a government source. Last verified 2026-08-18. Temporal coverage: tax years published in SOI annual and geographic products.