SIH26074 · Ministry of Earth Sciences · Team Hexadecimal, WCE Sangli
From one block forecast to advice for every gram panchayat
IMD issues agromet forecasts at block level, so every village in Miraj block gets the same numbers. GramVarsha estimates how each panchayat differs, says why, turns it into crop advice in the farmer's language, and learns from their replies.
The pipeline
- 1
Coarse block forecast
backend/forecast.pyOne 5-day forecast for the whole block. Today: Open-Meteo GFS as an IMD proxy. The IMD block feed plugs into the same function.
- 2
Kriging
ml/kriging.pyOrdinary kriging of each village's usual monthly difference from the block, fitted on training years only. Works for villages with no data.
- 3
XGBoost correction
ml/model.pyLearns what kriging missed from terrain (elevation, slope, river distance, position), season and the day's block weather.
- 4
SHAP explanation
ml/explain.pyEvery correction is split into named causes, marked as village-specific or block-wide, and written as a sentence.
- 5
Crop advisory
backend/advisory.pyDeterministic rules for 8 Sangli crops × 5 stages, hand-written in English, Hindi and Marathi. Optional LLM rewording may never change a number.
- 6
SMS · WhatsApp · voice
backend/tts.pyReaches any phone. Nothing to install, nothing to type.
- 7
Farmer feedback
backend/db.pyReplies 1/2 and 👍/👎 are stored per panchayat and shown to officers. Real station data can replace the pseudo-truth for retraining.
↺ Feedback and any station data flow back into step 2 at the next retraining (make train).
It never fails silently
Tier AFull ML
Kriging + XGBoost, with confidence range and SHAP reasons.
Tier BPhysics only
Models unavailable: lapse rate 6.5 °C/km and an orographic rain factor, no training needed.
Tier CPass-through
No local data: the block value is shown unchanged and flagged “limited local data”.
If the forecast source is down, the last good forecast is served with a “stale since” notice. If the server is down, the site falls back to a copy produced daily by the same pipeline, and says so.
Open data, zero cost
| Need | Source | Note |
|---|---|---|
| Block forecast (IMD proxy) | Open-Meteo Forecast & Historical Forecast API, GFS 0.25° | Free, no key |
| Village “truth” for training | Open-Meteo Archive API, ECMWF IFS ~9 km | Pseudo ground truth |
| Elevation, slope, aspect | Copernicus GLO-90 DEM via Open-Meteo Elevation API | 90 m |
| Villages, taluka boundary | OpenStreetMap (Overpass), relation 9742028 / LGD 4302 | ODbL |
| Krishna river | OpenStreetMap (Nominatim), relation 337204 | ODbL |
| Voice | gTTS (Google Translate TTS), Marathi / Hindi / English | Free |
Limitations we know about
- The “truth” is a 9 km weather model, not rain gauges or AWS. Nearby villages can share one grid cell, which caps the village detail we can learn and prove. Real IMD AWS/ARG CSVs drop into data/imd_import/ and replace it.
- For daily max temperature and rainfall the gain over the block forecast is a better block-level forecast, not village-level detail. The Validation page shows this per variable.
- In the current models XGBoost leans on season and the day's block weather more than on terrain; most village-to-village detail comes from the kriging step. Miraj is flat (under 150 m of relief), so terrain signal is small.
- Scores cover day 0–1 lead time. Days 3–5 on the map are shown but not yet validated.
- Panchayat outlines are Voronoi cells around OSM village points, not official boundaries. LGD / Bhunaksha polygons replace them in production.
- Advisory thresholds are general agronomy rules of thumb and need review by the Sangli KVK / AMFU before farmers act on them.
- Marathi village names are hand-transliterated and marked for local checking.
The measured numbers are on Validation.