Data Analytics Project

Nigeria's Economy,
Rendered in Data

A ten-year deep-dive into Nigeria's GDP performance, sectoral composition, oil dependency, macroeconomic shocks, digital economy growth, and scenario-based forecasting through 2029, built as a production-grade Streamlit analytics dashboard.

Python 3.11 Streamlit 1.32 Plotly 5.18 World Bank NBS IMF WEO CBN

10 Years Covered (2014 to 2024)
2 Recessions Documented
27.1% Turnout Decline by 2023
8 Dashboard Pages
6 Interactive Scenario Levers

Nigeria is Africa's largest economy by nominal GDP, yet it is also one of the most volatile. Over the decade from 2014 to 2024, it passed through a historic GDP rebasing that briefly made it the largest economy on the continent, two separate recessions, an oil price collapse, a global pandemic, a catastrophic oil theft crisis that drove production to a thirty-year low, and a sweeping foreign exchange reform that cut the dollar value of the economy nearly in half within eighteen months. Understanding any one of these events in isolation is hard enough. Understanding them together, as a connected economic story, is the challenge this dashboard was built to address.

The Nigeria GDP Analytics Dashboard is an eight-page interactive application that brings together annual and quarterly GDP data, sector-by-sector composition analysis, oil production and revenue figures, macroeconomic indicators including foreign exchange rates and inflation, digital economy metrics covering telecoms and fintech, and an interactive scenario builder that lets users model how different policy and commodity conditions would affect growth through 2029. Every piece of data is drawn from primary institutional sources and structured for direct exploration rather than static reading.

This writeup documents the full technical construction of the dashboard: the data sources and why they were chosen, how the application is structured, what each page is designed to reveal, and what the numbers themselves say about Nigeria's economic trajectory over the most turbulent decade in its post-oil history.

"Nigeria rebased its GDP in 2014 and became Africa's largest economy overnight. By 2024, a decade of oil dependence, FX crises, and structural underinvestment had shrunk the same economy in dollar terms to less than one-third of its 2014 peak. The data tells that story with uncomfortable precision." Project Motivation

Ten-Year GDP Snapshot: 2014 to 2024 World Bank · NBS · IMF WEO
GDP Peak (2014)
$568B
Africa's largest at rebasing
GDP 2024
$188B
FX reform impact
Per Capita 2014
$3,203
Highest in decade
Per Capita 2024
$824
74% decline
Inflation 2024
33.2%
From 8.1% in 2014
NGN per USD 2024
₦1,550
From ₦158 in 2014
Nominal GDP in USD Billion
2014
$568.5B
2015
$481.1B
2016
$404.7B ▼ Recession
2017
$375.8B
2019
$448.1B
2020
$432.3B ▼ COVID
2023
$362.8B ▼ FX reform
2024
$187.8B ▼▼ FX slide

Data Sources and Methodology

Building a ten-year economic dashboard requires navigating a fragmented data landscape. Nigeria's statistical infrastructure involves multiple publishing bodies with different methodologies, release schedules, and levels of granularity. This section documents where each dataset came from, why it was preferred over alternatives, and how it was structured in the application.

World Bank Open Data

The World Bank's open data portal at data.worldbank.org provided the foundational annual GDP figures in current US dollars, real GDP growth rates, and GDP per capita. The World Bank uses Nigeria's own National Bureau of Statistics figures as inputs but normalises them to internationally comparable methodologies, making them the appropriate source for cross-temporal analysis. One important caveat is that nominal USD figures are sensitive to the exchange rate used for conversion, which explains the dramatic fall in Nigeria's 2023 and 2024 figures following the FX unification policy.

IMF World Economic Outlook

The International Monetary Fund's World Economic Outlook database, published biannually in April and October, provided two critical inputs: the inflation rate series used throughout the macro indicators page, and the baseline GDP growth projections for 2025 through 2029 used in the forecast page. The October 2024 edition was the primary reference. The IMF also provided cross-validation for the World Bank growth figures where methodological differences appeared.

Central Bank of Nigeria Statistical Bulletin

The CBN's annual statistical bulletin is the definitive source for Nigerian monetary and financial data. The dashboard draws on it for the exchange rate series, external reserves figures, foreign direct investment inflows, and public debt-to-GDP ratios. The CBN publishes data with a nominal USD conversion using the official exchange rate, which creates the apparent paradox visible in the data where oil revenue fell sharply in 2023 despite stable global oil prices, because the revenue base was recalculated at a much weaker naira.

NBS Quarterly GDP Reports

The National Bureau of Statistics publishes quarterly GDP growth figures in their GDP Report series, disaggregated by oil and non-oil sectors. The dashboard uses twenty consecutive quarters from Q1 2020 through Q4 2024, which is the period for which complete and consistent quarterly data is available and which covers the most analytically interesting period including COVID recovery, the oil theft crisis, and the reform-era volatility.

# Quarterly GDP data — oil vs non-oil split
# Source: NBS Quarterly GDP Report Series
QUARTERLY_GDP = [
    {"quarter": "Q2 2020", "growth": -6.10, "oil": -12.61, "non_oil": -5.44},
    {"quarter": "Q3 2021", "growth":  4.03, "oil":  -9.23, "non_oil":  5.44},
    {"quarter": "Q1 2022", "growth":  3.11, "oil": -26.04, "non_oil":  6.11},
    # ... 17 more quarters
]

NNPC Annual Reports and OPEC Data

Oil production figures in millions of barrels per day came from NNPC's annual reports supplemented with OPEC's Nigeria quota and production tracking data. This combination was necessary because NNPC's own reported production figures and OPEC's assessments sometimes differ due to terminal metering disputes. The dashboard uses the average of both sources where they diverge, and the accompanying narrative on the oil page notes this uncertainty.

NCC Annual Reports

Nigeria's telecoms and internet penetration data, used on the digital economy page, came from the Nigerian Communications Commission annual reports. The NCC publishes quarterly data on active mobile subscriptions, internet subscribers, and broadband penetration that is not available from any international aggregator at comparable granularity. Fintech company counts were sourced from CBN licensing data and industry reports by EFInA (Enhancing Financial Innovation and Access).


2024 GDP Sector Composition Source: NBS Annual GDP Report 2024
Services
55.5%
Agriculture
27.8%
Manufacturing
7.5%
Construction
3.5%
Oil and Gas
5.5%

Oil fell from 14% of GDP in 2014 to 5.5% in 2024, yet still accounts for roughly 85% of export earnings.

Application Architecture

The dashboard separates its concerns cleanly across three layers. Data lives in one place, chart-building logic lives in another, and page content lives in a third. This structure means that updating a figure, changing a chart style, or adding a new analytical page each require touching exactly one file rather than searching across the entire codebase.

Entry Point
app.py
Sidebar navigation · Global CSS · Page router · Dark theme
Pages Layer
overview.py
growth.py
sectors.py
oil.py
macro.py
digital.py
shocks.py
forecast.py
Each exports show() · Independently testable · Imports from data and utils only
Utilities Layer
utils/charts.py
DARK template dict
SECTOR_COLORS
dark() · growth_bar()
stacked_area() · heatmap()
Single source of truth for theme · All charts share identical visual language
Data Layer
data/gdp_data.py
ANNUAL_GDP dict
QUARTERLY_GDP list
get_annual_df()
get_quarterly_df()
get_sector_wide()
All raw data · Helper functions return pandas DataFrames · No file I/O at runtime

The Forecast Page Design

The most technically involved page is the forecast page, which implements a parametric growth model driven by six Streamlit slider widgets. The model starts from a baseline growth rate of 3.5 percent, then applies additive adjustments for each lever: oil price deviation from the $80 baseline, oil production deviation from 1.6 million barrels per day, foreign exchange stability score, reform implementation pace, security index, and agricultural investment level. Each lever is converted to a growth point impact using coefficients derived from historical sensitivity analysis of the Nigerian economy.

# Parametric scenario model
base_growth   = 3.5
oil_factor    = (oil_price - 80) * 0.02 + (oil_output - 1.6) * 1.2
reform_factor = (reform_pace - 5) * 0.3
fx_factor     = (fx_stability - 5) * 0.15

scenario_growth = [
    round(base_growth + oil_factor + reform_factor + fx_factor + i * 0.15, 2)
    for i in range(5)
]

The result is displayed as a three-way chart showing the user's custom scenario alongside the IMF baseline projection and a shaded confidence band, with the ten-year historical trace for continuity. A live average growth metric updates instantly as sliders move, with colour-coded labels ranging from "Strong" through "Moderate" to "Recession Risk" depending on the output.


Dashboard Pages and Chart Choices

Each of the eight pages was designed around a primary analytical question. Chart types were chosen not for visual variety but for whether they made the specific pattern or relationship in that data as immediately legible as possible.

🏠Overview and KPIs
Five headline metrics, a dual-axis bar and line combining nominal GDP with real growth rate, sector donut for the most recent year, a per capita versus inflation dual-axis chart with annotated shock vertical lines, and an event timeline card grid covering all eleven economic events from 2014 to 2024.
📊GDP Growth Trends
Annual growth bar chart with recession band shading, quarterly growth line chart showing oil versus non-oil splits from 2020 to 2024, a waterfall chart showing cumulative growth decomposition, and a shaded area chart of nominal GDP size with recession highlights.
🏭Sector Analysis
Year-selector donut and ranked horizontal bar showing sector composition for any year from 2014 to 2024. A stacked area chart traces how the composition shifted over time. A colour-scaled heatmap maps eight subsectors by eleven years of growth rates. A drilldown shows any individual sector's share trajectory.
🛢️Oil and Non-Oil Economy
Production versus Brent price dual-axis chart with OPEC quota line overlay. Oil revenue versus exchange rate dual-axis. Quarterly oil versus non-oil growth bar and line. Six structural challenge cards covering oil theft, refining deficit, OPEC compliance, Dangote Refinery, revenue dependency, and energy transition risk.
🌍Macro Indicators
Naira collapse area chart with four annotated devaluation events. Inflation and unemployment dual-line chart with crisis zone shading. Reserves bar chart with comfort threshold line. Debt to GDP area with elevated risk band. FDI versus remittances grouped bar with combined total trend line.
💻Digital Economy
Internet users and mobile subscriptions dual-line chart. Fintech company count bar chart with gradient opacity encoding growth intensity. Telecoms share of GDP area chart. Telecoms versus finance subsector growth dual-line. Six ecosystem highlight cards covering unicorns, mobile money, open banking, tech talent, e-commerce, and infrastructure gaps.
Economic Shocks
Annotated growth bar chart with all eleven shock events marked and colour-coded by impact type. Expandable event cards with year-specific macro metrics for every shock. A two-recession comparison table contrasting 2016 and 2020. A radar chart scoring four major shocks across six impact dimensions simultaneously.
🔮Forecasts and Scenarios
Six interactive sliders driving a parametric growth model. Output chart overlays historical data, IMF baseline with confidence band, and user scenario. A three-track bull, base, bear scenario chart with shaded range. Expandable scenario assumption tabs listing specific conditions for each track. Six strategic recommendation cards.

Key Findings

Non-Oil Resilience

The quarterly data tells a story that the annual figures obscure. While the oil sector contracted in nineteen of the twenty quarters between Q1 2020 and Q4 2024, the non-oil economy grew in eighteen of those same twenty quarters. Nigeria's economic narrative has been dominated by oil's travails, but the services sector, agricultural base, and telecoms industry have proven remarkably independent of oil performance. The Q1 2022 quarter is the starkest example: oil contracted by 26 percent year on year, yet non-oil grew by 6.1 percent and the overall economy expanded by 3.1 percent.

The Per Capita Catastrophe

Nigeria's per capita GDP figures are the most sobering numbers in the entire dataset. The country went from $3,203 per person in 2014 to $824 in 2024, a 74 percent decline in a single decade. To put this in perspective: the average Nigerian's share of their country's economic output, measured in internationally comparable dollars, is now lower than it was in 2001. Population growth contributes to this decline, but the exchange rate collapse is the dominant factor. When the naira lost roughly ninety percent of its dollar value between 2014 and 2024, every Nigerian effectively became poorer in global terms regardless of what happened to real output.

The Digital Counternarrative

Against the backdrop of macroeconomic deterioration, the digital economy page presents a genuinely different story. Internet users grew from 67 million in 2014 to 173 million in 2024. Mobile subscriptions reached 230 million. The fintech sector expanded from 30 companies to over 1,000 in the same period, with several reaching billion-dollar valuations. Telecoms grew from 8.5 to 15.2 percent of GDP. This is not just a feel-good number: it represents a structural diversification that did not exist at the start of the decade and that makes the non-oil economy more resilient to future oil shocks than the 2016 recession might suggest.

The Debt Service Trap

Public debt as a percentage of GDP rose from 11.5 percent in 2014 to 47 percent in 2024. In absolute terms this sounds manageable by international standards. But Nigeria's tax-to-GDP ratio is approximately six percent, among the lowest in the world for an economy of its size. The consequence is that debt service now consumes more than 70 percent of federal retained revenue. This is not a solvency problem in the conventional sense, but it is a fiscal capacity problem: every naira that goes to debt service is a naira that cannot go to infrastructure, healthcare, education, or the kind of productive public investment that would allow growth rates to rise sustainably above five percent.

The Scenario Analysis Insight

The most valuable finding from the forecast page's scenario builder is how sensitive the long-run growth trajectory is to the foreign exchange stability lever versus the oil price lever. A $20 per barrel increase in oil prices adds approximately 0.4 percentage points to the annual growth scenario. But moving the FX stability score from 3 to 7 on a ten-point scale adds 0.6 percentage points to the same scenario. This reflects a structural reality in Nigeria's economy: investor confidence, import costs, manufacturing competitiveness, and diaspora remittance flows are all more sensitive to exchange rate predictability than to oil price levels within the ranges historically observed.


Annual Growth and Macro Summary

YearGDP (USD Bn)Real GrowthPer CapitaInflationNGN/USD
2014$568.5B+6.31%$3,2038.1%₦158
2015$481.1B+2.65%$2,6549.0%₦197
2016$404.7B–1.62%$2,17815.7%₦305
2017$375.8B+0.81%$1,96816.5%₦306
2018$421.9B+1.92%$2,14812.1%₦306
2019$448.1B+2.21%$2,22911.4%₦306
2020$432.3B–1.79%$2,09713.2%₦380
2021$440.8B+3.65%$2,08517.0%₦410
2022$477.4B+3.25%$2,19318.8%₦430
2023$362.8B+2.74%$1,62328.9%₦900
2024$187.8B+3.40%$82433.2%₦1,550

Sources: World Bank Open Data; IMF World Economic Outlook Oct 2024; CBN Statistical Bulletin; NBS Annual Reports.


Tools and Technology

Python 3.11
Core runtime for all data processing, statistical modelling, and application logic.
Streamlit 1.32
Application framework. Provides the page routing, sidebar, sliders, selectboxes, tabs, and expanders used throughout the dashboard.
Plotly 5.18
All interactive charts. Bar, scatter, waterfall, area, heatmap, radar, gauge, treemap, and pie chart types are all used across the eight pages.
Pandas 2.0
DataFrame construction from dictionary data, pivot tables for the heatmap, groupby aggregations for zone summaries, and column arithmetic for derived indicators.
NumPy 1.26
Parametric scenario calculations and the statistical operations underlying the forecast page growth model.
Plotly Express
Higher-level chart API used specifically for the sector treemap and the scatter bubble chart on the forecast page.

References and Data Citations

  1. World Bank (2024). Nigeria GDP, GDP Growth, and GDP Per Capita: Annual Data 2014 to 2024. World Bank Open Data. data.worldbank.org/country/NG
  2. IMF (2024, October). World Economic Outlook Database: Nigeria Country Data. International Monetary Fund. imf.org/WEO
  3. NBS (2024). Quarterly GDP Report: Q1 2020 to Q4 2024. National Bureau of Statistics, Federal Republic of Nigeria. nigerianstat.gov.ng
  4. CBN (2024). Statistical Bulletin Vol. 35: Exchange Rates, Reserves, FDI, and Debt Data. Central Bank of Nigeria. cbn.gov.ng
  5. NNPC (2023). Annual Statistical Bulletin: Crude Oil Production and Revenue 2014 to 2023. Nigerian National Petroleum Corporation. nnpcgroup.com
  6. OPEC (2024). Annual Statistical Bulletin: Nigeria Production and Quota Data. Organization of the Petroleum Exporting Countries. opec.org
  7. NCC (2024). Subscriber and Operator Data: Quarterly Reports 2014 to 2024. Nigerian Communications Commission. ncc.gov.ng
  8. EFInA (2023). Access to Financial Services in Nigeria 2023 Survey. Enhancing Financial Innovation and Access. efina.org.ng
  9. Trading Economics (2024). Nigeria Macro Data: Inflation, Unemployment, and Brent Crude Price Series. tradingeconomics.com/nigeria
  10. World Bank Nigeria Brief (2024). Nigeria Economic Update: Advancing Reforms Amid Headwinds. World Bank Group. worldbank.org/country/nigeria
  11. Streamlit Inc. (2024). Streamlit Documentation. docs.streamlit.io
  12. Plotly Technologies Inc. (2024). Plotly Python Graphing Library Documentation. plotly.com/python