Visualizing Geographic Data using Google Data Studio
In this blog post I’ll provide some examples of how to visualize Geographic data using Google Data Studio.
UPDATE: You can now visualize geographic data using Google Maps
Since this was written there have been some big changes to Google Data Studio. One major changed was the inclusion of Google Maps as a chart type.
You can read more about using Google Maps to visualize your Geographic Data at this link.
Visualizing Geographic Data using Google Data Studio
For this example of how to visualize Geographic data in Data Studio I’ll use a table listing the world’s tallest buildings.
Here’s an example of how the table is structured:
Rank | Building | City | Country | Height (m) | Height (ft) | Floors | Built |
1 | Burj Khalifa | Dubai | United Arab Emirates | 828 | 2,717 | 163 | 2010 |
2 | Shanghai Tower | Shanghai | China | 632 | 2,073 | 128 | 2015 |
3 | Abraj Al-Bait Clock Tower | Mecca | Saudi Arabia | 601 | 1,971 | 120 | 2012 |
4 | Ping An Finance Centre | Shenzhen | China | 599 | 1,965 | 115 | 2017 |
5 | Lotte World Tower | Seoul | South Korea | 554.5 | 1,819 | 123 | 2016 |
Now let’s see if we can visualize the data in Google Data Studio.
The first step is to add the data, which I’ve placed in a Google Sheet.
We’ll need to make sure that the field City is listed as a Geo data type. This will allow the data to be displayed on Geo Maps in Data Studio.
When then need to confirm we are fine with having City as a ‘Town/City’ geo data type.
We now add the data to the report.
We click ‘Add to Report’ to add to Data Studio.
Creating a ‘Count’ Custom Field
But we need a count of all the different Building.
To do this we create a custom field called ‘Count’.
We click ‘Add a Field’ and then use the following formula:
COUNT_DISTINCT(Building)
This counts each individual Building name as ‘1’.
Creating Geo Maps in Google Data Studio
Once we have our Count field we can create some maps.
Click on ‘Add a chart’ and then choose a custom Geo Map.
To create the map we will use the dimension Country and the metric Count.
We now have a world map counting the number of buildings in each country.
But we’d also like to create a world map showing which cities have the most tall buildings.
So we can copy and paste the world map we already created.
We then change the dimension ‘Country’ to ‘City for the map.
We now have two different world maps. One showing the number of tall buildings in each country, while the other shows the number of tall buildings in each city.
The finished Geographic Data report in Google Data studio
Below is the finished Data Studio report, with a table listing the world’s tallest buildings.
I hope you found this blog post about how to visualize geographic data in Google Data Studio useful.
My Other Blog Posts
If you liked this blog post, you might enjoy some of my previous articles.
Hi Michael, Very nice and clear series of posts! One possible tip – I found it cool to overlay the city view over the country or region view , then set the opacity for the city map to about 30. This allows showing both the views in a little less space. The tradeoff is you only get interaction with the top layer but sometimes it is a good trade!
I hadn’t thought of that! Will try that method out. Thanks for the advice, really appreciate it! 🙂