Power BI – Shape map (Algeria)

In this tutorial, you will learn how to create and add a custom map to the Shape map visual of Power BI. I choose my beloved country Algeria as an example.

  • Find shape map on the web
  • Create the JSON shape map file
  • Add the JSON file to Power BI visual

Step 1 : Find shape map on the web

It’s pretty easy to find shape of any map on the internet. For the Algerian map, you can download it from the Algerian national Institute of Cartography and remote sensing website, here. Once the RAR file downloaded, you need only to extract the folder « division administrative polygone_dza »

Step 2 : Create the JSON shape map file

To create the JSON file, we will use the website mapshaper.org.
You have to drag all the files from the extracted folder into the mapsharper editor then you click on Import.
You will get the map of Algeria that you have to download by clicking on the Export button, in the TopoJson format.
As shown in the image :

Export in TopoJson

Step 3 : Add the JSON file to Power BI visual

First, because is still as preview features, you have to add the Shape map visual feature from the option menu :

Select the Shape map from options

We have a table with the name of departments, we call them wilayas in Algeria, and value for each wilaya.
You choose the shape map from the visualization pane, then put wilaya in the Location field and value in color saturation and you will get the USA map as a result

Shape map visual
First result

In the format pane, click on the + Add map and select the JSON file created in step 2

Add JSON file.

And you will get this beautiful filled map that you can customize in the format pane

Map of Algeria

By clicking in the button View map keys, you can see the region names and their keys. This will help you when you create your data table (you have to write the region names in the same syntax).

That’s it. I hope that this tutorial will help you. And don’t hesitate to ask any question.
See you in my next post. Enjoy 😊

Publicités

3 commentaires sur “Power BI – Shape map (Algeria)

Répondre

Entrez vos coordonnées ci-dessous ou cliquez sur une icône pour vous connecter:

Logo WordPress.com

Vous commentez à l'aide de votre compte WordPress.com. Déconnexion /  Changer )

Photo Google

Vous commentez à l'aide de votre compte Google. Déconnexion /  Changer )

Image Twitter

Vous commentez à l'aide de votre compte Twitter. Déconnexion /  Changer )

Photo Facebook

Vous commentez à l'aide de votre compte Facebook. Déconnexion /  Changer )

Connexion à %s