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.
| Source | Covers | API key | Default location | Best for |
|---|---|---|---|---|
| Open-Meteo | Forecasts, history, air quality, marine, climate projections | None (non-commercial) | Berlin | Weather history and forecasts anywhere |
| NASA POWER | Satellite meteorology and solar data | None | Ames, Iowa | Solar and wind site screening |
| NOAA | Station observations worldwide, US forecasts and alerts | None | New York Central Park | Long station records, US alerts |
| OpenWeather | Forecasts and air pollution | Required | London | Air pollution history, One Call forecasts |
| USDA NASS | US crop, livestock and price statistics | Required (free) | United States | US yields and prices |
| FAOSTAT | Production, yields, land use, climate by country | Token | World | Global 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.
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.
| Template | Resolution | Range | Variables |
|---|---|---|---|
| Daily weather forecast | Daily | Next 16 days | Max/min temperature, precipitation and its probability, wind, sunshine duration |
| Hourly weather forecast | Hourly | Next 7 days | Temperature, humidity, precipitation, cloud cover, wind, solar radiation |
| Historical daily weather (ERA5) | Daily | 2015 to 2024 | Mean, max and min temperature, precipitation, wind |
| Air quality | Hourly | Past 7 days + 5-day forecast | PM10, PM2.5, nitrogen dioxide, ozone, European AQI |
| Marine forecast | Hourly | Forecast | Wave height, direction and period, swell height |
| Climate projection (CMIP6) | Daily | 2000 to 2050 | Downscaled 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.
| Template | Resolution | Variables |
|---|---|---|
| Agroclimatology | Daily | Temperature, precipitation and humidity |
| Renewable energy, solar | Daily | All-sky and clear-sky surface irradiance (kWh/m²/day), clearness index |
| Wind | Daily | Wind speed at 10 m and 50 m, with direction |
| Hourly temperature and solar irradiance | Hourly, UTC | One 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.
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.
| Template | Service | Range | Variables |
|---|---|---|---|
| Daily weather observations (GHCN-Daily) | NCEI | 2020 to 2024 | Max and min temperature, precipitation, snowfall |
| Monthly climate summaries (GSOM) | NCEI | 1990 onward | Average temperatures, total precipitation |
| Annual climate summaries (GSOY) | NCEI | 1950 onward | Same, at annual resolution |
| 7-day forecast | National Weather Service | Next 7 days | Day and night periods with temperature, wind and a text summary |
| Hourly forecast | National Weather Service | Forecast | Temperature, wind, humidity, precipitation chance |
| Active weather alerts by state | National Weather Service | Current | Watches, 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.
| Template | Range | Key requirement |
|---|---|---|
| 5-day, 3-hour forecast | Next 5 days | Standard key |
| Air pollution forecast (hourly) | About 4 days | Standard key |
| Air pollution history (hourly) | Between two Unix timestamps | Standard key |
| Current air pollution | Now | Standard key |
| One Call 3.0, daily forecast | Next 8 days | One Call API 3.0 subscription |
| One Call 3.0, hourly forecast | Next 48 hours | One 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.
| Template | Frequency | Unit | Numeric tests run? |
|---|---|---|---|
| Corn yield, US | Annual, since 2000 | bushels/acre | Yes |
| Corn yield by state | Annual | bushels/acre | Yes |
| Soybean yield by state | Annual | bushels/acre | Yes |
| Wheat production, US | Annual | bushels | Not yet, see below |
| Corn price received, US | Monthly, since 2010 | $/bushel | Yes |
| Cattle inventory, US (January 1) | Annual, since 2000 | head | Not 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.
| Template | Scope |
|---|---|
| Wheat production | World and top producers |
| Maize yield | Major producers |
| Rice production | Major Asian producers |
| Soybean production | Major producers |
| Crop area harvested | World, 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.
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 to | Start with | Key needed |
|---|---|---|
| Explain past sales with weather | Open-Meteo historical (ERA5) | No |
| Plan the next two weeks | Open-Meteo daily forecast | No |
| Compare solar or wind sites | NASA POWER | No |
| Use a long, official station record | NOAA GSOM or GSOY | No |
| Track US crop yields and prices | USDA NASS | Yes, free |
| Compare agriculture across countries | FAOSTAT | Yes, 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.
