Guide

County-Level NDVI API

MODIS vegetation index data aggregated to every U.S. county — for crop monitoring, stress detection, and long-term vegetation trend analysis.

MODIS NDVI has been the satellite standard for vegetation monitoring since 2000. R2Data2 aggregates 16-day MODIS composites to county boundaries, adds a 25-year anomaly z-score for each period, and serves it via REST API — so you get vegetation health in context, not just a raw reflectance number.

Source: NASA MODIS (Terra/Aqua)  ·  Cadence: 16-day composites  ·  Coverage: 3,100+ U.S. counties  ·  Baseline: 25-year anomaly (2000–present)

On this page
  1. How MODIS NDVI works
  2. Use cases
  3. API endpoints & examples
  4. Frequently asked questions
  5. Get started

How MODIS NDVI works

NDVI (Normalized Difference Vegetation Index) measures how much healthy green vegetation is present by comparing near-infrared reflectance (which plants strongly reflect) to red reflectance (which plants strongly absorb). Values range from –1 to +1; actively growing cropland typically falls between 0.4 and 0.9 at peak greenness.

R2Data2 sources NDVI from the MODIS MOD13A2 / MYD13A2 product — NASA's 16-day maximum-value composite at 1 km resolution. The 16-day compositing window selects the least-cloudy, highest-quality pixel in each period, which makes the data far more usable than daily satellite passes that are frequently obscured by clouds.

From pixels to counties

The raw MODIS product covers the continental U.S. on a 1 km grid — millions of pixels per period. R2Data2 computes an area-weighted county mean for every 16-day period, filtered to pixels with pixel_reliability ≤ 1 (good or marginal quality only — snow, cloud, and water pixels excluded). The result is one NDVI value per county per period, consistently defined and directly comparable across years.

The 25-year anomaly baseline

Raw NDVI values are highly seasonal — corn counties in Iowa peak at 0.8 in July and drop near 0 after harvest. A raw value of 0.55 in mid-July tells you almost nothing without knowing what's typical for that county at that time of year.

The ndvi_z_score field solves this. For each county and each 16-day period of the year, R2Data2 computes the mean and standard deviation of NDVI across the full 25-year MODIS archive, then expresses the current reading as a z-score against that baseline. A z-score of –2.0 in period 14 (early July) means vegetation is 2 standard deviations below the 25-year normal for that county at that point in the growing season — a strong stress signal regardless of the absolute NDVI value.

Key response fields

FieldDescription
ndvi_meanCounty-area-weighted mean NDVI for the 16-day period (–1 to +1). Cropland at peak greenness typically 0.5–0.85.
ndvi_z_scoreAnomaly vs. 25-year baseline for this county and period of year. Null when baseline confidence is low.
evi_meanEnhanced Vegetation Index — similar to NDVI but less prone to saturation in dense canopy and more sensitive in sparsely vegetated areas.
pixel_reliabilityMODIS quality flag: 0 = good, 1 = marginal. Only quality-filtered pixels (≤ 1) are included in the county average.
doy_periodWhich 16-day period of the year (1–23). Period 14 ≈ early July. Useful for aligning records across years.
obs_dateStart date of the 16-day composite period (YYYY-MM-DD).
NDVI vs. EVI: NDVI saturates in very dense vegetation (values above ~0.8 compress together). EVI stays sensitive at high biomass and is preferred for dense crop canopy like corn at peak growth. For most agricultural monitoring applications both are useful — NDVI for cross-county comparisons, EVI for within-season tracking in high-yield counties.

Use cases

Crop stress detection: NDVI anomaly as a yield signal

Vegetation stress shows up in NDVI before it shows up in yield estimates or crop reports. A county-level NDVI z-score below –1.5 during the critical growth window — silking for corn (period 13–15, late June to late July), pod fill for soybeans (period 14–16) — is a reliable early indicator of yield underperformance relative to the 25-year county average.

Crop insurers and ag lenders use the z-score anomaly to identify counties where vegetation development is running behind historical norms, prioritize adjuster resources, and validate in-season loss reserve adjustments before claims arrive. Pair with the drought API and soil moisture API to confirm that NDVI stress is driven by moisture deficit rather than other factors (pest, disease, hail).

Precision agriculture: regional vegetation benchmarks

Field-level NDVI from drone or high-resolution satellite imagery is expensive and infrequent. County-level MODIS NDVI from R2Data2 gives precision ag platforms a free, consistent regional benchmark — useful for contextualizing field sensor data, validating crop model outputs, and identifying counties where regional vegetation health is diverging from field measurements.

The 16-day cadence aligns well with key phenological stages. Monitoring NDVI z-score through the growing season (periods 8–18, April through September) gives a season-long vegetation health profile for each county at no additional cost beyond the API call.

Long-term trend analysis: 25 years of county NDVI

MODIS has been continuously operational since February 2000 — over 25 years of 16-day composites at county resolution. Growth and Pro plan subscribers can pull the full time series for any county and compute long-term NDVI trends, decade-over-decade vegetation change, inter-annual variability, and the relationship between NDVI anomalies and drought years. This is the same archive used in academic land-cover change research, now accessible via a clean REST endpoint without downloading HDF tiles.

Portfolio risk screening: national NDVI snapshot

The snapshot endpoint returns NDVI and z-scores for all counties on a specific composite date. Run it every 16 days to screen your entire portfolio at once — sort by ndvi_z_score ascending and the most vegetation-stressed counties surface immediately. Combine with drought snapshot data to distinguish moisture-driven stress from other causes.

API endpoints

All NDVI endpoints require an API key in the X-API-Key header. The free tier provides the last year of history for any county, with 100 requests/day.

County time series

Returns 16-day NDVI records for a county, newest first. Default is 46 records (approximately 2 years of composites). Useful for charting the full growing-season NDVI curve and comparing current vegetation health to prior years.

GET /ndvi/county/{fips}
# Last 23 NDVI periods (~1 year) for Adair County, Iowa (FIPS 19001)
curl "https://r2data2.com/ndvi/county/19001?limit=23" \
  -H "X-API-Key: agr_your_key_here"
{
  "fips": "19001",
  "records": [
    {
      "obs_date": "2025-03-22",
      "ndvi_mean": 0.312,
      "ndvi_z_score": -0.84,
      "evi_mean": 0.198,
      "pixel_reliability": 0,
      "doy_period": 6
    },
    {
      "obs_date": "2025-03-06",
      "ndvi_mean": 0.289,
      "ndvi_z_score": -1.21,
      "evi_mean": 0.181,
      "pixel_reliability": 0,
      "doy_period": 5
    }
  ]
}

Use start_date and end_date to scope to a specific growing season. The limit parameter caps results (max 138 ≈ 6 years of 16-day composites). A z-score of –0.84 in early spring indicates vegetation is somewhat behind its 25-year normal for that county at that time of year.

Latest reading

Returns the single most recent NDVI composite for a county. One request, one record — useful as a fast current-conditions check without pulling a full time series.

GET /ndvi/county/{fips}/latest
# Most recent NDVI composite for Fresno County, CA (FIPS 06019)
curl https://r2data2.com/ndvi/county/06019/latest \
  -H "X-API-Key: agr_your_key_here"

National snapshot

Returns NDVI and z-scores for all counties on a specific 16-day composite date. Use the exact obs_date values stored in the database (MODIS composite start dates). Optionally filter by state to reduce response size.

GET /ndvi/snapshot/{obs_date}
Growth plan required. Returns up to 3,100 county records per call. Filter with state=IA to scope to a single state. MODIS composites are on fixed 16-day start dates — use the county time series endpoint to find the exact dates available for a given period if you are unsure of the correct obs_date.
# All counties — NDVI composite starting 2025-03-22
curl "https://r2data2.com/ndvi/snapshot/2025-03-22?state=IA" \
  -H "X-API-Key: agr_your_key_here"
{
  "obs_date": "2025-03-22",
  "count": 99,
  "records": [
    {
      "fips": "19001",
      "ndvi_mean": 0.312,
      "ndvi_z_score": -0.84,
      "doy_period": 6,
      "pixel_reliability": 0
    }
  ]
}

See the Data Dictionary for the full field reference and API Docs for interactive request testing.

Frequently asked questions

Where does the NDVI data come from?

R2Data2 sources NDVI from the NASA MODIS MOD13A2 (Terra) and MYD13A2 (Aqua) products — the 16-day maximum-value vegetation index composites at 1 km resolution. These are NASA's standard, peer-reviewed NDVI products, submitted to NASA's AppEEARS system and aggregated to U.S. county boundaries via area-weighted means.

Why 16-day composites instead of daily?

Cloud cover makes daily MODIS data unreliable for most agricultural applications — large portions of the U.S. are cloudy on any given day. The 16-day maximum-value composite selects the highest-quality, least-cloudy observation from a two-week window, producing a spatially complete, cloud-minimized dataset. For monitoring vegetation through the growing season, 16-day cadence is well-matched to the pace of crop development.

How is the ndvi_z_score baseline calculated?

For each county and each of the 23 possible 16-day periods in a calendar year, R2Data2 computes the mean and standard deviation of NDVI across the full MODIS archive (2000–present, ~25 years). The z-score is then (current − mean) / std. This normalizes out seasonal variation: a value of –1.5 means the county's vegetation is 1.5 standard deviations below its typical level for that time of year, not just below the annual average. The z-score is null when baseline confidence is low.

What's a meaningful NDVI z-score threshold for crop stress?

There is no universal threshold — it depends on the crop, the growth stage, and the stress type. As a practical starting point: z-scores below –1.0 during the core growing season (June–August for corn and soybeans) indicate below-normal vegetation development; below –1.5 is meaningfully stressed; below –2.0 is a strong signal worth investigating with drought and soil moisture data. Calibrate thresholds against RMA loss history for your counties of interest to find values that have historically correlated with elevated indemnities.

What does pixel_reliability mean and should I filter on it?

MODIS assigns each pixel a quality flag: 0 = good data (clear sky, best quality), 1 = marginal data (some atmospheric influence), 2 = snow/ice, 3 = cloudy. R2Data2 already filters to pixel_reliability ≤ 1 when computing county means — snow, cloud, and water pixels are excluded from the average. The field in the API response reflects the most common quality flag among the pixels that contributed to the county mean. A value of 1 (marginal) for a county in winter is normal and not a concern.

How far back does the historical data go?

MODIS Terra began producing NDVI data in February 2000; MODIS Aqua from 2002. R2Data2 stores the full archive from 2000 onward — over 25 years of 16-day composites. The free tier covers the last 52 weeks; Growth and Pro plans unlock multi-year history back to 2000, enough to observe multiple drought cycles and compute long-term vegetation trends at county resolution.

Ready to query NDVI data?

Get a free API key in under a minute. No credit card required.
25 years of MODIS NDVI for every U.S. county — aggregated, anomaly-scored, and ready to query.