Logo Lanfrica

dinerohh/power_outage_prediction_kplc

Domain:

digital infrastructure

Record type:

project
Creator:
din
Host:
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 …