Mctaba Labs logo
BootcampData ScienceThe WhiteboardProjectsEventsMasterclassesWebinarsLearn
Book CallApply

500+ developers already in the community

Get answers, find accountability partners, and stay ahead

Join Discord →
Mctaba Labs logo

Educating 1 million students in tech by 2030.

Programs

  • Coding Bootcamp in Nairobi
  • Data Science to AI Engineering
  • HighSchool Graduates Launchpad
  • AI & Business Automation
  • Corporate Training
  • Kids & Teens
  • McTaba Story & Mission
  • Full-Stack Curriculum
  • Course Pricing & Plans
  • Frequently Asked Questions

Resources

  • Join Discord Community
  • Tech Events in Nairobi
  • Masterclasses
  • Free Resources
  • Learn
  • Data Science Guides
  • African Payments Reference
  • Campus
  • Africa Tech Talent Report
  • Partner With Us
  • Start a Project
  • Software & AI Studio
  • Our Work
  • Outcomes

Contact Us

  • 124 Manyani East Road, Lavington, Nairobi
  • +254727795603
  • Book a Discovery Call

Office Hours:

Mon-Fri: 9am - 2pm EAT

Sat: 10am - 12pm EAT

© 2026 Mctaba Labs - A product of Edtech Industries. All rights reserved.

Privacy PolicyTerms of ServiceRefund Policy
  1. Learn
  2. Data Science in Kenya
  3. Kenyan Open Datasets: Where to Find Real Data to Practise On
Bonaventure OgetoBy Bonaventure Ogeto|Updated November 3, 2026

Last checked 3 November 2026

Kenyan Open Datasets: Where to Find Real Data to Practise On

Start with the Kenya National Bureau of Statistics for the census, the Economic Survey and county abstracts, the Central Bank of Kenya for rates and mobile payment totals, the World Bank for CSV downloads, and HDX for humanitarian maps and health data. Each source below was opened on 3 November 2026.

In this article

  1. 1. Why practise on real Kenyan data
  2. 2. The list: what is inside, in what format
  3. 3. Your first pull: Kenya population from the World Bank
  4. 4. Beyond Kenya, and what to build

Why practise on real Kenyan data

McTaba runs coding and data bootcamps in Kenya. This guide is written to be useful whether or not you ever join one.

A portfolio on the Titanic passenger list tells an employer nothing about you. A chart of county populations, or of mobile payment totals from the central bank, shows you can handle messy public data on a question Kenyans care about. This list is part of our data science career map.

We opened every link below on 3 November 2026 and list only sources that loaded. Government sites move pages often, so expect some paths to change. If a link breaks, search the site by its name.

Check each source's licence or terms before you republish its data. Cite it in your project.

The list: what is inside, in what format

SourceWhat is insideFormatChecked
Kenya National Bureau of Statistics (KNBS)Economic Survey, statistical abstracts, county statistical abstracts, CPI and inflation, quarterly GDP, gross county product, the 2019 census, labour force and demographic health reportsMostly PDF reports; portals for survey microdata3 November 2026
Kenya Open Data portalGovernment datasets, many with maps. The site now runs on the ArcGIS Hub platformDepends on the dataset, often CSV or map layers3 November 2026
Central Bank of Kenya statisticsExchange rates, the Central Bank Rate, KESONIA, treasury bills and bonds, balance of payments, inflation, mobile payments, diaspora remittancesWeb tables and PDF reports3 November 2026
Humanitarian Data Exchange (HDX), KenyaHumanitarian and development datasets: boundaries, population, health, food security. Its search reported 656 datasets matching "kenya" in our checkCSV, Excel, shapefile and others, by dataset3 November 2026
World Bank Data, KenyaWorld Development Indicators on people, economy, environment and institutionsCSV, XML, Excel and an API3 November 2026
World Bank Microdata LibraryHousehold and enterprise survey data from many countries, including KenyaSurvey files, with documentation3 November 2026
The DHS ProgramDemographic and Health Surveys: births, child health, family planning, household assetsSurvey files, with documentation. Read the site for how to request access3 November 2026
openAFRICAA volunteer-run repository of open data from across Africa, searchable for Kenyan setsVaries by dataset3 November 2026

Sources: KNBS, Kenya Open Data, CBK, HDX, World Bank Data, DHS, openAFRICA, checked on 3 November 2026.

Our Data Science to AI Engineering programme has you finish 24 weekly projects, so public data like this gets plenty of use.

Get weekly developer tips

Join 25,000+ developers. Practical guides, job tips, and new content — straight to your inbox.

No spam. Unsubscribe anytime.

Your first pull: Kenya population from the World Bank

The World Bank is the easiest start because it has a plain web API. This code pulls Kenya's total population by year. Run it, then plot it.

import json
import urllib.request
import pandas as pd

url = ("https://api.worldbank.org/v2/country/KE/"
       "indicator/SP.POP.TOTL?format=json&per_page=100")
with urllib.request.urlopen(url, timeout=30) as r:
    rows = json.load(r)[1]
pop = pd.DataFrame(rows)[["date", "value"]].dropna()
pop["year"] = pop["date"].astype(int)
print(pop.sort_values("year").tail(3))

The API answers with two parts: a header, then the rows, which is why the code takes the item at position 1. Swap the indicator code for another from the World Bank site to get a different series.

Project ideas by source

  • KNBS county abstracts: compare two counties on a question you care about, using the tables in the PDF. Data science in Kenyan agriculture shows where this leads.
  • CBK mobile payments and exchange rates: chart how payment totals move over time.
  • HDX and DHS: health and population questions. See data science in Kenyan healthcare.

PDF tables need extra work. The pdfplumber method in analysing your M-Pesa statement applies to them too.

Beyond Kenya, and what to build

Kaggle hosts competition data and user uploads. For a mobile money practice set, see mobile money fraud detection with machine learning. To learn the platform itself, read Kaggle for beginners.

Pick one question, one source and one chart. Write what you cleaned and what you assumed. Then publish it, since employers ask about projects like this.

If you would like a cohort, mentors and a capstone to go with it, see our Data Science to AI Engineering programme, starting 11 January 2027 at KES 140,000.

Key Takeaways

  • ✓KNBS, CBK, HDX, the World Bank and DHS are the five best starting points for Kenyan data.
  • ✓Much official data is in PDF. Learn to extract tables from it.
  • ✓The World Bank API is the quickest way to your first real pull.
  • ✓Cite the source and its date in every project.

Frequently Asked Questions

Is there an official Kenya open data portal?
Yes. The government runs a Kenya Open Data portal at opendata.go.ke, which now runs on the ArcGIS Hub platform. KNBS also lists its own data portals on its home page.
Where do I get Kenya census data?
From KNBS. Its site lists the 2019 Population and Housing Census, with earlier censuses, and county statistical abstracts.
Can I download World Bank data for Kenya as CSV?
Yes. The Kenya page on World Bank Data offers CSV, XML and Excel downloads, and the same data is available through its API.
Are these datasets free to use in a portfolio?
Most are free to read. Check each source's terms before you republish the data, and cite the source in your project.

Learn data science on African data

KES 140,000

Data Science to AI Engineering: 5 months full time or 8 months part time, hybrid in Nairobi. Fraud, credit and M-Pesa data from Week 1, and every model deployed. Starts 11 January 2027.

See the Data Science programme

Need it live by next month? Our studio builds it

Related guides

  • The Statistics You Actually Need for Data Science
  • Data Science Roadmap for Beginners: 6 Months, Week by Week
  • Python for Data Science: Your First 30 Days

Keep reading

Analyse Your M-Pesa Statement in Python

Turn the PDF Safaricom emails you into a clean table, a spending breakdown and a chart, with code you can run on your own laptop.

Read more

Kaggle for Beginners: Your First Competition

A plain walk through your first Kaggle entry: account, notebook, baseline model, submission file and the habits that make the second try better.

Read more

Data Science in Kenyan Agriculture: Five Real Uses

Satellite crop insurance, farm credit scoring, crop disease detection, a national farmer registry and drone mapping on fish farms: five uses, sourced, with the skills each needs.

Read more

Data Science in Kenyan Healthcare

Where data science is used in Kenyan healthcare today, sourced to named systems and studies, plus what the Data Protection Act 2019 limits and the skills the work needs.

Read more

Explore related topics

Breaking Into Tech

Practical, no-nonsense guides for anyone looking to start or change their career in tech. From choosing your first language to acing interviews.

Tech Salary Data

Transparent salary data for tech roles in Africa and worldwide, updated regularly with real market research.

AI Skills & Tools

Practical AI knowledge for developers. Build your first agent, get good at RAG, and pick the right AI coding tools for real work.

Bonaventure Ogeto

Bonaventure Ogeto

Founder and CEO, Mctaba Labs

Software engineer for 8+ years. He runs a Nairobi studio that ships products on M-Pesa, WhatsApp and AI, and teaches what the studio ships. He holds a BSc in Mathematics and Computer Science.

More about the author