Power BI Custom Maps — Part II: Shape Map
By: Selina Li
Tags: Melbourne, Power Bi, Custom Map, Housing Prices, Girls In Tech

Shape Map

In Power BI Desktop, open a new page.

Step 1: Enable Shape Map in options

First, we need to enable Power BI Shape Map visual.

To enable Shape Map, select File > Options and Settings > Options > Preview Features, then select the Shape Map Visual checkbox. Click “OK”.

Then restart Power BI Desktop.

After restarting Power BI Desktop, we can see Shape Map icon from the Visualizations pane.

Step 2: Create a Shape Map

Click the Shape Map icon and you will see a chart is created

Drag Suburb to the Location shelf, and you will see a shape map created for the United States

In “Format” tab of the Visualization pane, click “Shape”

You can see here “Map” is by default “USA : states”, that’s why we see a default shape map created for the United States

In the “Map” dropdown menu you will see a list of shape maps available in Power BI:

Look at the list and we will find no shape map available for what we want here — Melbourne: suburbs.

We should then use “+ Add Map” to create a custom shape map for Melbourne suburbs.

Step 3: Download VIC suburb/localities shapefile from website

We can download Victoria suburb/localities shapefile from this website: https://data.gov.au/dataset/ds-dga-af33dd8c-0534-4e18-9245-fc64440f742e/distribution/dist-dga-3b946968-319e-4125-8971-2a33d5bf000c/details?q=melbourne%20suburb

The downloaded file is named “viclocalitypolygonshp.zip”. If you unzip it, you will see shape file with suffix “.shp”.

Power BI custom shape map supports TopoJSON format. So we need to convert shapefile into TopoJSON using tools such as Map Shaper.

Step 4: Convert shapefile into TopoJSON

Go to Map Shaper, and drop the downloaded zip file in

Then you will see page like this:

Check “snap vertices” — this will fix topology errors by snapping together points with nearly identical coordinates. Then “Import”

Then you will see the polygon map for the whole of Victoria.

Click “Export” in the upper right corner, select “TopoJSON”, then “Export”

One file named “VIC_LOCALITY_POLYGON_shp.json” will be exported. Keep it for use below.

Step 5: Add a custom shape map

Back to Power BI Visualizations pane, click “+ Add Map”

In the prompted window, select the file “VIC_LOCALITY_POLYGON_shp.json” you exported in Step 3, and “Open”

Wait for a while and you will see the map changes into the Victoria suburb polygons.

Now go to Fields pane, drag Median Price into “Color saturation” shelf

Wait for a while and you will see Victoria suburb polygon in different colors

Step 6: Configure zoom

Looking at the map, we can see that only the central below part is colored. We want the map to focus on those colored suburbs only.

To do this we can go to “Format” tab, click “Zoom” and turn on “Auto zoom”

Wait for a while and we can see we are now much zoomed in:

But I want to zoom in further. To do this we might turn off “Auto zoom” and turn on “Manual zoom” — BUT DON’T rush to do this as you will find zooming in and out both very slow.

As an alternative, we can consider filtering out the two “outlier” suburbs in the leftmost and rightmost and keep the central part only.

To filter out, keep “Auto zoom” on. Go back to “Fields” tab, scroll down to “Filters” > click “Suburb is (All)” > keep “Basic filtering” > check “Select all” > uncheck “BELLFIELD” and “HILLSIDE”

Now we can see the map is centered:

Step 7: Change data color

By default, green color means high price and red color means low — this looks weird.

We can configure this a bit by going to “Fields” tab > “Data colors” > change “Minimum” to light red and “Maximum” to dark red

Then the map will look like this:

Step 8: Play with it!

Use your mouse to hover over the suburbs and you can see tooltips for each of them

Play with it as you like!

Found Shape Map not user-friendly?

The shape map is visually wonderful but not that user-friendly as the page is not quite responsive to format changes. The page loads slowly. Also, it is hard to zoom in and out and thus has limited interactiveness.

In the next part, we will see how we can import Mapbox from the marketplace and create a fancy interactive Mapbox 3D Choropleth Map, which is more responsive and interactive.