ML model to predict maize harvest in Uasin Gishu County, Kenya
# π½ Maize Yield Prediction β Uasin Gishu County, Kenya
A machine learning web application that predicts maize harvest yields in Uasin Gishu County using historical climate, satellite, soil, and seed variety data.
π **Live App:**
maizeyieldprediction-kujseeβ¦
---
## π Project Summary
| Item | Detail |
|------|--------|
| **Location** | Uasin Gishu County, Kenya |
| **Target** | Maize Yield (Tonnes/Hectare) |
| **Data Range** | 2005β2024 (20 years) |
| **Model** | Linear Regression (RΒ² = 0.76, MAE = Β±0.30 t/ha) |
| **Institution** | KCA University |
---
## π Project Structure
```
maize-prediction/
βββ app.py # Main Streamlit app (Predictor)
βββ requirements.txt # Python dependencies
βββ pages/
β βββ 01_dashboard.py # Charts & insights dashboard
β βββ 02_methodology.py # Full methodology & documentation
βββ notebooks/
β βββ 01_weather_download.ipynb # NASA POWER weather data
β βββ 02_soil_data.ipynb # ISRIC soil data
β βββ 03_ndvi_satellite.ipynb # MODIS NDVI satellite data
β βββ 04_yield_and_seeds.ipynb # Yield & seed variety data
β βββ 05_master_merge.ipynb # Merge all datasets
β βββ 06_modelling.ipynb # Model training & evaluation
βββ data/
β βββ raw/ # Raw downloaded files
β βββ processed/ # Cleaned, merged datasets
βββ outputs/ # Charts and saved model
```
---
## π Data Sources
| Data Type | Source | Years |
|-----------|--------|-------|
| Weather & Climate | NASA POWER | 2005β2024 |
| Satellite NDVI | NASA MODIS via ORNL | 2005β2024 |
| Soil Properties | ISRIC SoilGrids | Static |
| Maize Yield | Uasin Gishu County Agriculture Office | 2012β2023 |
| Seed Varieties | KEPHIS + CIMMYT | 2005β2024 |
---
## π€ Model Performance
| Model | MAE | RMSE | RΒ² |
|-------|-----|------|----|
| **Linear Regression** β
| **0.300** | **0.364** | **0.763** β¦