Power BI is great at visualizing location for maps, it integrates with Bing map via coordinates so it’s easier to tag locations. Bing uses some algorithms and hints to try to get the right location on map.
Today, we are going to create a simple report using map visualization in Power BI and will discuss the features at each step as we go along. For demo purpose, let’s take some data of Geo-location.
You can actually get data directly from a webpage in Power BI, in my case I have chosen Wikipedia, the simpler and free source of information. Open Power BI and click Get Data, a screen with data source options will show up:
Let’s put the URL of the webpage that we want to fetch the data from.
Once you hit OK, it will load all the corresponding tables that are found on webpage. I will choose 120°W table that has the information about the States, Cities etc. along with longitude and latitude, after you check the 120° W table, it will show a preview of what data is available in it.
If the data is not in required form i.e. Columnar Form (recommended for Power BI), we can also edit the data before loading it. After I click Edit button it will open up the Table in query editor and will provide many formatting/editing options that I can choose from.
There are a many things you can do to edit you dataset in query editor so that it provide best result when used it for map visualization.
For example you can use Geo location term for the field name, it helps Bing guess what you want to display, you can ensure fields are correctly geocoded by setting the Data Category on the data fields, you can also add latitude and longitude values to your dataset to remove any ambiguity in the dataset, change data types of the fields according to your requirement and whatever you want to you can.
Once the changes done, my data will look something like below, I can Publish my Dataset now to the Power BI app.
So, after the formatting is complete hit close and apply on top left to publish the dataset to the Power BI app, let’s now play around with our data and create a report using map visualization.
We are having two kinds of map visuals that are bubble map and the other one is filled map , Let’s first use a bubble map visualization to show that a country is having how many cities situated in it. In the example attached below you can see it shows me the count for cities i.e. 11 for United States and the size of bubbles vary according the number of cities in a country.
Sometimes you have data that is little ambiguous like there is a Boston in the UK to resolve this you can use longitude and latitude to make it clear what location you are exactly talking about.
You can edit the map by enhancing it through the format option located just below the visualization pane in which you can change the colors of the bubbles collectively as well as individually, edit the title for the map, toggle label for each bubble, change the background of the map. The example below shows all the available options in format tool.
Similarly you can choose the filled map from the visualization pane and can play around your data to do the same as you did in the bubble map visual.
That is all of creating a report using Google and Bing map visuals on Power BI app, there is more to come on this topic, so stay tuned. Thank you.