Time series · us-climate
State and national climate
Monthly average, maximum and minimum temperature and precipitation for each US state and the contiguous United States (from 1895; Alaska from 1925, Hawaii from 1991), each with its 1991-2020 normal, the anomaly from that normal and its rank among all years for that calendar month.
- Updates
- Monthly
- Coverage
- —
- Current version
- —
- Last published
- —
- Validation
- —
- License
- US Government work
- Commercial use
- Allowed
Chart
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.climatedata.dev/v1/us-climate/tavg/usa.json"
# Every series and place in one file
curl -sO "https://api.climatedata.dev/v1/us-climate/download/us-climate.csv" Python (polars)
import polars as pl
# One series for one place
df = pl.read_csv("https://api.climatedata.dev/v1/us-climate/tavg/usa.csv")
# Every series and place, with series and location columns
everything = pl.read_parquet("https://api.climatedata.dev/v1/us-climate/download/us-climate.parquet") JavaScript
const res = await fetch("https://api.climatedata.dev/v1/us-climate/tavg/usa.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.
- us-climate.csv CSV
- us-climate.parquet Parquet
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 | month (YYYY-MM) | — | no | — |
| value | number | degF or in | yes | Monthly mean temperature in degrees Fahrenheit, or total precipitation in inches, for the area |
| normal | number | degF or in | yes | NCEI's 1991-2020 average for this area and calendar month (climdiv-norm-*st, period 0010) |
| anomaly | number | degF or in | yes | value minus normal |
| rank | integer | — | yes | Rank of value among all years with data for this area, series and calendar month: 1 is the warmest (or wettest); tied years share the smallest rank number |
Series
| Series id | Name |
|---|---|
| tavg | Average temperature (°F) |
| tmax | Maximum temperature (°F) |
| tmin | Minimum temperature (°F) |
| pcpn | Precipitation (inches) |
Locations
Covers all 57 US states and equivalents (ids: us- plus the USPS code (us-ca, us-dc)); 1 more named place.
| Location id | Name |
|---|---|
| usa | Contiguous United States |
Place names come from the shared location registry; see Sources.
Source and license
- Source
- NOAA Monthly U.S. Climate Divisional Database (nClimDiv), statewide and national files
- Publisher
- NOAA NCEI
- License
- US Government work (public domain in the United States) (
LicenseRef-US-Government-Work) - Commercial use
- Allowed
Credit the source with this exact text:
Vose, Russell S.; Applequist, Scott; Squires, Mike; Durre, Imke; Menne, Matthew J.; Williams, Claude N., Jr.; Fenimore, Chris; Gleason, Karin; Arndt, Derek (2014): NOAA Monthly U.S. Climate Divisional Database (NClimDiv). Statewide and national average, maximum and minimum temperature and precipitation (climdiv-tmpcst, -tmaxcst, -tmincst, -pcpnst) and their 1991-2020 normals (climdiv-norm-*st). NOAA National Climatic Data Center. doi:10.7289/V5M32STR. Accessed on the retrieved_at date of this dataset version.
Checked every 1 day. If the source hasn't changed in 45 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/us-climate@<version>.
The API reference describes each response.
| What | URL |
|---|---|
| Metadata: version, coverage, downloads, validation | /v1/us-climate |
| Versions and monthly snapshots | /v1/us-climate/versions |
| Series and locations | /v1/us-climate/locations |
| Average temperature (°F) (JSON) | /v1/us-climate/tavg/{location}.json |
| Average temperature (°F) (CSV) | /v1/us-climate/tavg/{location}.csv |
| Maximum temperature (°F) (JSON) | /v1/us-climate/tmax/{location}.json |
| Maximum temperature (°F) (CSV) | /v1/us-climate/tmax/{location}.csv |
| Minimum temperature (°F) (JSON) | /v1/us-climate/tmin/{location}.json |
| Minimum temperature (°F) (CSV) | /v1/us-climate/tmin/{location}.csv |
| Precipitation (inches) (JSON) | /v1/us-climate/pcpn/{location}.json |
| Precipitation (inches) (CSV) | /v1/us-climate/pcpn/{location}.csv |
| Whole dataset (CSV) | /v1/us-climate/download/us-climate.csv |
| Whole dataset (Parquet) | /v1/us-climate/download/us-climate.parquet |