Power consumption forecasting for Tetouan City (Morocco) from SCADA time-series data, using XGBoost and Random Forest.
# β‘ Power Consumption Prediction β Tetouan City (Morocco)
> Forecasting the electrical power consumption of Tetouan City in 10-minute windows from SCADA time-series data, using **XGBoost** and **Random Forest**.
---
## π Project Overview
The goal of this project is to accurately predict the electrical power consumption of **Tetouan City** in 10-minute windows. By leveraging machine learning β specifically **XGBoost** and **Random Forest** β we aim to optimize the management of the distribution network based on historical data and environmental factors.
## π’ Context & Data Source
The dataset was collected by the **Supervisory Control and Data Acquisition System (SCADA)** of **Amendis**, the public service operator in Tetouan.
The city's distribution network is powered by **3 zone stations**:
1. Quads
2. Smir
3. Boussafou
The dataset covers a full year (**January 1st β December 30th, 2017**) and includes environmental metrics that influence energy demand.
## π Dataset Description
Observations recorded every 10 minutes.
| Feature | Description |
|---|---|
| Date Time | Timestamp (10-min windows) |
| Temperature | Weather temperature (Β°C) |
| Humidity | Weather humidity (%) |
| Wind Speed | Wind speed (km/h) |
| General Diffuse Flows | General flows (air/water) |
| Diffuse Flows | Specific diffuse flows |
| Zone 1, 2, 3 Consumption | Power consumption (kW) for each station |
## π οΈ Technologies & Models
- **Language:** Python
- **Libraries:** Pandas, scikit-learn, Matplotlib, Seaborn
- **Models:**
- **XGBoost Regressor** β chosen for its efficiency on structured data
- **Random Forest** β used as a baseline for performance comparison
## π Results
- XGBoost outperformed the Random Forest baseline on the test set.
- *(Add your concrete metrics here: RΒ², RMSE, MAE per zone.)*
## π Repository Structure