Machine Learning system to predict power outages in Kenya...
# β‘ Kenya Power Outage Prediction System
Machine Learning system to predict power outages in Kenya using historical data, weather patterns, and grid information.
## π― Project Overview
- **Student:** Hope Williams
- **Institution:** JKUAT
- **Program:** BSc. Data Science and Analytics
- **Duration:** 3 months (Feb - Apr 2026)
## π Features
- Predict power outages 1-24 hours in advance
- Estimate outage duration
- Forecast electricity load demand
- Web-based dashboard
- SMS alerts (optional)
## π οΈ Tech Stack
- **Python 3.10**
- **Machine Learning:** XGBoost, Prophet, Scikit-learn
- **Data Sources:** EPRA, Kenya Power, OpenWeatherMap
- **Web Framework:** Flask
- **Deployment:** Render/Heroku
## π Project Structure
```
βββ data/ # Data storage
β βββ raw/ # Raw data from sources
β βββ processed/ # Cleaned data
β βββ external/ # External datasets
βββ notebooks/ # Jupyter notebooks for exploration
βββ src/ # Source code
β βββ data_collection/ # Data scraping scripts
β βββ preprocessing/ # Data cleaning
β βββ models/ # ML models
β βββ utils/ # Helper functions
βββ models/ # Trained model files
βββ static/ # CSS, JS, images
βββ templates/ # HTML templates
βββ requirements.txt # Python dependencies
```
## π Getting Started
1. Clone the repository
```bash
git clone
github.com
cd kenya-power-outage-prediction
```
2. Create virtual environment
```bash
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
```
3. Install dependencies
```bash
pip install -r requirements.txt
```
4. Set up environment variables
```bash
cp .env.example .env
# Edit .env with your API keys
```
5. Run the application
```bash
python app.py
```
## π Data Sources
- **EPRA:** Official electricity statistics
- **Kenya Power:** Social media announcements
- **OpenWeatherMap:** Weather da β¦