Flood Risk Predictor β Nigeria is an offline-ready data science tool that uses geospatial features and machine learning to predict the likelihood of flooding across Nigerian states. The goal of this project is to empower farmers, emergency planners, and decision-makers with a simple yet intelligent system to anticipate and respond to flood.
# π Flood Risk Predictor β Nigeria
An intelligent, offline-ready flood prediction tool built using **machine learning** and **geospatial data**. This project helps predict flood risk levels across Nigerian states based on real environmental indicators such as rainfall, elevation, land slope, and NDVI (vegetation index).
---
## π Problem Statement
Flooding in Nigeria causes massive economic losses, agricultural disruption, and displacement every year β especially in flood-prone regions like Lagos, Bayelsa, and Benue.
Despite the risk, most communities lack **accessible tools** to predict or prepare for floods.
---
## π οΈ Tools & Technologies
| Component | Tools Used |
|----------|------------|
| Programming | Python 3 |
| Machine Learning | Scikit-learn, Random Forest |
| Interface | Streamlit (Web App) |
| Geospatial Processing | Rasterio, GeoPandas, Folium |
| Visualization | Seaborn, Matplotlib |
| Deployment | Offline (Runs Locally) |
---
## π Features
β
Predicts **flood risk** (Low / Moderate / High)
π¦ Accepts real-time environmental inputs
πΊοΈ Shows visual insights from sample data
π Supports GeoTIFF and GeoJSON (optional)
π» Works 100% **offline** after setup
π Clean interface for judges, users & learners
---
## π Project Structure
FloodRiskPredictor_Nigeria/
βββ app/
β βββ app.py # Streamlit interface
βββ data/
β βββ rainfall_data.csv # Sample training data
β βββ elevation_data.tif # GeoTIFF (elevation)
β βββ landcover_data.tif # GeoTIFF (land cover)
β βββ rainfall.geojson # GeoJSON sample overlay
βββ model/
β βββ train_model.py # ML training script
β βββ predictor.py # Model loader/predictor
β βββ flood_model.pkl # Trained model (auto-generated)
βββ utils/
β βββ processing.py # Data cleaning / scaling
β βββ visualization.py # Charts and maps
βββ requirements.txt
βββ README.md
---
## π§ͺ How to Run
### Step 1: Install Requirements
```bash
pip install -r requirements.txt
Step 2: Train the Model (if not already trained)
python model/train_model.p β¦