You need to agree to share your contact information to access this dataset

This repository is publicly accessible, but you have to accept the conditions to access its files and content.

This dataset is released under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 licence (CC BY-NC-SA 4.0): research, academic, personal and other non-commercial use is permitted with attribution; adaptations must be shared under the same licence; commercial use is not permitted. The original public source data remains under the Government Open Data License - India (GODL-India). Commercial use: contact surya@judicialmind.ai or hello@judicialmind.ai.

Log in or Sign Up to review the conditions and access this dataset content.

CropBench

Licence: CC BY-NC-SA 4.0 — research and non-commercial use only; derivatives must be shared under the same licence. Commercial use: contact surya@judicialmind.ai or hello@judicialmind.ai

Access is approved automatically when the email you enter matches your Hugging Face account email and belongs to the organisation you name; other requests are reviewed manually.

CropBench is a forecasting benchmark for district crop yield and production in India, built from official district crop statistics. Each series is one district x crop x season (Kharif, Rabi, Whole Year, Summer, Winter, Autumn) over the agricultural years 1997-2019, with rainfall, mandi price and reservoir covariates. Models forecast the next season from five rolling origins (2015-2019), with or without covariates. The repository ships the panel, the benchmark series and covariates, the forecasts of eight models, the leaderboard and evaluate.py, which reproduces leaderboard.csv from forecasts/ and scores new models.

Quickstart

from huggingface_hub import snapshot_download

root = snapshot_download("judicialmind/CropBench", repo_type="dataset")

import pandas as pd

series = pd.read_parquet(f"{root}/series/series.parquet")
print(series.shape, series["series_id"].nunique(), "series")
print(series[["series_id", "year", "area_ha", "production", "yield"]].head(3).to_string(index=False))

Output: (209280, 15) 12840 series (209,280 rows, 15 columns, 12,840 series), then:

First three rows of series/series.parquet

series id year area (ha) production yield
1|Dry chillies|kharif 2005 53.0 62.8 1.1849
1|Dry chillies|kharif 2006 41.0 48.6 1.1854
1|Dry chillies|kharif 2007 78.0 92.5 1.1859

Other loaders: datasets.load_dataset("judicialmind/CropBench", "series", split="train") (also panel, covariates), or DuckDB (SELECT crop, avg(yield) FROM 'panel/panel.parquet' GROUP BY 1).

Evaluate a model

Input: for each benchmark row (series_id, origin, target; target is yield or production) the model may use the series' values for years before origin (and, for covariate models, the covariate rows of the chosen setting). Output: nine quantiles q0.1 ... q0.9 of the target in year origin. evaluate.py (numpy, pandas, pyarrow) scores them:

import sys

import numpy as np

sys.path.insert(0, root)
from evaluate import QCOLS, QUANTILES, CropBench, leaderboard

bench = CropBench(root)
truth = bench.truth()            # the rows to forecast: series_id, origin, target (+ ground truth, never use it)

# toy forecaster: mean of the last 3 observed years before the origin, +-25% normal spread
hist = series.melt(id_vars=["series_id", "year"], value_vars=["yield", "production"], var_name="target", value_name="v")
rows = truth[["series_id", "origin", "target"]].merge(hist, on=["series_id", "target"])
rows = rows[(rows["year"] < rows["origin"]) & rows["v"].notna()].sort_values("year")
point = rows.groupby(["series_id", "origin", "target"])["v"].apply(lambda v: v.tail(3).mean()).rename("point")
sub = point.reset_index()
z = np.array([-1.2816, -0.8416, -0.5244, -0.2533, 0.0, 0.2533, 0.5244, 0.8416, 1.2816])
sub[QCOLS] = sub["point"].to_numpy()[:, None] * (1 + 0.25 * z)
sub["setting"] = "univariate"
sub.to_parquet("last3_mean.parquet")    # submission file: series_id, origin, target, setting, q0.1 ... q0.9

fc = truth.merge(sub, on=["series_id", "origin", "target"]).assign(model="last3_mean")
lb = leaderboard(fc)
print(lb[lb["setting"] == "ex_ante"][["target", "model", "swql", "wql", "mase", "mdase", "cov_80", "n"]]
      .round(4).to_string(index=False))

Toy forecaster last3_mean, ex-ante setting

target model sWQL WQL MASE MdASE 80% coverage rows
production last3_mean 0.4569 0.1577 1.7572 0.7218 0.5161 32,599
yield last3_mean 0.2078 0.1612 2.3760 0.8292 0.7323 32,599

From the command line (run inside the downloaded folder):

python evaluate.py                     # recompute leaderboard.csv (and the per-origin / per-crop rows) -> "REPRODUCED"
python evaluate.py --submission last3_mean.parquet --name last3_mean --out last3_mean.csv   # ranked with the shipped models

A submission has one row per benchmark row and setting: series_id, origin, target, setting, q0.1 ... q0.9, with setting = ex_ante, in_season, or univariate (no covariates; listed under both settings). To add a model to the leaderboard, open a discussion on this repository with the --out csv and a short model description.

Tasks

  • Targets: yield (production / area) and production.
  • Origins: for origin year Y the model sees each series' values for years before Y (context up to 23 years, at least 8 observed) and forecasts year Y.
  • Settings: ex_ante (information dated before sowing: pre-season rainfall, last year's season rainfall, pre-sowing mandi price change, reservoir storage) and in_season (adds the season's observed rainfall; official district estimates are published one to two years later, so this is still a forecast of an unpublished number). Univariate models are setting-free and shown under both.
  • No leakage: context timestamps precede the origin; every covariate carries the last date it depends on (cov_max_date), which precedes the row's cut-off; LightGBM is retrained per origin on target years before the origin. Rainfall anomalies use a 1951-1996 climatology (before the first panel year).
  • Metrics: sWQL is the headline metric: the weighted quantile loss (9 quantiles) after each test row's target and quantiles are divided by that series' mean over its context years, so every series is on the same scale. The plain pooled WQL is also shown but should not be used to rank models here: units differ by crop (coconut production is counted in nuts, cotton in bales), and Coconut is 96% of the summed absolute yield values and of the summed absolute production values in the test rows, so pooled WQL mostly measures that crop. Also shown: MASE (scale = mean absolute year-on-year change in the context) and its median MdASE, MAPE and median APE of the median forecast, and 80% interval coverage. Means of scaled and percentage errors are dominated by a few series (near-flat history, collapsing production), so the medians are shown next to them. Rows are sorted by sWQL.

Results

Leaderboard pooled over origins (leaderboard.csv; per origin and per crop in leaderboard.json).

target = production, setting = ex_ante

model covariates sWQL WQL (pooled) MASE MdASE MAPE MdAPE cov_80 n
lightgbm no 0.4086 0.1367 1.656 0.595 2.214 0.276 0.749 32,599
lightgbm_cov yes 0.4096 0.1384 1.655 0.594 2.222 0.272 0.749 32,599
chronos2 no 0.4241 0.1411 1.707 0.630 2.964 0.290 0.777 32,599
chronos2_cov yes 0.4344 0.1419 1.769 0.709 3.665 0.311 0.773 32,599
naive no 0.4515 0.1503 1.676 0.583 2.175 0.270 0.693 32,599
ets_lite no 0.4566 0.1514 1.719 0.686 3.354 0.299 0.625 32,599
mean3 no 0.4663 0.1591 1.757 0.722 3.377 0.300 0.675 32,599
hist_mean no 0.5863 0.2106 2.520 1.353 10.545 0.498 0.453 32,599

target = production, setting = in_season

model covariates sWQL WQL (pooled) MASE MdASE MAPE MdAPE cov_80 n
lightgbm_cov yes 0.4082 0.1361 1.650 0.593 2.176 0.270 0.751 32,599
lightgbm no 0.4086 0.1367 1.656 0.595 2.214 0.276 0.749 32,599
chronos2 no 0.4241 0.1411 1.707 0.630 2.964 0.290 0.777 32,599
chronos2_cov yes 0.4330 0.1411 1.760 0.687 3.540 0.305 0.755 32,599
naive no 0.4515 0.1503 1.676 0.583 2.175 0.270 0.693 32,599
ets_lite no 0.4566 0.1514 1.719 0.686 3.354 0.299 0.625 32,599
mean3 no 0.4663 0.1591 1.757 0.722 3.377 0.300 0.675 32,599
hist_mean no 0.5863 0.2106 2.520 1.353 10.545 0.498 0.453 32,599

target = yield, setting = ex_ante

model covariates sWQL WQL (pooled) MASE MdASE MAPE MdAPE cov_80 n
lightgbm_cov yes 0.1849 0.1532 2.346 0.767 0.296 0.128 0.743 32,599
lightgbm no 0.1849 0.1530 2.348 0.764 0.298 0.129 0.750 32,599
chronos2 no 0.1953 0.1517 2.349 0.767 0.285 0.138 0.789 32,599
chronos2_cov yes 0.1978 0.1520 2.385 0.821 0.288 0.143 0.762 32,599
ets_lite no 0.2072 0.1611 2.344 0.780 0.309 0.134 0.600 32,599
mean3 no 0.2098 0.1661 2.376 0.829 0.307 0.142 0.637 32,599
naive no 0.2149 0.1690 2.350 0.740 0.310 0.130 0.661 32,599
hist_mean no 0.2494 0.2174 2.966 1.203 0.339 0.209 0.533 32,599

target = yield, setting = in_season

model covariates sWQL WQL (pooled) MASE MdASE MAPE MdAPE cov_80 n
lightgbm_cov yes 0.1829 0.1525 2.330 0.760 0.294 0.127 0.745 32,599
lightgbm no 0.1849 0.1530 2.348 0.764 0.298 0.129 0.750 32,599
chronos2 no 0.1953 0.1517 2.349 0.767 0.285 0.138 0.789 32,599
chronos2_cov yes 0.1973 0.1531 2.385 0.812 0.286 0.142 0.738 32,599
ets_lite no 0.2072 0.1611 2.344 0.780 0.309 0.134 0.600 32,599
mean3 no 0.2098 0.1661 2.376 0.829 0.307 0.142 0.637 32,599
naive no 0.2149 0.1690 2.350 0.740 0.310 0.130 0.661 32,599
hist_mean no 0.2494 0.2174 2.966 1.203 0.339 0.209 0.533 32,599

Models: naive (last observed value), mean3 (mean of the last three observed years), hist_mean (mean of the context), ets_lite (damped-trend exponential smoothing), lightgbm / lightgbm_cov (global LightGBM quantile regression on scale-free history features, without / with the setting's covariates, retrained per origin), chronos2 / chronos2_cov (amazon/chronos-2 zero-shot, without / with the covariates).

Files

file content
panel/panel.parquet district x crop x season x year area, production, yield (297,505 rows)
series/series.parquet the 12,840 benchmark series, one row per series and year (209,280 rows)
series/covariates.parquet covariates per series-year and setting (418,560 rows)
splits.json origins, context length (23), minimum context (8), windows per origin
forecasts/<model>/<target>_<setting>_<origin>.parquet forecasts of the eight models
leaderboard.csv, leaderboard.md the leaderboard above (32 rows)
leaderboard.json the leaderboard plus per-origin (100) and per-crop (1,080) rows and the crop shares of the pooled targets
sources/imd_district_resources.csv the 867 IMD gridded district rainfall resources (one per month, 1951-2023)
evaluate.py, requirements.txt evaluation harness

Schema

panel/panel.parquet (series/series.parquet has the same columns plus series_id, ts, target)

column type description
state_lgd, state_name int16, string state (LGD code and name)
district_lgd, district_name int32, string district (LGD code and name)
crop string crop name (56 crops)
season string kharif, rabi, whole_year, summer, winter, autumn
year int16 agricultural year (July-June) starting in this year
area_ha float64 area, hectares
production float64 production: tonnes; bales for cotton, jute and mesta; nuts for coconut
yield float64 production / area
src string ndap (NDAP dataset 6820) or ogd_apy (data.gov.in resource 35be999b..., filling keys missing from NDAP)
yield_reported float64 yield as published in the source
series_id string `district_lgd
ts date July 1 of year (series file only)
target float64 equal to yield (series file only)

series/covariates.parquet: keys district_lgd, crop, season, year, setting (ex_ante / in_season) and

column description
cov_rain_season log((season rain + 10 mm) / (1951-1996 climatology + 10 mm)); in_season only
cov_rain_pre the same for the pre-season months before sowing
cov_rain_prev last year's season rainfall anomaly
cov_price_pre log(median mandi modal price of the crop in the 3 months before sowing / the same months a year earlier); district level, state median as fallback
cov_reservoir national live storage / live capacity of CWC reservoirs on the last report before the cut-off (at most 21 days old)
cov_rain_tier 1 = district IMD gridded rainfall, 2 = state mean of IMD sub-divisions, 0 = none
cov_max_date latest date any covariate value depends on
cutoff the row's information cut-off: the season's sowing month for ex_ante, the month after the season's rainfall months for in_season

forecasts/<model>/*.parquet: series_id, district_lgd, state_lgd, crop, season, origin, h (= 1), ts, q0.1 ... q0.9, mean, target_value (the observed value), mase_scale, model, target, setting (univariate, ex_ante or in_season).

sources/imd_district_resources.csv: uuid (data.gov.in resource id), month, api_total (rows the API reports), records_in_dump (rows in the snapshot).

Coverage

panel rows (district x crop x season x year, with yield) 292,333
districts / states / crops 671 / 35 / 56
benchmark series (median area >= 50 ha, >= 8 years) 12,840
rolling origins (agricultural years) 2015, 2016, 2017, 2018, 2019
horizon 1 year (next season of the same type)
test rows per target 32,599 (6,984 / 7,248 / 7,343 / 7,357 / 3,667 for 2015-2019)

Rainfall: district-level (tier 1) rainfall covers 340 districts; the others use state-level sub-division means (tier 2). Share of benchmark series-years by tier: {'1': 0.4168, '2': 0.5627, '0': 0.0205}.

  • IMD gridded district rainfall: every monthly file in the snapshot holds only the first 10,000 of about 22,700 API rows, so only districts of states sorted first (Andaman & Nicobar .. part of Madhya Pradesh) have district rainfall; other districts use the state mean of IMD sub-divisions (to 2017).
  • NDAP indicator columns are unlabeled in the dump; area/production/yield were identified by the identity yield = production / area (holds on 100.0% of rows).
  • Agricultural year 2019-20 is partial in the source (about half the districts).
  • PM-KISAN is not a covariate: instalments start in 2019, after the last complete panel year.
  • About 3% of panel values (4-6% of Kharif, Rabi and Whole Year test rows) repeat the previous year's figure exactly.

Source data

Derived from 871 resources published on the Open Government Data Platform India (data.gov.in), snapshot May 2026, under the Government Open Data License - India.

Providers: Central Water Commission, India Meteorological Department, Ministry of Agriculture and Farmers Welfare, NITI Aayog (NDAP).

  • Source: NITI Aayog, National Data and Analytics Platform (NDAP), dataset 6820: Land Use Statistics : Crop Production Statistics (Ministry of Agriculture and Farmers Welfare). https://ndap.niti.gov.in/dataset/6820
  • Department of Agriculture and Farmers Welfare (Ministry of Agriculture and Farmers Welfare). "District-wise, season-wise crop production statistics from 1997". data.gov.in resource 35be999b-0208-4354-b557-f6ca9a5355de, https://api.data.gov.in/resource/35be999b-0208-4354-b557-f6ca9a5355de. Licensed under the Government Open Data License - India (https://data.gov.in/government-open-data-license-india). Snapshot: May 2026.
  • India Meteorological Department (IMD) (Ministry of Earth Sciences). "Sub Divisional Monthly Rainfall from 1901 to 2017". data.gov.in resource 8e0bd482-4aba-4d99-9cb9-ff124f6f1c2f, https://api.data.gov.in/resource/8e0bd482-4aba-4d99-9cb9-ff124f6f1c2f. Licensed under the Government Open Data License - India (https://data.gov.in/government-open-data-license-india). Snapshot: May 2026.
  • IMD GRID MODEL daily district rainfall, one data.gov.in resource per month (resource list in sources/imd_district_resources.csv). Licensed under the Government Open Data License - India.
  • Agmarknet daily mandi prices (data.gov.in resource 35985678-0d79-46b4-9ed6-6f13308a1d24) and CWC reservoir storage (data.gov.in resource 1fc2148c-fc41-46f5-a364-bdc03f77053f). Licensed under the Government Open Data License - India.

GODL-India does not cover personal information; this dataset holds aggregate statistics only.

Original data: published by Department of Agriculture and Farmers Welfare, Ministry of Agriculture and Farmers Welfare (district crop production statistics, via data.gov.in and NITI Aayog NDAP); India Meteorological Department, Ministry of Earth Sciences (rainfall); Directorate of Marketing and Inspection (Agmarknet), Ministry of Agriculture and Farmers Welfare (mandi prices); Central Water Commission, Ministry of Jal Shakti (reservoir storage) on the Open Government Data Platform India (data.gov.in) and, where marked, NITI Aayog's National Data and Analytics Platform (NDAP), under the Government Open Data License - India (GODL-India). The original public data remains under GODL-India; the CC BY-NC-SA 4.0 licence of this repository covers JudicialMind's compilation, derived fields, annotations, benchmarks and models.

Citation

@misc{judicialmind2026cropbench,
  title        = {CropBench: a forecasting benchmark for district crop yield and production in India},
  author       = {JudicialMind},
  year         = {2026},
  publisher    = {Hugging Face},
  howpublished = {\url{https://huggingface.co/datasets/judicialmind/CropBench}}
}

License

CC BY-NC-SA 4.0 (see LICENSE): research, academic, personal and other non-commercial use, with attribution to JudicialMind and to the original data publishers; adaptations must be shared under the same licence. Commercial use requires a separate licence.

Commercial use: contact surya@judicialmind.ai or hello@judicialmind.ai.

Downloads last month
17

Collection including judicialmind/CropBench