Early soybean yield estimation
Can you tell how the soybean season is going months before harvest, using only public data?
Data Science · BI · Agriculture
- 2.42 qq/hamean error with data through late November
- 0.72R² across 45 out-of-sample estimates
- 69%correct on whether a county comes in above or below normal
- −43%drop anticipated in the 2022/23 drought, versus −49% actual
Five months before harvest, the model was already anticipating the 2022/23 drought
Soybean yield, average of 5 counties in northwestern Buenos Aires (qq/ha)
| Season | Observed yield | Estimate as of late November |
|---|---|---|
| 2016/17 | 36.0 | 32.9 |
| 2017/18 | 28.8 | 31.9 |
| 2018/19 | 34.0 | 32.9 |
| 2019/20 | 33.3 | 32.4 |
| 2020/21 | 29.5 | 32.2 |
| 2021/22 | 29.7 | 29.7 |
| 2022/23 | 16.3 | 17.4 |
| 2023/24 | 31.1 | 33.3 |
| 2024/25 | 31.6 | 29.8 |
| 2025/26 | season without official data yet | 31.7 (28.9–33.7) |
With data through late November, the error is already the lowest
Mean absolute error by lead time (qq/ha), 45 out-of-sample estimates
| Late Nov (5 months before) | 2.42 qq/ha |
|---|---|
| Late Dec (4 months before) | 2.63 qq/ha |
| Late Jan (3 months before) | 3.01 qq/ha |
| Late Feb (2 months before) | 2.93 qq/ha |
| Late Mar (1 month before) | 3.02 qq/ha |
| Historical average | 4.04 qq/ha |
What weighs most in the model is the atmosphere’s demand for water
Most important variables in the model with data through late January (Random Forest importance)
- 1Mean relative humidity (Oct–Jan)approx. 20%
- 2Mean vapor pressure deficit (VPD)approx. 15%
- 3NDVI anomaly in late Novembershare not published
Problem
Knowing how the soybean season is shaping up in northwestern Buenos Aires province months before harvest, using only free public data.
Approach
A Python pipeline that combines satellite NDVI (MODIS via Google Earth Engine), daily weather (NASA POWER), and official yields (MAGyP) for 5 counties and 25 seasons (2000/01 to 2024/25). It uses 16 variables per cutoff, including vapor pressure deficit (VPD) and the NDVI anomaly versus normal. One Random Forest per cutoff, with walk-forward temporal validation and 80% conformal prediction intervals. I tried other algorithms, NDVI filtered to soybean, and the El Niño / La Niña signal: none improved the model conclusively.
Result
With data through late November: mean error of 2.42 qq/ha (40% lower error than using the historical average) and R² of 0.72. It gets right whether each county comes in above or below normal in 69% of cases. In the 2022/23 drought yield fell 49%, and by late November the model was already anticipating a 43% drop. The 80% intervals covered between 77% and 87% of cases.
What I learned
The ceiling is the data, not the algorithm: what improved the model most were two agronomically grounded variables (VPD and NDVI anomaly), not switching algorithms. Validate over time instead of fitting to the test. Document the errors: I found and fixed an error in one county's satellite data that was inflating the results.
Tools
Python · Pandas · Scikit-learn · Google Earth Engine · NASA POWER · MODIS NDVI · Vercel