Nigerian Exchange Rate Analysis using Web Scraping and Power BI
This project demonstrates how to fetch daily foreign exchange rates from the official Central Bank of Nigeria (CBN) website using a Python script, save the data into a CSV file, and create interactive visualizations in Power BI.
It’s a practical application of web scraping using APIs, combined with business intelligence reporting.
-
Python Web Scraping
- Uses the
requestslibrary to extract exchange rate data from the CBN API. - Converts the JSON data to a DataFrame using
pandas. - Saves the cleaned data to
Nigeria_Exchange_Rate.csv.
- Uses the
-
Power BI Visualization
- Imports the CSV file into Power BI.
- Visualizes exchange rates for multiple currencies over time.
- Enables date-based comparison of rates such as USD, Euro, Pound Sterling, CFA, Yen, and more.
- Python (
requests,pandas) - Jupyter Notebook
- Power BI Desktop
- CBN Exchange Rate API
https://www.cbn.gov.ng/api/GetAllExchangeRatesGRAPH
| File Name | Description |
|---|---|
Web Scrapping using Api.pdf |
Contains the Python code to fetch and save exchange rate data |
Web Scrapping using Api Visuals.pdf |
Screenshots and output from Power BI dashboard |
Nigeria_Exchange_Rate.csv |
Output CSV file generated by the Python script (not included by default) |
- 📆 Daily exchange rate trends
- 📊 Multiple currency tracking (USD, EUR, GBP, CFA, YEN, etc.)
- 📈 Visual comparison over different dates
- 🔍 Easy-to-use interface for exploration
Note: This dashboard is a conceptual learning project, not an official financial tool.
-
Clone the repository
git clone https://github.com/Oluwakoya-ao/nigerian-exchange-rate-analysis.git
-
Run the Python script (from Jupyter Notebook or terminal):
# In a Jupyter cell or Python script fetch_and_save_data()
This will save a file called
Nigeria_Exchange_Rate.csv. -
Open Power BI Desktop, import the CSV, and recreate the visuals.
- Understand how to extract live data using APIs
- Practice data handling and transformation using Python
- Build professional dashboards using Power BI
This project was developed as part of the Data Analytics – Deep Dive Mentorship Program.
Special thanks to the original creator of the project, who kindly granted permission to replicate and learn from their work.
Oluwakoya Oluwafemi
Data Analyst | Power BI Developer
📧 oluwakoyafavour@gmail.com
🔗 LinkedIn Profile