# AgraSense Ethiopia πͺπΉ
> **AI-Powered Early Warning System for Crop Failure & Food Insecurity**
> *Final Capstone Project β Data Science Bootcamp 2025*
---
## π Overview
**AgraSense Ethiopia** is an open-source, end-to-end data pipeline and predictive analytics platform. It aggregates and fuses multi-source environmental and socioeconomic datasets: NASA MODIS/Sentinel-2 satellite imagery (for vegetation health), CHIRPS data (for precipitation records), CDS ERA5 climate reanalysis (for temperature and soil moisture), FAO maps (for soil qualities), and historical yield reports from the Central Statistical Agency (CSA).
These inputs are processed through machine learning models to generate **district-level risk scores** with a **6-to-8 week lead time**, shifting the humanitarian response model from reactive containment to proactive risk management.
---
## π Model Performance & Metrics
We trained and evaluated three machine learning architectures on a simulated dataset representing 1,200 seasonal observations across diverse agro-ecological zones in Ethiopia:
| Model Architecture | Accuracy | F1-Score (Failure Class) | ROC-AUC |
| :--- | :---: | :---: | :---: |
| **Logistic Regression** | 89.2% | 84.1% | 0.971 |
| **Random Forest Classifier** | 87.1% | 80.5% | 0.958 |
| **XGBoost Classifier (Core)** | 85.4% | 78.8% | 0.951 |
---
## π Visualizations Included
The repository generates several explanatory and diagnostic plots:
- `model_comparison.png`: ROC-AUC curve comparisons.
- `confusion_matrix.png`: Prediction accuracy splits for the core XGBoost model.
- `feature_importance.png`: Feature weight comparisons.
- `shap_dot.png`: Directional impact of environmental signals on crop failure.
- `district_risk_map.png`: Current season district risk alerts.
---
## ποΈ Project Directory Structure
```directory
βββ ethiopia_crop_failure_prediction.ipynb # Executed Jupyter Notebook with inline outputs
βββ generate_pdf.py # ReportLab script co β¦