1. KPIs and time segments
In this screencast we're going to build two different worksheets: one for our KPIs, and one to use our KPI metrics within the tooltips on the map. The map will also display donut charts for each station.
Let's begin by building our KPI metrics.
Let's move From Station Name to columns,
And then right-click on Measure values and Add to sheet (this is a great way to add KPIs).
We need three particular values: the number of docks,
the count of all trips,
and the average duration by hour.
Let's get rid of the rest.
Let's exclude the Null column as this won't get mapped.
When using these metrics in tooltips,, Tableau will match on Station Name, so let's remove the header here to prevent unnecessarily crowding our tooltips.
OK, we have our KPIs, let's build our map, longitude, latitude.
We'd like to be able to filter and get information on specific stations.
Let's add From Station Name to tooltips,
And let's show a filter on station names,
Then we're once again going to layers marks on the map using dual axis. We're also going to layer into tooltips another worksheet with KPIs. This is a great way to add more value to a viz.
So let's go ahead with our dual axis by adding latitude again.
Our leftmost latitude will be used for time blocks, so let's drag the corresponding field to Color, to get the proportion of trips for each time segment. Right now it just colors the dots with one color, which is not really what we want.
We want the proportion, so we're going to make it a pie chart. And what we have now is a pie chart, but still not what we're looking for: we just have 25% for each time block, or 33% if no trips were taken during one of the time blocks. Once again we want the proportion, so we drag the count of trips to angle. And now the visual representation we have is accurate.
Let's increase the size to 50%, which will help us to create a donut chart in just a second.
Let's make the rightmost latitude marks white, which allows us to turn our pie charts into donut charts,
And activate the dual axis to layer them up and actually get our donut charts.
Now let's polish our tooltips for All.
Let's have our station name on top,
Bigger than the other parts,
emphasized with Tableau Bold,
In a distinct color.
Now is the time to insert our KPIs. So we click Insert,
From Sheet,
And select our KPIs by Station sheet.
Let's keep max width and height standard, but know you can adjust those if necessary.
Let's center it all.
And now let's look at it! We have our station name, and then its KPIs by time segment. However we don't have anything for the station as a whole. So first we need to add the metrics to Detail on Latitude 2, and then
So let's now modify the tooltips corresponding to the white dots to get the actual station metrics, and this time we are just going to hard code them.
We need the station name,
We need the count of trips,
The number of docks,
And the average trip duration.
Make it all nicer to look at like we did before,
And let's see how it renders.
2. Let's practice!