As-of Yield

Every number shows only what was knowable on its date.

What it is

A corn and soybean yield estimate for Iowa counties, built from free satellite imagery and weather and scored against the USDA's own numbers. Funds already buy satellite crop data. The hard part is trusting it: was the data really available on that date, can the result be reproduced, and how good was it in past seasons? This app answers each of those on screen.

Two timestamps on every row

Each row records when the satellite or weather station saw it (observed_at) and when it could first have been downloaded (known_at). Every query filters on known_at, so moving the date back hides anything published later. A satellite composite for July 11 to 26 is treated as known 14 days after it ends. A USDA forecast is known at noon Eastern on its release day. Revisions are new rows, never overwrites.

History was rebuilt after the fact, so its known_at times are reconstructed from documented publication lags and the USDA release calendar, and labeled that way. Two leaks remain and are stated here: the satellite archive is today's reprocessed version, and USDA finals are the latest revision.

The data

  • NASA MODIS (Terra, 250 m, 16-day composites, 2001 to 2026) and VIIRS (500 m, 2012 on) vegetation indexes.
  • USDA Cropland Data Layer to keep only corn or soybean pixels, using the previous year's map because this year's comes out after harvest.
  • gridMET daily weather (4 km): heat, rain and dryness of the air.
  • USDA NASS Quick Stats: monthly forecasts from August, and final county and state yields.

The model

Season-to-date greenness and weather predict each county's yield minus its own long-run trend. Two models run side by side: ridge regression, which is easy to explain, and small gradient-boosted trees (LightGBM). County estimates roll up to the state by harvested acres. Every past season is predicted using only the seasons before it, never a random split. The likely range comes from the model's own past errors. The app headlines LightGBM because it beat ridge in the backtest. Choosing between two models after seeing the results is a small form of hindsight, so both stay on the backtest page.

What it is good for, and what it isn't

Before the USDA's first survey forecast in August, the market has only trend yields and weather. That is where a satellite signal can add something. After August, the USDA's survey usually wins. The backtest page shows both, including the seasons the model got wrong.

How it was built

Python (FastAPI, DuckDB, LightGBM), Google Earth Engine, Next.js, and Google Cloud Run, all defined in Terraform and deployed from GitHub with no stored keys. Built by Rodrigo Pimenta with AI coding agents, and reviewed by him.