The government today published details of which quangos they are going to abolish. It’s pretty ruthless. Here’s an interactive viz using data from the Guardian Data Blog:
Click on the Share button above to embed the viz in your own blog/webpage
I see that Interflora is suing M&S over the latter’s keyword piggy-back tactic. I notice that this is also happening in the Fast Analytics world:
Warning! This post discusses disc golf. If you’ve not heard of it, just imagine I’m referring to “normal” golf.
Here’s my leaderboards, made using their data. The first shows the ranks of the players, showing you how many birdies and bogies they got. You can click on a player, or multiple players, to see how they did in each round (this viz will be updated as round scores are available; you may only see Round 1 scores for a day or so):
The second viz shows how we can use the data to analyse things other than players. Because we know how everybody scored on every hole, we can adapt the viz to analyse each hole, and see which played the hardest or easiest:
Both of these dashboards can be seen in full screen. Click here for the player dashboard, and here for the hole-by-hole dashboard.
There’s a chart doing the rounds that shows who is suing whom in the telecoms industries (eg at the Guardian). David McCandelish has improved it nicely here, and asked the question of whether companies who’s revenue is going down are more litigious than those on the rise. Well, I took his data from here and created the charts below.
There are lots of caveats: I excluded Smartphone Technologiess LLC because the data didn’t say if their revenue was up or down. That’s a shame, because they’ve got the most lawsuits open. Also, we don’t know if the revenue was going up or down when the lawsuit was started.
PS – for Tableau geeks, the tooltips on the chart are using my Conditional Formatting trick (click here) to make the text colour change depending upon Revenue Direction.
[Update: in theory, v6.1.1 has made it easier to create the bars described in this post by using REPLACE() and SPACE(). However, at time of writing (19 Aug 2011) there is a problem: while the solution works fine in Tableau Desktop, the view won’t display on Tableau Public – have a look at the “Using REPLACE and SPACE() tab in the embedded workbook below. The calculations have also been optimised using parameters.]
Consider this map:
It highlights one of many situations when pie charts don’t work. The smallest pies are so small you have no chance of making out the size of the slices. And what if I wanted to show Profits on the viz, as well as Sales and Product Type?
The Tableau guys have come up with a way of using Gantt Bars to emulate a bar chart and maybe solve some of these problems. This works okay, but has its own flaws; mainly that it’s still hard to make out the individual bar segments.
Well, how about using a bar chart inside a tooltip? Surely you can’t do that? Well, yes you can:
The viz above solves several problems. The circle size is based on Sales, and Profit by colour. And the tooltip shows the proportion of sales of each Product Type. With just a mouse-hover, you’ve revealed a new dimension on the data. Three dimensions on one map viz – bingo!
How do we do this? Well, first we need to decide if our dataset is suitable. First of all, you need a known number of values in your tooltip-chart dimension, because we’ll be creating a calculated field each one. In the above, we only have four Product Types, so that’s a suitable candidate. Secondly, there is a maximum length that the bar can be. Too long and it will wrap around in the tooltip. As we’ll see, the bar is built using a text string, so we can’t just have an unlimited bar with a value in the 100s. Percentages work best as they are going to have a maximum value of 100.
For each Product Type, we need two calculated fields. One works out the percentage of sales of that product type:
and the other works out the length of the bar. How do you build a bar out of text? Simple: use the ALT+219 ASCII character. That’s this one: █. You create it by pressing the ALT key and then 219 on the Number Pad (using a laptop? Copy and paste the one in this blog instead!). We need to create a parameter – [Bar] – which is one loooong string of 100 █ characters, and then create a calculated field that is a subset of that, based upon the % value in your other calculated field. Here’s the text of that field:
LEFT([Bar],ROUND([% coffee sales]))
Now we have two calculated fields for each Product Type. Drop them all onto the ever-so-useful Level of Detail shelf, and now you can build your tooltip as follows:
You’ve done it! You’ve now become a tooltip genius. Using the skills we’ve learned in our other tooltip posts (basics here, and conditional formatting here), your tooltips can be as jazzy as your vizzes themselves!
Those of you who are big Excel users may know where the inspiration comes from. This post gives a huge Tip o’ The Hat to the posts from Juice Analytics, Daily Dose of Excel, Jon Peltier, and Chandoo that showed us all how to do in-cell charts in Excel in the last few years. Also, thanks to Richard Leeke on the Tableau forum for giving me the last piece in the jigsaw for this idea: Excel has a REPT function that can be used to create the long string. Tableau doesn’t. Richard pointed out that the only way round this is to type the string out manually and take a substring of it. Nice!
I played in the Croydon Cyclone last weekend, a part of the British Disc Golf Association national tour. One hole’s layout was controversial. It’s short, a distance that almost any player can reach from the tee. The designers spiced things up by surrounding the basket and most of the fairway with Out-of-Bounds areas that incurred a one-shot penalty, and required a rethrow, from the tee. What had in previous years been a really easy hole became a cruel score card nightmare. I took the stats of all the scores from the score cards and did the viz below.
You may have noticed that our blog doesn’t allow you to make comments. We can assure you that this is not because we don’t value conversation! It’s simply taking us time to implement all the features we want on the blog. Much as we’d love to be blogging full-time, clients have pressing demands and we haven’t been able to implement the comments section yet.
The XX won the Mercury Prize last night. It’s a great album. I personally would have preferred Wild Beasts or the Villagers, but they were a little “out there” for a thinly-veiled sales generator. You can see my Mercury Prize Tableau viz below (or click here for a full screen version). I also created a Spotify playlist of all the artists (well, the ones who are on Spotify!). You can get that playlist here.
This is the second post about tooltips. In this post, I will describe a technique to add conditional formatting, of a sort, to your viz. This isn’t a natively supported feature in Tableau (although it would be lovely if it was!), so you have to do a bit of extra work to do it.
I’ve implemented colour-based conditional formatting in a few Tableau Public dashboards. My disc golf analysis dashboards use colour to emphasise the good/bad performance of players. Click here to go to the viz; the tooltips are below.
If the player played better than their rating, they’d get this tooltip:
If they played worse, they’d see this tooltip:
I’ve also used colour to represent a political party’s colour, as shown in my UK General Election viz. The main dashboard is here, but I’ve embedded one of the worksheets below. Hover over the different parties (Labour, Conservative, etc) to see the different colours in the tooltips:
There are a few limitations to using colour. Essentially, this boils down to having a Dimension or Group where the possible values are known ahead of time and are relatively small. Why’s this? Because to take advantage of conditional tooltips, you need to create a specific calculated field for each Dimension value.
Here’s the steps to create the coloured Party tooltip in the General Election dashboard.
That’s it! All but one of the calculated fields will be Null at any one time (since you can’t hover your mouse over more than one mark at a time). Therefore, despite there being four items in the tooltip, the viewer only ever sees one. And it just happens to be in the correct colour. Bingo!
Tooltips are the missing link between a mark and its underlying data. They provide a valuable opportunity to explain more about the chart without requiring the user to examine the underlying data.
The motivation for these posts was seeing so many vizzes on great charts on Tableau Public being let down by the publisher leaving the tooltips in their default state. It’s easy to think this okay, but the tooltip is an eager beaver: even viewers with hyperactive mouse movements are guaranteed to hover long enough for the tooltip to appear. Given that’s the case, you want to make sure you’re showing the user something pretty!
I’ll start off with basic good practise tips; later posts will look at advanced techniques to make your tooltips shine.
My first rule when publishing a viz, is to put a “Header” into the Tooltip. The header should be the mark’s primary dimension, or a summary. For example, consider the default tooltip on the Sales Outliers sheet in the Wow Workbook:
I can’t deny that the tooltip has all the info and, yes, the tooltip is an elaboration of the mark. But it doesn’t really draw the eye, or encourage fast interpretation. Now let’s see what the Tableau staff actually did to the tooltip when they released the workbook:
See what they did? They moved the two main dimensions,
When building your viz, some of the dimensions/measures you add to the worksheet might be necessary for the viz itself, but have no meaning for the viewer. For example, here’s the default tooltip from my visualisation of Pub Closures in the UK:
As you can see, the are two dates, yr and Year. One is a year, and the other is a date. The latter is necessary in the viz to use a continuous scale on the x-axis, but meaningless for the viewer; all they care about is the year. Delete the unnecessary data from the tooltip.
If you’re using aggregations or table calculations in your view, the default label might be something crazy like “% of Total Count of Rate:” This isn’t always too intuitive. Look again at the default tooltip from the Pub Closures viz (above).
“Difference in Min. year_number”? What? Well, it’s a nice description of the table calculation, but it’s a terrible description of the information. In this viz, it really represents “Years since party came into power”. By making all the labels meaningful, you can end up with this:
Make sure the most important information is at the top of the list, if that’s relevant. Continuing the work on our pub closures tooltip, we should improve the tooltip like this:
If the tooltip has quite a lot of information in it, it can be better to turn the fields into a complete sentence that fully explains the mark. A long list of labels, colons and values can be confusing. Here’s how the final tooltip for the Pub Closures viz looked:
That’s it for this first post. Next time, we’ll look at a couple of advanced tooltip tips.