Connecting Google Maps API to Tableau

Heghine Arakelyan
3 min readAug 23, 2023

--

This article dives into an innovative approach to visualize guest satisfaction trends in three European cities — Athens, Barcelona, and Lisbon. A key feature is the integration with Google Maps, allowing users to transition from the dashboard to a corresponding location on Google Maps. This integration enables the reader to explore closely where the stay locates, nearby buildings, streets, shops, etc.

I’ve applied this technique at my workplace to create dynamic dashboards featuring geographical points and was excited to share it with the community of data enthusiasts, but due to the confidentiality of the original dataset, I replicated the process using a dataset sourced from Kaggle.

To outline cities and their shapes, I utilized the shapefile of Europe obtained through my request from https://eurogeographics.org/ and added it as a layer on the map.

For this article, I’ll focus solely on integration with Google Maps. In the future, I plan to cover topics such as spatial joins and map layers in Tableau.

How to integrate a Google satellite image within a Tableau dashboard:

Before proceeding to the main steps, I would display the first five rows of my dataset, which have already been cleaned and transformed for the dashboard. This will provide a clearer understanding of the context.

Below are the main steps that will help you to build above shown dashboard:

Step 1: Start by placing the sheet containing the map onto the dashboard as an object. Ensure your map includes points with latitude and longitude coordinates. You can generate these points using the function below.

MAKEPOINT([lat],[long])

Step 2: Add a Web Page component to your dashboard using the Objects menu. Leave the “Edit URL” dialog box empty and click “OK.”

Step 3: Navigate to the Dashboard menu in the top toolbar, choose Actions, check “This workbook” under “Show actions for,” and then click “Add Actions.”

Step 4: From the “Add Actions” dialogue box, select “Go to URL…”.

Step 5: Choose the Source Sheet, which is your map object, and from the “URL Target” menu, select “Web Page Object.”

Now, for the trickier bits…

Step 6: Write the simplified version of the Google Maps URL In the URL field.

https://maps.google.com/maps?q=<lat>,+<long>&z=18&t=h&output=svembed
  • &z=18 indicates the zoom level
  • &t=h indicates the map type (t=h signifies a satellite view).

Step 7: Replace the <lat> and <long> fields with your dataset’s actual “Latitude(generated)” and “Longitude(generated)” fields. You can do this by selecting the “Insert” menu next to the URL field and then click “OK.”

Voilà, your dashboard is ready.

Step 8: Publish your dashboard on your local server or Tableau Public, then verify its functionality by clicking on the map points.

This feature proved invaluable for me in closely examining useful map objects. I hope it will be as valuable as it was in my case.

Here you can find my Linkedin profile, Tableau profile and related dashboard.

--

--

Heghine Arakelyan

Data analyst| Business analyst| Passionate about analyzing insights, shaping data stories