# π Urban Flooding & Health: AI-Powered Risk Prediction for Kenya
> An AI-driven early warning system that predicts flood-induced health risks in Nairobi's urban settlements 24-72 hours in advance, enabling targeted public health interventions.
---
## π― Problem Statement
Kenya's urban centers face intensifying flood-health crises. The **March-April-May 2024 rains** caused Kenya's worst flooding in decades:
- π **95,859 households** affected
- π¨βπ©βπ§βπ¦ **52,673 families** displaced
- π **284 fatalities**
- π₯ **42 health facilities** overwhelmed
- π° **162 water sources** destroyed
- π« **285 schools** damaged
**Key Statistics:**
- 27% of Nairobi's total area is flood-prone
- 35% of built-up areas exposed to flooding
- 54% of formal areas at risk
- Up to 40% of informal settlements (Korogocho, Kibera, Mathare) vulnerable
Current early warning systems lack actionable granularity and health integration. This project bridges that gap.
---
## π Solution Overview
A **Random Forest machine learning model** that:
- β
Predicts flood-induced health risk 24-72 hours ahead
- β
Identifies spatial hotspots at sub-county level (17 constituencies)
- β
Achieves **70%+ accuracy** on 2021-2024 test data
- β
Validated against 2024 MAM floods (worst on record)
- β
Provides actionable risk levels for public health interventions
---
## π Model Performance
| Metric | Score |
|--------|-------|
| **Test Accuracy** | 70%+ |
| **Precision** | High |
| **Recall** | High |
| **2024 MAM Validation** | Successfully detected worst flooding in decades |
| **Features Used** | 9 predictors (rainfall + seasonal) |
| **Training Period** | 1981-2020 (40 years of data) |
| **Testing Period** | 2021-2024 (including 2024 floods) |
**Top Predictive Features:**
1. π§οΈ 30-day cumulative rainfall
2. π§ Antecedent Precipitation Index (soil moisture proxy)
3. π¦οΈ 20-day cumulative rainfall
4. π
Seasonal indicators (MAM & OND rainy seasons)
---
## ποΈ Project Structure