DEV Community

John Wakaba
John Wakaba

Posted on

🌍 Building a Live Weather Dashboard for East Africa Using Power BI and OpenWeatherMap API

πŸ’‘ Introduction

Have you ever wished you could monitor real-time weather conditions across multiple cities β€” all in one dashboard?

This project started with a simple question:

β€œCan I connect Power BI directly to a live API and visualize up-to-date weather data?”

The answer turned out to be yes.

Using the OpenWeatherMap API, I built an interactive Power BI dashboard that tracks live temperature, humidity, and pressure for four East African cities β€” Nairobi, Mombasa, Kampala, and Kigali.

This article walks you through the journey, design decisions, and insights.


🧩 The Problem

Weather data in East Africa is often scattered across various platforms β€” news sites, mobile apps, and government portals. Comparing weather conditions between cities can be time-consuming and inconsistent.

As a data analyst, I wanted a unified, automated, and interactive dashboard that could:

  • Fetch live weather data automatically
  • Display real-time metrics
  • Let users explore and compare cities with intuitive visuals

In other words, a single dashboard where data meets interactivity.


πŸ›  Tools & Approach

Tool Purpose
Power BI Desktop Data visualization and dashboard design
Power Query (M language) Connecting and transforming API data
OpenWeatherMap API Live data source for weather metrics
DAX (Data Analysis Expressions) Creating dynamic interactivity
GitHub Hosting project files and documentation

The Workflow

  1. Connect Power BI to OpenWeatherMap β€” to fetch weather data in real time.
  2. Transform JSON responses in Power Query β€” to clean and standardize the data.
  3. Design visuals that show temperature, humidity, and pressure.
  4. Add interactivity with slicers, tooltips, and drillthrough pages.
  5. Publish & document the project for sharing and reproducibility.

🎨 Designing the Dashboard

The dashboard is minimal, clean, and interactive.

At the top, three cards display the current temperature, humidity, and pressure for the selected city.

Below, a bar chart compares temperatures across all four cities.

A city slicer allows filtering, while hover tooltips and drillthrough pages reveal more details about each city.

Dashboard Highlights

Feature Description
🌍 City Filter (Slicer) Filter visuals by city dynamically
🌑 Interactive Cards Display temperature, humidity, and pressure in real time
πŸ“Š Bar Chart Comparison Compare temperatures across multiple cities
🧭 Drillthrough Page Explore detailed city metrics
πŸ’¬ Tooltip Page Get insights by simply hovering
πŸ” Automatic Refresh Updates data directly from the API

πŸ“ˆ Insights & Key Takeaways

After visualizing the live data, a few trends became clear:

  • Mombasa consistently shows the highest temperatures, typical of coastal climates.
  • Kigali and Kampala are cooler and more humid due to their higher elevation.
  • The ability to compare cities side by side reveals regional climate variations in real time.

This dashboard goes beyond static reports β€” it offers contextual, live weather insights at a glance.


🧠 Lessons Learned

Building this project was a practical exercise in real-world API integration within Power BI.

Here are the biggest takeaways:

  1. Power BI can handle live APIs, not just static data sources.
  2. Error handling in Power Query is essential when dealing with real-time data.
  3. DAX measures are the secret to responsive dashboards.
  4. Good design is clarity β€” simplicity and focus always win.
  5. Parameterizing API keys keeps your work secure and scalable.

🧭 Why This Project Matters

This project demonstrates how data visualization and API integration can solve everyday challenges β€” from environmental monitoring to urban planning.

For organizations, such dashboards can:

  • Support agriculture by tracking temperature and humidity trends.
  • Aid energy planning by monitoring pressure and heat variations.
  • Help logistics and travel businesses adjust operations based on weather.

The concept extends beyond weather β€” it’s a blueprint for any real-time data visualization project.


Top comments (0)