Sunday, 20 May 2018

Using 24 colours in Tableau

Yet again Tableau tells me it's running out of colours
I've found a solution that works, it also adds a retro touch as it brings back some of the classic template colours us Tableau old timers grew to know and love. 
I click on edit colours, and I select the Classic 20 palette, and then I only change the colours corresponding to 20-23 where it's reusing colours for 0-3, making sure I select the colours in the old palette that no longer exist in the new. 

Friday, 4 May 2018

BBC News website Carto election map epic fail

Meanwhile, in the land where elections happen on Thursdays, this is what happens to the public broadcaster website on the day after!

Sunday, 22 April 2018

Real time train passenger analytics

Last week while sitting in a train I noticed that the displays show train loading infographics about the passengers per carriage. Coming out of London there were a couple of full carriages.

Once we made the first stop, enough passengers got off to tilt the picture from half full to definitely half empty.

Saturday, 24 March 2018

Unhiding invisible peaks hidden by the axis

This week I was dealing with a very 'peaky' dataset where the peak was close to the axis. Imagine something starting like this but with thousands of rows following:
The default bar chart in tableau was hiding the very first mark, which is the big peak, under the axis. Only the axis range going up to a much higher numbers than the visible bars was hinting at the hidden peak.
The mark was there and was becoming visible if I selected it. Selection in tableau by default adds a border, which suggested a solution to make the peak visible:

Tuesday, 30 January 2018

Converting UK national grid to latitude longitude Python function from Hannah Fry

I found Hannah Fry's python function useful with a dataset in national grid coordinates. It's not something that could be done easily in a Tableau calculated field as it is an iterative calculation that converges to the solution. Hannah Fry does have a Tableau connection though; she was a keynote speaker in the London Tableau conference on tour a few years ago. That presentation gave some key insights on Tom Cruise's central upper tooth, as well as showing pictures of two clones of Hannah with symmetrical faces, one based on the left side of her face and one based on the right hand side!

Wednesday, 29 November 2017

Tableau repositioning itself with regards to data preparation

For those of us that used Tableau for years, the changes in every version always seem to remove some need for external tools/code for data preparation. Think of the introduction of filled maps, the union feature, the excel data interpreter, the pivot and split, the spatial file connector (don't mention the pdf connector!). While certain Tableau partners/consultants are still keen on the Tableau-Alteryx stack, I'm not convinced of its long term market viability, and neither was Gartner last time I checked. The latest announcement on Project Maestro is a rather aggressive move from Tableau's side into traditional Alteryx territory.

If you do want my advice, learn some basic scripting, some coding, regular expressions, some unix or even good editor skills. You can only go so far with 'friendly tools' and you still have to spend a lot of effort learning them, so you might as well learn an open source transferable skill instead.   

Sunday, 26 November 2017

Colouring by secondary source dimension in Tableau, avoiding the asterisk

 The data below is small that you would wonder why I bother blending and not join, or even creating a group. Let's say this is a demonstration of a technique that proved useful with much more big and complicated datasets, and where the non blending dimension of the primary source didn't have an obvious hierarchical relationship with the dimension in the secondary source that yielded the asterisk.

So we have two sources, the primary one lists European election constituency regions per UK nation. The secondary one lists all the MEPs with their region and party
So, how do we blend those two, and do a bar chart of the MEPs of each region with the appropriate party colour coding?

 As you can see, once we put nation as a dimension from the primary source, the secondary source field 'party' cannot be used as a dimension, and we get the dreaded asterisk. Fear not, not all is lost.

There is a work around, but it only works for cases like this where there is a handful of Parties. We create a separate calculated field for each party's MEP, and use measure names on colour, and throw all these party MEP calculated fields on measure values (see screenshot above, calculations below)
if [Party]='CON' or [Party]='UUP' then [MEP] end

if [Party]='LAB' then [MEP] end

if [Party]='UKIP' then [MEP] end

if [Party]='SNP' then [MEP] end

if [Party]!='SNP' and [Party]!='CON' and[Party]!='LAB' and [Party]!='UUP' and [Party]!='UKIP' then [MEP] end
I've given a different scenario of avoiding the asterisk with calculated fields in a blend in a previous post here