CY-Bench (Crop Yield Benchmark) is a comprehensive dataset and benchmark to forecast crop yields at subnational level. CY-Bench standardizes selection, processing and spatio-temporal harmonization of public subnational yield statistics with relevant predictors. Contributors include agronomers, climate scientists and machine learning researchers.
Need to trim the time series to prediction date. Example: If we want to make a prediction at middle of the season, remove data from middle of the season onwards.
Crop calendar data provides: planting_doy and maturity_doy.
crop_season_crosses_calendar_year = False
if (crop == "wheat")
crop_season_crosses_calendar_year = True
if (crop_season_crosses_calendar_year):
# for crops that grow from one calendar year to the next.
# some years have 366 days. If we want to be precise, add check for leap year.
season_length = maturity_doy + 365 - planting_doy
else:
season_length = maturity_doy - planting_doy
mid_season = int(season_length/2)
# remove mid_season number of days from time series data.
Crop calendar data provides:
planting_doy
andmaturity_doy
.