Time series · county-aqi-daily

Daily air quality index by county

The daily Air Quality Index (AQI) for every US county with an EPA monitor, from 1980 to yesterday. Rows up to EPA's latest AirData release are validated (validated: true). Later days are preliminary (validated: false): EPA AirNow data from federal, state, local and tribal agencies, not yet verified and subject to change. For those days the county AQI is a derived value calculated by airdata.dev as the highest site AQI reported to AirNow in the county that day, the way EPA summarizes a county; the site AQI values themselves are as received. Preliminary days cover ozone, PM2.5, PM10 and CO only. A preliminary row never replaces a validated one.

Updates
Daily
Coverage
—
Current version
—
Last published
—
Validation
—
License
US Government work + AirNow Data Exchange Guidelines
Commercial use
Allowed

Chart

Daily air quality index by county

Loading the chart…
Source: US EPA (AirData, AirNow) and the AirNow partner agencies.
Show the data as a table

The table appears once the data has loaded.

Use the API

Each series and location is its own small file. The examples follow the series and location picked above. See the docs for versions, caching and errors.

curl

# One series for one place (.json or .csv)
curl -s "https://api.airdata.dev/v1/county-aqi-daily/aqi/us-county-09001.json"

# Every series and place in one file
curl -sO "https://api.airdata.dev/v1/county-aqi-daily/download/county-aqi-daily.csv"

Python (polars)

import polars as pl

# One series for one place
df = pl.read_csv("https://api.airdata.dev/v1/county-aqi-daily/aqi/us-county-09001.csv")

# Every series and place, with series and location columns
everything = pl.read_parquet("https://api.airdata.dev/v1/county-aqi-daily/download/county-aqi-daily.parquet")

JavaScript

const res = await fetch("https://api.airdata.dev/v1/county-aqi-daily/aqi/us-county-09001.json");
if (!res.ok) throw new Error((await res.json()).detail); // errors are problem+json
const { meta, data } = await res.json();
console.log(meta.location_name, data.at(-1)); // { date, value, ... }

Downloads

The whole dataset in one file, with series and location columns. Parquet keeps the column types and is much smaller.

Schema and series

Each series file has these columns. The bulk downloads add series and location columns in front.

Column Type Unit Can be empty Description
date date (YYYY-MM-DD) — no Local calendar day (midnight to midnight local standard time)
aqi integer AQI no The county's AQI: the highest daily AQI among its monitors. AirData values above 500 (extreme dust events) are kept as published
category text — no EPA AQI category: Good, Moderate, Unhealthy for Sensitive Groups, Unhealthy, Very Unhealthy or Hazardous
defining_parameter text — no Pollutant behind the county AQI: Ozone, PM2.5, PM10, CO, NO2 or SO2
defining_site text — no Monitoring site behind the county AQI, as an AQS id (SS-CCC-NNNN) or, for tribal AirNow sites, the AirNow id
sites_reporting integer — no Number of monitoring sites in the county with an AQI that day
validated true / false — no true for EPA AirData (validated AQS data); false for preliminary AirNow data

Series

Series id Name
aqi Daily AQI

Locations

Covers all 3,222 US counties and equivalents (ids: us-county- plus the 5-digit FIPS code); 15 more named places.

Location id Name
us-county-09001 Fairfield County, CT (former county)
us-county-09003 Hartford County, CT (former county)
us-county-09005 Litchfield County, CT (former county)
us-county-09007 Middlesex County, CT (former county)
us-county-09009 New Haven County, CT (former county)
us-county-09011 New London County, CT (former county)
us-county-09013 Tolland County, CT (former county)
us-county-09015 Windham County, CT (former county)
us-county-02232 Skagway-Hoonah-Angoon Census Area, AK (until 2007)
us-county-02261 Valdez-Cordova Census Area, AK (until 2019)
us-county-02280 Wrangell-Petersburg Census Area, AK (until 2008)
us-county-66010 Guam
us-county-78010 St. Croix Island, VI
us-county-78020 St. John Island, VI
us-county-78030 St. Thomas Island, VI

Place names come from the shared location registry; see Sources.

Source and license

Source
EPA AirData daily AQI by county (validated) and EPA AirNow daily data files (preliminary)
Publisher
US EPA (AirData, AirNow) and the AirNow partner agencies
License
US Government work (public domain in the United States) and AirNow Data Exchange Guidelines (LicenseRef-US-Government-Work AND LicenseRef-AirNow-Data-Exchange-Guidelines)
Commercial use
Allowed

Credit the source with this exact text:

Validated data: US Environmental Protection Agency. Air Quality System Data Mart [internet database] available via https://www.epa.gov/outdoor-air-quality-data. Accessed on this version's retrieval date. Preliminary data (validated: false): courtesy of the federal, state, local and tribal air quality agencies that own the data (https://www.airnow.gov/partners/) and the EPA AirNow program. These data are preliminary: not fully verified or validated, and subject to change. Preliminary county AQI values are derived by airdata.dev as the highest site AQI in the county; site values are as received from AirNow.

Checked every 1 day. If the source hasn't changed in 4 days, the status page flags it as stale.

Endpoints

Every URL for this dataset. To pin the current version, put it after the id: /v1/county-aqi-daily@<version>. The API reference describes each response.

What URL
Metadata: version, coverage, downloads, validation /v1/county-aqi-daily
Versions and monthly snapshots /v1/county-aqi-daily/versions
Series and locations /v1/county-aqi-daily/locations
Daily AQI (JSON) /v1/county-aqi-daily/aqi/{location}.json
Daily AQI (CSV) /v1/county-aqi-daily/aqi/{location}.csv
Whole dataset (CSV) /v1/county-aqi-daily/download/county-aqi-daily.csv
Whole dataset (Parquet) /v1/county-aqi-daily/download/county-aqi-daily.parquet