Select the column English short name (upper/lower case) right-click > Rename … and change the name into Country.
Select the whole column Link to ISO 3166-2 subdivision codes right-click > Remove. If you wish, change the name of the dataset: I turned mine into Countr圜odeISO. The key codes are Alpha2 and Alpha3 ISO standard definition of 2 or 3 characters for a country. Click Edit Queries.Īs you can see, the dataset contains a country name and country ISO code. This table needs some modifications, too.
In the preview window select the table Officially assigned code elements and click Load. Select Get Data > Web and insert the following URL: Now we are ready to import the second dataset we need: the ISO Country mapping list. Once you’ve completed the transformations Home > Close and Apply, then save the Power BI file. Ukraine/Russia must be converted in Ukraine with Replace Values. There’s another wrong value in the country from row 86. “France#(cr)#(lf)#(lf)Switzerland#(cr)#(lf)#(lf)Germany” simply with “France”. Transform > Replace Values and replace the string The country is tripled, but the correct one is France. Scroll the dataset up to row 67, Mulhouse. Then we must perform some data cleansing. Select the whole column Rank change 2015-16, right-click > Remove. Repeat the operation for both fields Passengers 20. In Value To Find write a comma (,) and leave blank Replace With. In the upper menu click Transform > Replace Values. The fields Passengers 2015 and Passengers 2016 are imported as text, but we want them as number, because we are going to do some calculations. On the left side of the page right-click the dataset and choose Rename. Maybe you want to modify the name I called mine 2016 statistics. The dataset must be edited before using it click Edit Queries and do some changes. In the preview window select 2016 statistics (provisional) and then click Load to import the table in Power BI. In the window insert the following URL: List of the busiest airports in Europe Open Power BI then select Get Data > Web. Ok, up to this point we’ve got a map: now we need some data and we collect them from Wikipedia.įirst step, the list of top 100 busiest airports in Europe. You can download them from his GitHub repository. He started creating and collecting some maps for the community. But they can apply to Power BI as well, once converted to TopoJSON.Īlternatively, there are some TopoJSON map already formatted from David Eldersveld. He created some geographic maps to use for Mobile Report Publisher. json file on your hard disk.Ī good reference for where to find out shape maps, is Christopher Finlan’s blog. Mapshaper imports the file and shows you a preview.Ĭlick Export and choose the TopoJSON format. zip shapefile you want to convert, then click Import. Open a browser and go to an online converter.Ĭlick on the word select in the page box and pick up the.
zip archive holds the shapefile definition, but we need a TopoJSON file for using in Power BI. Rather than the country name, we must take care that in our dataset there’s a field with the same ISO code. It is the table file for the shape that encodes all data description.Ĭolumns ISO2 and ISO3 are the most interesting as they contain the ISO code for every country. Unzip the archive and use Excel (or another spreadsheet) to open the file Europe_countries_shp_custom.dbf.
zip file called Europe_countries_shp_custom.zip. You can download a sample from the bottom of the page a. To demonstrate custom shape maps let’s say we want to display the number of airport passengers in Europe, ranked by country.įirst thing we need a shape map. It means that you must know the data definition under the hood of your maps or at least you must be capable of opening and reading a shape map’s data table.
In order to use custom shape maps the same rule as built-in applies: there must be a matching field between data and maps attributes.
Now it’s time to dig into the way to create your own shape map from the scratch and to display it in Power BI.
In the previous article, I gave you an overview of what a shape map is, which files it’s made of and I showed you how to use the standard built-in maps available in Power BI. In the ToC below the article you can find out references to the previous articles and the project’s goal. This is the third article of a series dedicated to discovering geographic maps in Power BI.