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.

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

TFSMAG: Time-Series Foundation Model for Agriculture

The largest open agricultural time-series corpus. ~536,000 series totaling ~32 million observations across 10 configs spanning commodity markets, global supply/demand, crop phenology, agroclimatology, soil moisture, climate teleconnections, wholesale mandi prices, fertilizer prices, and crop insurance.

No existing TSFM pretraining corpus (LOTSA, Chronos KernelSynth, TimesFM) contains agricultural data. TFSMAG fills that gap.

Dataset summary

Config Train Series Train Obs Test Series Test Obs Freq Date Range Exhaustiveness
commodity_futures 51 282,672 51 70,639 B 1971-2026 9/10
usda_psd 22,683 840,444 22,683 206,059 A 1960-2025 10/10
usda_nass_progress 2,761 697,621 2,761 173,065 W 1979-2026 9/10
usda_nass_production 8,079 432,314 8,079 108,200 A 1866-2025 8/10
faostat 488,456 17,261,939 488,456 ~4,300,000 A 1961-2024 10/10
climate_indices 17 13,833 17 3,455 M 1854-2026 9/10
india_mandi 2,680 532,543 2,680 131,839 D 2023-2025 4/10
weather_power 396 5,168,447 396 1,292,011 D 1981-2025 8/10
wb_commodities 51 28,080 51 7,013 M 1960-2024 9/10
usda_rma_insurance 10,357 119,442 10,357 36,754 A 1989-2024 8/10
Total ~536,000 ~25,400,000 ~536,000 ~6,800,000

Grand total: ~32,000,000 observations across train + test splits.

Schema

Every config uses a uniform 14-column schema. Each row is one complete time series stored as parallel arrays. len(timestamps) == len(values) == n_obs is guaranteed. All timestamps are in YYYY-MM-DD format. Zero NaN, zero Inf across all 32M values.

series_id (unique key per config), ticker, name, field, domain, category, exchange, unit, freq, n_obs, start_date, end_date, timestamps (list[str]), values (list[float64]).

Usage

from datasets import load_dataset

futures = load_dataset("Viharikvs/TFSMAG", "commodity_futures", split="train")
weather = load_dataset("Viharikvs/TFSMAG", "weather_power", split="train")
test = load_dataset("Viharikvs/TFSMAG", "faostat", split="test")

series = futures[0]
print(series["name"], len(series["values"]), "observations")

Configs

commodity_futures (51 series, daily) -- 9/10

28 instruments: 13 ag futures (corn, soybeans, wheat HRW/SRW, soybean meal/oil, cotton, coffee, sugar, cocoa, cattle, hogs, feeder cattle), 4 energy, 5 FX, 6 ag equities. Source: Yahoo Finance. As-of: 2026-04-17.

usda_psd (22,683 series, annual) -- 10/10

Complete USDA FAS PSD. All 5 commodity groups, 44 commodities, 209 countries, 12 S&D attributes. Source: apps.fas.usda.gov/psdonline. As-of: 2025-04-09.

usda_nass_progress (2,761 series, weekly) -- 9/10

Crop progress + condition. 9 crops, 49 states, 28 phenological stages + condition ratings. Source: NASS Quick Stats bulk. As-of: 2026-04-18.

usda_nass_production (8,079 series, annual) -- 8/10

Production, yield, area, prices. 16 major crops, 52 states. Goes back to 1866. Source: NASS Quick Stats bulk. As-of: 2026-04-18.

faostat (488,456 series, annual) -- 10/10

COMPLETE UNFILTERED FAO data. 301 production items, 616 trade items, 235 price items. 283 countries. Production (74,873), Trade (391,262), Prices (52,751). Source: fenixservices.fao.org bulk downloads. As-of: 2024-12-23.

climate_indices (17 series, monthly) -- 9/10

ONI, MEI, SOI, PDO, NAO, AMO, IOD, PNA, AO, and 4 Nino SST regions (absolute + anomaly). Source: NOAA CPC/PSL/NCEI. As-of: 2026-03.

india_mandi (2,680 series, daily) -- 4/10

AGMARKNET modal prices. 5 commodities (Potato, Onion, Wheat, Tomato, Rice), 1,598 mandis, 30 states. Source: Kaggle scrape. As-of: 2025-06-11.

weather_power (396 series, daily) -- 8/10

NASA POWER agroclimatology. 9 parameters (temp mean/max/min, precip, solar, humidity, wind, root-zone soil moisture, profile soil moisture). 44 global ag regions spanning US, Brazil, Argentina, India, Ukraine, Russia, China, Australia, France, South Africa, Thailand, Indonesia, Canada, Pakistan, Bangladesh, Myanmar, Philippines, Kenya, Ethiopia. Source: power.larc.nasa.gov. As-of: 2025-12-31.

wb_commodities (51 series, monthly) -- 9/10

World Bank Pink Sheet. 5 fertilizers (DAP, TSP, Phosphate rock, Potassium chloride, Urea), grains, oilseeds, edible oils, softs, livestock, energy, fruits. 1960-2024. Source: worldbank.org CMO Historical Data. As-of: 2024-12.

usda_rma_insurance (10,357 series, annual) -- 8/10

USDA RMA Summary of Business. Premium, indemnity, liability, loss ratio, insured acres, policies. 246 crops, all states, 1989-2024. Source: pubfs-rma.fpac.usda.gov. As-of: 2024.

cftc_cot (430 series, weekly) -- 9/10

CFTC Commitments of Traders disaggregated + legacy. 21 agricultural markets (grains, oilseeds, softs, livestock, dairy, OJ, lumber). 21 position fields per market: commercial/non-commercial long/short/spread (legacy, 1995+), plus PMPU / Swap dealer / Managed money / Other reportable long/short/spread (disaggregated, 2010+). Source: CFTC bulk COT zips. As-of: 2026-04-14.

nass_prices (925 series, monthly) -- 8/10

USDA NASS Prices Received. Farm-gate monthly prices for 19 commodities (corn, soybeans, wheat, cotton, sorghum, oats, barley, rice, sunflower, peanuts, canola, hay, rye, flaxseed, milk, cattle, hogs, eggs, turkeys) at national and state level. 1970-2026. Source: NASS Quick Stats API. As-of: 2026-02-27.

calendar_spreads (370 series, daily) -- 7/10

Calendar spreads reconstructed from Yahoo individual contract months. 10 commodities (corn, soybeans, wheat SRW, soy meal, soy oil, cotton, coffee, sugar, live cattle, lean hogs). All valid front-vs-deferred pairs within rolling 15-month window per commodity, not just adjacent. History limited to 2021-2026 by Yahoo contract retention. Source: Yahoo Finance via yfinance. As-of: 2026-04-17.

calendar_spreads_deep (550 series, daily) -- 9/10

Deep historical calendar spreads from TurtleTrader free individual contract archive. 16 commodities (corn, soybeans, wheat SRW, cotton, coffee, sugar, oats, OJ, feeder cattle, lean hogs, pork bellies, crude oil, gold, silver, copper, heating oil). All valid spread pairs, 1959-2004. 3M+ observations. Complements calendar_spreads (2021-2026) with 45 years of deep history. Source: turtletrader.com/hpd. As-of: 2002-2004 (static archive, no longer updated).

Data quality

  • Zero NaN, zero Inf across all 32.2M values
  • Zero duplicate series_ids within any config
  • All timestamps normalized to YYYY-MM-DD
  • Train/test split: chronological 80/20 holdout (minimum 5 test observations)
  • All-zero and constant series dropped
  • SOI climate index: timestamps sorted and deduplicated
  • Indian mandi: series with 60+ constant-price days dropped

Licensing

  • USDA (NASS, FAS PSD, RMA): US Government, public domain
  • NOAA: US Government, public domain
  • NASA POWER: US Government, public domain
  • FAOSTAT: CC BY-NC-SA 3.0 IGO
  • World Bank: CC BY 4.0
  • AGMARKNET: Indian Government open data (NDSAP)
  • Yahoo Finance: Verify terms for commercial redistribution
  • TurtleTrader: Free public archive, verify terms for redistribution

Citation

@misc{tfsmag2026,
  title={TFSMAG: Time-Series Foundation Model for Agriculture},
  author={Vihari Kanukollu},
  year={2026},
  url={https://huggingface.co/datasets/Viharikvs/TFSMAG},
}
Downloads last month
178