Power BI Playbook is for sale - email us at hello@powerbiplaybook.com for enquiries.
Close Icon

Better Power BI Maps using Mapbox

‍Summary

  1. Mapbox will elevate your Power BI map game
  2. Installation and configuration
  3. Prepare your Data to visualise correctly
  4. Further Mapbox resources

Morning! Adam here with this week's issue of Power BI Plays.

When I create reports for clients that incorporate maps, I always get a "How did you do that?" or better yet, "What did you use to build this?"

And the honest truth is that it's straightforward. Mapbox. Once you set it up once, you'll never go back. Let's get it.

  • **Note, I am not sponsored or linked to Mapbox in any way - it's just an awesome tool that helps me, which I think may help you too.***

Mapbox will Elevate your Power BI Game.

Power BI stock map visuals are extremely underwhelming.

Switch to Mapbox and watch your reports come to life. Instead of using words to prove it, I'll show some images.

Simple, elegent, no contest.

Installation and Configuration

1. Head to https://account.mapbox.com/auth/signup/ and create an account - it's free.

2. Note your Default Public token located on the Account page within Mapbox (first/home page). You can either use this or create report-specific tokens:

3. Head over to Power BI Desktop and Install the Mapbox Power BI visual into by clicking the three dots under the visuals panel and selecting "Get more visuals:

Search "Mapbox" in the top right, then select the thumbnail.

Click "Add," and the visual will now be available to use.

4. Back in Power BI Desktop, drag and drop the visual onto your canvas and open Format > Viz Settings. From here enter your Access Token from MapBox (Step 2 above) and ensure your settings look like mine (we're trying to emulate the pictures above but feel free to play around with the settings - you won't break anything).

5. Next, head down to "Choropleth" and ensure it's switched on. Also, make sure you only have one option selected here (i.e. turn all other options off).

Here you can change your map styling, zoom, and the actual map contained in the visual. For our purposes, choose "Level 1" for Level and "Global Countries" for Data Level 1. This configuration will give you a standard world map which is a great starting point.

Prepare your data

For your data to appear correctly on a Mapbox map, you must use Mapbox's naming conventions. Now this is in no way the correct country name - it simply matches your data to the Mapbox visual.

  • **Should you need to avoid country names (as I have in the past), either add a disclaimer page to your report or build a custom tileset (more on that below).***

At the time of writing, it was a little tricky to find this list as the instruction pages are no longer available. So here it is; I have also made a coit, so if this disappears, let me know.

https://docs.google.com/spreadsheets/d/1k5HvzWdeuELwnL-Ta1Jt7wghOOrRpmQU438_LfohBEI/edit?pli=1#gid=0

Use this file to reference your country name. If your country name doesn't match the corresponding name in this file precisely (capital letters, commas, etc.), it will not appear on the Mapbox visual.

Once mapped, it should look a little something like this:

Further Mapbox resources

This article only scratches the surface of Mapbox's capabilities.

Built into Power BI are a world map and a USA map but should you need custom maps (like the China map above), you will need to create your own tileset.

I will start to create some video tutorials to run through creating custom tilesets and applying them to Power BI reports.

For now some further reading:

Here is the current Mapbox tutorial: Mapbox

Here is the old tutorial specific to Power BI: Wayback Machine

That wraps up this week's edition of Power BI Playbook's Power BI Plays.

I hope it helps, and as always feel free to email or DM me any time.

Adam

TL;DR:

  • Avoid out-of-the-box Power BI Maps
  • Use Mapbox instead, it's free
  • Install from Appsource
  • Match country names to Mapbox list
  • Explore further customisation.

Look at you go you mapping genius, you.

Actionable tips to take you from developer to Power BI business owner

Written by humans. We'll never share your data
Thank you! The Reports are yours!
Be sure to check your junk if you don't see our confirmation email.
Oops! Something went wrong while submitting the form.