Analyzed Egypt’s energy crisis during power outages using data analytics and machine learning. Leveraged Python, SQL, and Power BI to uncover consumption patterns, identify key factors behind energy shortages, and generate actionable insights for better energy management.
# Final-Project
# Egypt-Energy
# Egypt's Energy Sector — Understanding the 2023 Electricity Crisis Through Data
A multi-tool data analytics project analyzing 20 years of Egyptian energy and economic data (2000–2023) to answer one question:
> Was the 2023 electricity crisis a generation shortfall, or something upstream?
The same panel data was analyzed five different ways — SQL Server, Python, Excel, Power BI, and Tableau — so the conclusion wouldn't rest on a single tool or a single chart.
---
## 📌 Project Overview
In the summer of 2023, Egypt experienced rolling power outages. This project tests the obvious assumption — that generation capacity ran out — directly against two decades of production, demand, gas-supply, and macroeconomic data.
**Conclusion:** It wasn't a generation shortage. Generation hit an all-time high in 2023 (221.9 TWh) and stayed above demand all year. The real strain was upstream, in the gas-supply chain — financial arrears, cut exports, and currency depreciation.
---
## 🗂️ Data Sources
The project workbook contains five linked sheets, all loaded into SQL Server with zero missing cells across the entire dataset:
| Sheet | Size | Key Columns |
|---|---|---|
| Annual Panel | 384 rows · 16 countries · 2000–2023 | population, GDP, electricity generation/demand, gas production, renewables share |
| Monthly Gas (Egypt) | 184 rows · 2011–2025 | exports/imports, indigenous production, arrears, EGP/USD rate, avg. temperature |
| Suez Canal Revenue | 22 rows | calendar/fiscal year, revenue (USD billion) |
| Zohr Gas Timeline | 20 rows | Zohr field output vs. national gas production |
| Electricity Tariffs | 77 rows | year, usage tier, price (EGP/kWh) |
Public reference sources for this class of data: World Bank Open Data, IEA, EIA, the Central Bank of Egypt, the Suez Canal Authority, and CAPMAS.
---
## 🛠️ Tools & Methods
### 1. SQL & Python
- Data cleaning: deduplication, date reconstruction, consistency checks
- Feature engineering: ele …