# 🌊 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