← All datasets

Air Quality

US air quality by county since 1980 in one free CSV download: 42,534 county-years from 1980 through 2025, one row per county per year, from the EPA AirData annual AQI summaries (public domain). Rows carry days measured, the full AQI day ladder (good, moderate, unhealthy for sensitive groups, unhealthy, very unhealthy, hazardous), a combined unhealthy-plus count and percent good days, max and median AQI, and days attributed to each pollutant: ozone, PM2.5, PM10, NO2 and CO. Two giant stories live in one table. The 45-year cleanup: Los Angeles logged 206 unhealthy-or-worse days in 1980 and 29 in 2019, pinned by test. And the wildfire reversal: in 2020 hazardous air returned to Oregon, California and Washington at AQI levels past 500 after decades of progress. The PM2.5 columns also date the monitoring network itself, a trickle of early monitors before 1999 and the national backbone after. Joins the county cluster (County Population, County Income), Wildfire Acres and Drought Monitor topics. Eight acceptance tests, one enforcing the 25 percent fill rule on every column.
42,534 rows 1 file last pulled 2026-11-23
Where would you start?
Pick a question, or ask your own and answer it; publish what you find as an insight. The same question can carry many insights from different angles.
  • Which county improved the most since 1980?
  • Did wildfire smoke erase decades of air gains in the West? Quantify it.
  • Where is ozone still the dominant pollutant versus PM2.5?
Air Quality by County 42,534 rows × 19 columns
StateCountyYearDays_MeasuredGood_DaysModerate_DaysSensitive_Groups_DaysUnhealthy_DaysVery_Unhealthy_DaysHazardous_DaysUnhealthy_Plus_DaysPct_Good_DaysMax_AQIMedian_AQIOzone_DaysPM25_DaysPM10_DaysNO2_DaysCO_Days

Questions and answers

What is the Air Quality dataset?

US air quality by county since 1980 in one free CSV download: 42,534 county-years from 1980 through 2025, one row per county per year, from the EPA AirData annual AQI summaries (public domain). Rows carry days measured, the full AQI day ladder (good, moderate, unhealthy for sensitive groups, unhealthy, very unhealthy, hazardous), a combined unhealthy-plus count and percent good days, max and median AQI, and days attributed to each pollutant: ozone, PM2.5, PM10, NO2 and CO. Two giant stories live in one table. The 45-year cleanup: Los Angeles logged 206 unhealthy-or-worse days in 1980 and 29 in 2019, pinned by test. And the wildfire reversal: in 2020 hazardous air returned to Oregon, California and Washington at AQI levels past 500 after decades of progress. The PM2.5 columns also date the monitoring network itself, a trickle of early monitors before 1999 and the national backbone after. Joins the county cluster (County Population, County Income), Wildfire Acres and Drought Monitor topics. Eight acceptance tests, one enforcing the 25 percent fill rule on every column.

How big is the Air Quality dataset?

42,534 rows in one CSV file, with 19 columns in total: State, County, Year, Days_Measured, Good_Days, Moderate_Days, Sensitive_Groups_Days, Unhealthy_Days, Very_Unhealthy_Days, Hazardous_Days, Unhealthy_Plus_Days, Pct_Good_Days, Max_AQI, Median_AQI, Ozone_Days, PM25_Days, PM10_Days, NO2_Days, CO_Days.

Where does the data come from?

It is built by programmatically scraping aqs.epa.gov, last pulled on 2026-11-23. Datasets are versioned; older versions stay downloadable.

Is the dataset free to download?

Yes. Every CodeSights dataset is completely free as a CSV download; a free account is all it takes. Anyone can preview the data without signing in.

Can I see the code that built this dataset?

Yes. The exact Python scraper that built it is viewable on the dataset page by any signed-in member, so every number is reproducible.

Can the data contain errors?

Automated scraping leaves room for error and the underlying sources change over time, so no version is guaranteed accurate or complete. If a number matters, verify it against the original source.

Browse every free dataset on CodeSights