# Africa-fuel-price-energy-affordability-
# ⛽ Africa Fuel Price & Energy Affordability Analysis
### Built with SQL Server & Power BI | By Isah Joshua
---
## 📌 Project Overview
Designed and developed a complete end-to-end data analytics project
analysing fuel prices and energy affordability across 6 African
countries — Nigeria, Ghana, Kenya, South Africa, Egypt and Ethiopia
— from 2020 to 2023. The project covers the full data pipeline from
raw data cleaning in SQL Server through to a 4-page interactive
Power BI dashboard with 27 DAX measures.
---
## ❓ Problem Statement
Fuel prices across Africa vary significantly and have a direct impact
on the daily lives of citizens. Governments use subsidies to shield
consumers from global oil price volatility but with mixed results.
This project investigates price trends, subsidy impact, black market
premiums and energy affordability relative to minimum wages across
6 countries over 4 years.
---
## 🎯 Objective
To clean, transform and analyse 119,922 rows of real-world messy
fuel price data and deliver actionable insights around price trends,
energy affordability, black market activity and data quality — all
through an interactive 4-page Power BI dashboard.
---
## 🛠️ Tools Used
- Microsoft SQL Server (SSMS)
- Power BI Desktop
- DAX (Data Analysis Expressions)
- Power Query
- Data Visualization Best Practices
---
## 🔧 Data Preparation & Cleaning
- Imported 119,922 rows of raw messy data into SQL Server staging table
- Applied a 15-step SQL Server cleaning pipeline covering all major issues
- Standardised 30+ country name variants to 6 standard names using CASE
- Parsed 9 different date formats to YYYY-MM-DD using TRY_CONVERT
- Stripped all currency symbols from the price column using chained REPLACE
- Standardised currency codes to ISO 4217 format (NGN, GHS, KES, ZAR, EGP, ETB)
- Removed ~6,000 silent duplicate records using CTE ROW_NUMBER deduplication
- Flagged and removed negative prices, extreme outliers and inval …