π‘ 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
- Connect Power BI to OpenWeatherMap β to fetch weather data in real time.
- Transform JSON responses in Power Query β to clean and standardize the data.
- Design visuals that show temperature, humidity, and pressure.
- Add interactivity with slicers, tooltips, and drillthrough pages.
- 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:
- Power BI can handle live APIs, not just static data sources.
- Error handling in Power Query is essential when dealing with real-time data.
- DAX measures are the secret to responsive dashboards.
- Good design is clarity β simplicity and focus always win.
- 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)