Star Wars: who has the longest lines?

Who gets the longest lines
Click the image to explore the data

Matt Francis showed me a work in progress version of his excellent Star Wars script dashboard. I ended up playing with the dataset myself, and explored who had the longest lines. Did you know Obiwan Kinobi has the longest line in all the films*? Princess Leia has the longest line in Star Wars: A New Hope.

To see an interactive version, click here.

I also came up with a novel idea to make Tableau Filters more obvious to end-users. Check out how, here: “Turn your column headers into filters

Lots of people are doing stuff with #StarWarsData – go check it out.

* by “All the films” I’m excluding episodes 1, 2 and 3 because they just don’t count, do they?

Joy of six: dynamic multi-member groups

First off, let me say that I do not take credit for the contents of this post. Credit is due to Joe Mako and Richard Leeke who responded to my questions on the Tableau Forum. This is a good time to say that if you aren’t using the forum yet, get over there to ask or answer all manner of Tableau questions from the trivial to the fiendish.

I am posting this solution because it is such a sweet use of calculated fields. Here’s the scenario: “I want the user to be able to see the top n customers’ average sales. They should be able to control the “n” value, and show or hide all the rest of the customers.” Here’s the answer:

I’m afraid I am not going to go through the solution. Why? Well, I barely understand it myself, and I don’t think I’d be able to explain it properly. I recommend you download the workbook and look at the forum thread to work it out. Otherwise, just be in awe at the work of Joe and Richard!

Happy birthday #FridayMix

Those of you who follow me on twitter (@acotgreave) will probably know that most Fridays I get involved in the rathe excellent FridayMix. This week it reaches its first birthday. I downloaded the full list of all 3500+ tracks that have appeared on a FridayMix and produced this viz of the most popular artists.

But I want to Comment…

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.

In the meantime, if you do have any comments – mention @acotgreave or @datarockstar in a tweet!

Text-labelled bars: beyond the default

By default, Tableau won’t label a bar. The axis is enough for viewers. However, a lot of our users say to us, “We like the bar, but we want to see the numbers as well“. Rather than reproduce a bar chart as a table, labelling the bars is the obvious way to go. Tableau provides an obvious way to do this, but this viz below shows 3 other ways you can label the bars.

Example one in the above viz is the default – just copy the Measure that’s on the Columns shelf to the Text shelf of the Marks card:

Default text

In Example two, I’ve added Color to the Marks shelf to get a stacked bar chart. By default, the Text marks would now appear in each segment. If you still want the total label visible, you need to add a Reference Line. Right-click on the axis and choose Add Reference Line…

You then need to add a Line with the following settings:

Totals Reference Line

That’s cool – you’ve done some labelling that is outside of Tableau’s default behaviour. What if you want to add some allowable bling to your chart, ie do something visually attractive, but stick to the principles of good visualisation? Well, you can put the text label inside the bar.

The third example, with the white text inside the right-hand edge of the bar, is also acheived with a Reference Line. To do this, create a reference line with the same settings as the previous example.  Now select the Reference Line and choose Format…

Format Reference Line

On the Format panel, set the Reference Line Label Alignment to Left-Align (horizontal) and centrally aligned (vertical). Change the Shading to 0% and the Font to white. Bingo! Your text is now inside the right-hand edge of the bar.

The fourth example, aligning the text at the left-hand edge of the bar, next to the category label, was something of a quest for me after seeing that it can be done relatively simply in Excel. To achieve this, we need to twist some of Tableau’s other functionality to suit our needs!

The first step is to remove the Measure mark from the Columns shelf, and put it onto the Text shelf. Yes, that means we have just created a table, not a chart. Stick with me, we’ll get there. Now put a copy of the same Measure onto the Size shelf. Still looking a bit wacky? Ok, the final step is to change the Mark type from Automatic to Bar:

Left-aligned text in a bar

You should now have your left-aligned labelled bar.

The techniques for examples 3 and 4 can enhance your Tableau charts. There are some restrictions to these two though:

  • They only work on horizontal bars
  • If one value is very low, the label may not appear correctly
  • For the left-aligned text (example 4), it works best with a big range of values.

You may also have noticed that I have hidden the axes on all of the charts above. I believe that if you are going to put text-labels on the bars, it’s bad practice to also show an axis.

To get a better idea of how to do this, download the workbook to see how I built it all up.

Golf score analysis: Scandinavian Open

I like disc golf. It’s the same kind of thing as ball golf, but played with discs (“frisbees”). Instead of holes in the ground, discs are thrown to metal targets. Just like ball golf, there’s a plethora of stats generated. This weekend saw the Scandinavian Open take place in Sweden. This is one of the biggest events in the calendar, and draws the top players from around Europe and the USA. The guys put the scores up promptly, so I thought I’d take their data, and visualise the results.

I created two dashboards using their results:

The Player dashboard

The Hole by hole dashboard

General election 2010

Here in the UK we have just been through (and, at the time of writing, are still enduring) a general election. This presents us with some fantastic datasets. The first place I turn to is the Guardian Data Store, and they provided this, which allowed me to create Election results dashboard below.

I won’t comment much on it, but it does utilise three tricks that I hope to explore and explain in the coming weeks:

  • Hyperlinks on sheets
  • Conditional formatting on tooltips
  • Positioning the text label in the bars

Enjoy the viz, and please post and comments below.

Why start another Tableau blog?

Those who know me from the Tableau forums or Twitter, or the UK Tableau User Group know that I love Tableau.Those that don’t know me: well, I work at the University of Oxford, and have been using Tableau since December 2007.  Since then, I have been raving about it, Ancient Mariner style, to anyone who catches my eye.

It’s been inevitable that I’d set up a blog. What do I hope to add the world of Tableau knowledge?

  • A repository for hints-and-tips on Tableau
    There aren’t many people blogging about basic/advanced Tableau jedi tips. The inspiration for this approach is from blogs such as Daily Dose of Excel – a great place to learn things.
  • A showcase for mine and others’ Tableau Public visualisation
    There are several other great blogs doing this, and I hope this blog adds to the general commentary
  • Occasional discussions of other info viz related matters

I hope to help everyone advance their Tableau knowledge. Along the way, we’ll learn some things that are useful on a day-to-day basis, and some things that you may never need, but could inspire you to think differently about things.

Let me know what you want to see me cover. Are there any beginner/jedi tips not covered in Tableau’s excellent Learning Centre?