Tanzania's Telecom Evolution: An Interactive Data Story
Ever wondered how Tanzania’s telecom giants have battled for market dominance over the years? Or how mobile money transformed from a novelty to an essential service for millions?
Let me show you. Grab the slider and explore:
Tanzania’s Telecom Subscribers: The Battle for Dominance
What you’re seeing:
- Vodacom’s commanding lead, peaking at nearly 30 million subscribers
- Yas (formerly Tigo) emerging as a strong challenger with 26M+ subscribers
- Airtel holding steady around 20-21 million
- Halotel’s impressive growth to 14 million subscribers
- TTCL struggling to stay relevant in the mobile era
The Mobile Money Revolution
The story here is fascinating:
- M-Pesa dominates with 28 million subscriptions (powered by Vodacom’s network)
- Mixx by Yas has surged to 20.7 million users
- Airtel Money holds third with 11.7 million
- Halo Pesa grew to 6.2 million subscribers
- The landscape shows how telecom infrastructure directly translates to financial services adoption
Pretty cool, right? Now let me tell you how I built this…
From PDFs to Racing Bars: The Journey
The Tanzania Communications Regulatory Authority (TCRA) publishes detailed quarterly reports—years of data packed into PDFs. I knew this goldmine deserved better than static tables.
The process:
Step 1: The Great PDF Heist First, I wrote a Python script to systematically download all those quarterly reports from TCRA’s website. Nothing too fancy, just good old web scraping to collect all the data in one place.
Step 2: Enter Gemini Here’s where things got interesting. I could have manually extracted data from dozens of PDFs (nightmare fuel), but instead, I enlisted Gemini 2.5 Pro to do the heavy lifting. I fed it the PDFs and asked it to extract the telecom and mobile money subscription data, then format everything into a nice, clean dataset.
This was honestly my biggest learning experience. Getting AI to reliably extract structured data isn’t just about asking nicely—it’s about crafting prompts that are clear, specific, and iterative. I spent quite a bit of time refining my approach, and watching Gemini consistently deliver clean data was incredibly satisfying.
Step 3: Bringing Data to Life With my clean data in hand, I turned to the racing-bars library, which uses D3.js under the hood. Now, ideally, I’d love to recreate this entirely from scratch with D3, but hey—we’re going for MVPs here! This library does exactly what I need, and it does it well.
What I Learned
Prompt engineering matters. Getting Gemini to consistently deliver clean, structured data required clear, specific prompts and iteration. The difference between mediocre and excellent results came down to prompt craftsmanship.
Svelte is delightful. Coming from React, Svelte’s simplicity and reactivity model felt refreshing. Clean, maintainable, performant.
Sometimes the best solution is the practical one. Sure, I could rebuild the entire racing bar chart from scratch, but using a well-maintained library let me focus on the story I wanted to tell with the data.
Data tells stories. These charts show Tanzania’s digital transformation: market disruptions, successful launches, and the democratization of financial services.
Want to Learn More?
Questions about the methodology? Want to explore the raw data? Have suggestions for future projects?
Reach out at harvey@kadyanji.com—I’d love to hear from you!
Data sourced from TCRA quarterly statistical reports. Charts are interactive—drag the slider to explore different time periods!