NOAA NCEI provides historical station-based weather observations from a global network of stations dating back to 1763. No API key is required.
Data is fetched by station ID rather than spatial coordinates. Station IDs can be found at NOAA’s Station Search.
MetaData("", "Undocumented", :weather, Dict(:SNOW => "Snowfall (mm)", :PRCP => "Precipitation (tenths of mm)", :TSUN => "Total sunshine (minutes)", :SNWD => "Snow depth (mm)", :WSF2 => "Fastest 2-minute wind speed (tenths of m/s)", :TMIN => "Minimum temperature (tenths of °C)", :WSF5 => "Fastest 5-second wind speed (tenths of m/s)", :PSUN => "Percent of possible sunshine (%)", :TMAX => "Maximum temperature (tenths of °C)", :TAVG => "Average temperature (tenths of °C)"…), :point, "Station-based", "Global (station-based)", :timeseries, Day(1), "1763-present", "Public Domain", "https://www.ncei.noaa.gov/support/access-data-service-api-user-documentation", Dict("DataFrames" => "a93c6f00-e57d-5684-b7b6-d8193f3e46c0"))
Example
plan = DataAccessPlan(NOAANCEI(), (-74.0, 40.7),
Date(2024, 1, 1), Date(2024, 1, 7);
stations = ["USW00094728"], # Central Park, NYC
variables = [:TMAX, :TMIN, :PRCP])
plan
DataAccessPlan for noaancei
Extent: 1 station(s): USW00094728
Time: 2024-01-01 to 2024-01-07 (7 days)
Variables: TMAX, TMIN, PRCP
stations: ["USW00094728"]
API calls: 1
Est. size: 168 bytes
Request 1: GET 1 station(s), 7 days → noaancei/4d9fdd1fc40cc0d5.json
files = fetch(plan)
data = JSON.parsefile(files[1])
length(data) # number of records
The extent argument is currently unused for NOAA NCEI — data is fetched by station ID.
Variables
TMAX |
Maximum temperature (tenths of °C) |
TMIN |
Minimum temperature (tenths of °C) |
TAVG |
Average temperature (tenths of °C) |
PRCP |
Precipitation (tenths of mm) |
SNOW |
Snowfall (mm) |
SNWD |
Snow depth (mm) |
AWND |
Average wind speed (tenths of m/s) |
WSF2 |
Fastest 2-minute wind speed (tenths of m/s) |
WDF2 |
Direction of fastest 2-minute wind (°) |
WSF5 |
Fastest 5-second wind speed (tenths of m/s) |
WDF5 |
Direction of fastest 5-second wind (°) |
TSUN |
Total sunshine (minutes) |
PSUN |
Percent of possible sunshine (%) |