Weather, Climate and Agriculture Connectors in QuantumLayers

Forecasts, historical weather, solar and wind resource data, air quality, crop yields and livestock counts. QuantumLayers now has REST API templates for six public sources: Open-Meteo, NASA POWER, NOAA and OpenWeather for weather and climate, and USDA NASS and FAOSTAT for agriculture. Three of them need no API key at all. This guide covers what each source includes, how far back the data goes, the quirks worth knowing before you analyze it, and how to put weather next to your own sales, energy or procurement numbers.


Why Weather Data Explains So Much

Weather drives demand for a long list of businesses: retail, food service, utilities, construction, insurance, tourism, agriculture and anything sold outdoors. It also explains a lot of variance that otherwise gets blamed on marketing, pricing or staffing. A bad week of sales during a cold snap is a weather story, and you can only tell that story if the weather data sits next to the sales data.

SourceCoversAPI keyDefault locationBest for
Open-MeteoForecasts, history, air quality, marine, climate projectionsNone (non-commercial)BerlinWeather history and forecasts anywhere
NASA POWERSatellite meteorology and solar dataNoneAmes, IowaSolar and wind site screening
NOAAStation observations worldwide, US forecasts and alertsNoneNew York Central ParkLong station records, US alerts
OpenWeatherForecasts and air pollutionRequiredLondonAir pollution history, One Call forecasts
USDA NASSUS crop, livestock and price statisticsRequired (free)United StatesUS yields and prices
FAOSTATProduction, yields, land use, climate by countryTokenWorldGlobal agriculture

How to Connect

Open the REST API connection form, pick a service from the Service dropdown, and choose a template. The URL and the response path are pre-filled. If the service needs a key, replace the placeholder in the URL, and the form will not let you submit until you do. Most templates use a default location; edit the latitude and longitude, station ID or region in the URL before saving.

The historical templates also come with a default date range. The chart below shows how much history each one pulls before you change anything.

How far back each template goes Default date range of the historical templates, before you edit the URL Arrows mean the template runs to the latest available year. All ranges can be changed in the URL. 1950 1975 2000 2025 2050 today Open-Meteo historical (ERA5) 2015–2024 Open-Meteo climate projection (CMIP6) 2000–2050 NASA POWER (default year) 2024 NOAA daily observations (GHCN-Daily) 2020–2024 NOAA monthly summaries (GSOM) 1990– NOAA annual summaries (GSOY) 1950– USDA corn yield and cattle inventory 2000– USDA corn price received 2010– FAOSTAT (all templates) 2010–2023

Open-Meteo

Open-Meteo is a free weather API that combines national weather service models into a single interface. No API key is needed for non-commercial use. Commercial use requires one of their paid plans.

TemplateResolutionRangeVariables
Daily weather forecastDailyNext 16 daysMax/min temperature, precipitation and its probability, wind, sunshine duration
Hourly weather forecastHourlyNext 7 daysTemperature, humidity, precipitation, cloud cover, wind, solar radiation
Historical daily weather (ERA5)Daily2015 to 2024Mean, max and min temperature, precipitation, wind
Air qualityHourlyPast 7 days + 5-day forecastPM10, PM2.5, nitrogen dioxide, ozone, European AQI
Marine forecastHourlyForecastWave height, direction and period, swell height
Climate projection (CMIP6)Daily2000 to 2050Downscaled temperature and precipitation

The templates default to Berlin. Change latitude and longitude in the URL for any other point on earth. The historical ERA5 template is the one to start with if you want to explain past performance: ten years of daily data gives the seasonal decomposition and forecasting tests enough history to work with. We ran it for Berlin in Analyze This! Ten Years of Berlin Weather.

NASA POWER

NASA’s Prediction Of Worldwide Energy Resources project provides satellite-derived meteorology and solar data for any location, designed for agriculture, renewable energy and building design. No API key is needed.

TemplateResolutionVariables
AgroclimatologyDailyTemperature, precipitation and humidity
Renewable energy, solarDailyAll-sky and clear-sky surface irradiance (kWh/m²/day), clearness index
WindDailyWind speed at 10 m and 50 m, with direction
Hourly temperature and solar irradianceHourly, UTCOne week

The templates default to Ames, Iowa, and to calendar year 2024. Edit latitude, longitude, start and end as needed. NASA POWER returns each parameter as a map of date to value, and QuantumLayers pivots this into a table with one row per date and one column per parameter.

One map per parameter, one row per date How a NASA POWER response becomes a table Values are placeholders. NASA codes missing values as -999: treat them as gaps, not measurements. “T2M”: { “20240101”: -2.4, “20240102”: -999, … }, “PRECTOTCORR”: { “20240101”: 1.2, “20240102”: 0.0, … } date T2M PRECTOTCORR 2024-01-01 -2.4 1.2 2024-01-02 -999 0.0 … … … gap, not a reading

This is the source to use for solar or wind site screening, or for any analysis where you need the same variables at many locations with consistent methodology. See Analyze This! Ten Years of Solar Irradiance from NASA POWER for a worked example.

NOAA

NOAA is two services in one set of templates. The NCEI Access Data Service provides historical station observations worldwide. The National Weather Service API provides forecasts and alerts for the United States. Neither needs a key.

TemplateServiceRangeVariables
Daily weather observations (GHCN-Daily)NCEI2020 to 2024Max and min temperature, precipitation, snowfall
Monthly climate summaries (GSOM)NCEI1990 onwardAverage temperatures, total precipitation
Annual climate summaries (GSOY)NCEI1950 onwardSame, at annual resolution
7-day forecastNational Weather ServiceNext 7 daysDay and night periods with temperature, wind and a text summary
Hourly forecastNational Weather ServiceForecastTemperature, wind, humidity, precipitation chance
Active weather alerts by stateNational Weather ServiceCurrentWatches, warnings and advisories

The NCEI templates default to New York Central Park (station USW00094728). Swap in any GHCN station ID to change location. For National Weather Service forecasts, look up the forecast office and grid coordinates for your location at https://api.weather.gov/points/{lat},{lon} and put them in the URL.

OpenWeather

OpenWeather is a commercial weather API with a free tier. It needs an API key, and the templates default to London.

TemplateRangeKey requirement
5-day, 3-hour forecastNext 5 daysStandard key
Air pollution forecast (hourly)About 4 daysStandard key
Air pollution history (hourly)Between two Unix timestampsStandard key
Current air pollutionNowStandard key
One Call 3.0, daily forecastNext 8 daysOne Call API 3.0 subscription
One Call 3.0, hourly forecastNext 48 hoursOne Call API 3.0 subscription

USDA NASS Quick Stats

The National Agricultural Statistics Service publishes US crop, livestock and price statistics through its Quick Stats API. It needs a free key. The measurement sits in a column named Value.

TemplateFrequencyUnitNumeric tests run?
Corn yield, USAnnual, since 2000bushels/acreYes
Corn yield by stateAnnualbushels/acreYes
Soybean yield by stateAnnualbushels/acreYes
Wheat production, USAnnualbushelsNot yet, see below
Corn price received, USMonthly, since 2010$/bushelYes
Cattle inventory, US (January 1)Annual, since 2000headNot yet, see below

Yields and prices come back as plain numbers, but large counts such as production in bushels or cattle head are written with thousands separators (15,148,038). QuantumLayers currently reads those as text, so the numeric tests skip them. The yield and price templates are not affected.

FAOSTAT

The Food and Agriculture Organization’s statistics database covers production, yields, land use and climate indicators for every country. It needs a FAOSTAT API token, which goes in the API Key field of the form: the templates use bearer authentication, so the token is not in the URL. All FAO templates cover 2010 to 2023, and areas, items and elements use FAOSTAT’s numeric codes in the URL.

TemplateScope
Wheat productionWorld and top producers
Maize yieldMajor producers
Rice productionMajor Asian producers
Soybean productionMajor producers
Crop area harvestedWorld, major cereals
Temperature change on land (annual)World, anomaly versus 1951 to 1980

Five Ways to Use These Sources

Separate weather effects from everything else

Merge daily sales with daily historical weather for the same location. The correlation and ANOVA tests will show which weather variables matter, and by how much. Once you know that, you can stop treating weather-driven swings as surprises.

A cold snap is a weather story Daily units sold vs daily max temperature, one store, 60 illustrative days Illustrative data. Merge daily sales with the Open-Meteo historical template on the date to build this view. 0 500 1,000 1,500 2,000 0°C 10°C 20°C 30°C Dry day Rain +38 units per °C

In the example, temperature alone explains most of the day-to-day swing, and rain explains much of what is left. A week of sales that looks like a marketing failure turns out to be a week of cold, wet weather. The correlation test puts a number on the first relationship, and ANOVA on a rain or no-rain column puts a number on the second.

Plan staffing and stock from the forecast

Connect a daily forecast template. Because connected datasets refresh automatically, the next 16 days are always current. A scheduled report that combines the forecast with last year’s sales for the same weeks gives store or site managers something concrete to plan against.

Screen renewable sites

Pull NASA POWER solar irradiance or wind speed for several candidate locations and compare them. The seasonal decomposition shows not only the annual total but how concentrated the resource is in a few months.

Watch crop and commodity conditions

Combine USDA corn yields by state with the monthly corn price received, or FAO production figures with your own procurement costs. For food and agribusiness teams, this is the background for every purchasing decision.

Get alerted when conditions change

A monitor on an air quality or forecast dataset can notify you by email, webhook or Slack when the statistical picture changes, for example when a trend appears or an average level shifts. For facilities with outdoor workers or sensitive processes, that is a cheap early warning.

Getting Started

Start with the keyless sources, Open-Meteo, NASA POWER and NOAA, to see how the data looks in QuantumLayers. Then request keys for OpenWeather, USDA NASS or FAOSTAT if you need them.

If you want toStart withKey needed
Explain past sales with weatherOpen-Meteo historical (ERA5)No
Plan the next two weeksOpen-Meteo daily forecastNo
Compare solar or wind sitesNASA POWERNo
Use a long, official station recordNOAA GSOM or GSOYNo
Track US crop yields and pricesUSDA NASSYes, free
Compare agriculture across countriesFAOSTATYes, token

This post is part of a series on the new data connectors in QuantumLayers. See also Economic Data in QuantumLayers: FRED, World Bank and IMF and Energy Data Connectors: EIA and ENTSO-E. Try them at www.quantumlayers.com.