It is the second week of Cohort 5 training now. I still can’t believe that I’m part of the team already. Back in September this year when I decided to apply for The Data School Down Under, I searched many advanced usages online to make my dashboard standout.

Inspired by Jeffrey A. Shaffer’s Crime in Cincinnati, I decided that embedding Google Street View in my dashboard web page would look great and make it stand out, because my data set is about Airbnb properties in Sydney.  Here is the link to my final dashboard in Tableau Public.

Here are the simple steps to embed a Google Street View in dashboard.

 

1. Build a simple map

I use the data from my first interview data Airbnb in Sydney, which can be downloaded from Inside Airbnb.

 

2. Create a dashboard with Map and Web page

For the web page,

  • First, I use the URL from Jeffrey’s article to prefix my Google Maps URL – it allows to overcome the “The Google Maps Embed API must be used in an iframe.” Issue that appears if you use just the URL from Google Maps without iframes. And then change to Sydney latitude and longitude. This will be the default location and size in the web page.

https://www.dataplusscience.com/iframe.html?url=https://maps.google.com/maps?q=@<Latitude>,<Longitude>&ll=-33.97423,151.25518&spn=.0005,.0005&t=h&hl=en&output=embed

 

  • Second, go to Map worksheet, drag Longitude and Latitude to Detail, right click and change to Dimension

 

3. Embed Overhead View

In the web page right click drop down, select Add URL Action.

  • Change the Name to ‘Overhead View’
  • Select ‘Map’
  • In Run action on, choose Select
  • In URL, paste the link and click Test Link to double check

https://www.dataplusscience.com/iframe.html?url=https://maps.google.com/maps?q=@<Latitude>,<Longitude>&ll=<Latitude>,<Longitude>&spn=.0005,.0005&t=h&hl=en&output=embed

  • In URL Target, select Web Page Object so that the overhead view only shows in the dashboard web page
  • Click OK

 

Now when one selects a mark on the map, the web page will show the relevant overhead view, like in the following photo

 

4. Embed Street View

Tableau dashboards only allow one URL in web page, therefore, the Street View button will be added in tooltip 

Link

https://www.dataplusscience.com/iframe.html?url=https://maps.google.com/maps?q=<AVG(Latitude)>,<AVG(Longitude)>&layer=c&z=17&sll=<AVG(Latitude)>,<AVG(Longitude)>&cbp=13,276.3,0,0,0&cbll=<AVG(Latitude)>,<AVG(Longitude)>&hl=en&ved=0CAoQ2wU&sa=X&output=svembed&layer=c

 

 

Randomly click one dot in the map and then select hyperlink of Street View in tooltip. The street view would look like this

 

‘ EXPLORE, FAIL, LEARN. REPEAT, ITERATE, IMPROVE.’

 

Ivy Yin
Author: Ivy Yin