Search

ivisualize.co.uk

one chart at a time

Tableau Tip: Filter with lookup

It has been a while since I’ve shared a Tableau Tip and I thought it might be useful to share something I did on Watch Me Viz at the Tableau Conference on Tour in London. I wrote about the conference here.

The tip itself is quite simple but one you may try and solve using LOD’s or other complex calculations involving parameters.

Here’s the question:

“A CEO of a company with a number of brands wants you to show the market share of each company, but wants to see one company at a time and to have the ability to select it from a filter.”

The data:

data

You may have noticed I have lousy imagination when it comes to brand names and also that I have a geographic dimension. These are postcode districts for London only. Our CEO wants to see a map of the market share in London, but you can apply the same principle to a KPI or any chart.

Unfortunately the way the data is structured it will give us the brands as separate measures when we really need them as a dimension, and one single measure. Fret not, Tableau allows you to pivot the brands and structure the data correctly. See below:

pivot

Once the data is correctly structured we need to create our London map:

map watch.gif

Next step is to create our market share, in order to do this we will use the quick table calculation from Tableau, Percent of Total, computing by Brand. To do this we’ll need to bring our Brand to detail first.

percent of total.gif

At this point if you are new to Tableau you may be thinking – “Well I can just bring brand to filter and be done with it.”  Unfortunately table calculations operate on the results of the query to the data source, therefore adding a filter would result in all your districts to show 100% like in the image below.

100%.png

Here’s the trick, instead of adding brand filter to the filter shelf create the following calculated field and add it to the filter shelf. Make sure it computes using brand.

Lookup

The calculated field works because it looks for the brand you’ve selected and hiding all others while keeping them within the table used by the quick table calculations.

This is the final result:

final.gif

As I’ve mentioned at the start, you may wish to use a combination of parameters and LOD’s to get the same result, but that’s the beauty of Tableau, there are often many solutions to the same problem.

Thank you for reading, I hope you have found it useful

David

 

 

Tableau Battle Floating vs Tiled

For some time now I’ve been curious about floating in Tableau. Curious to try and understand it in the same way I understand tiled and layout containers.

For a new Tableau user containers may not make a lot of sense, they are also a bit temperamental and give you no room for error… But once you’ve master the use and order of containers in Tableau, the formatting and design of a dashboard becomes a lot easier. If you’ve just got started with Tableau, keep at it my friend the light is there you just have to keep going.

When showing someone the joys of Tableau I’ve always took the time to talk about containers and formatting, but I’ve recently heard a number of voices I respect and look up to, advocating the use of floating all the time. Yes you read that right, going 100% floating, not just your logo on the corner or some bit of text, the whole thing…. – “I know I was stunned too.”giphy (2)

I’d done a bit of dashboard floating in the past. For instance the dashboard below from my Iron Viz entry had quite a few floating elements…

2

…but I was really just scratching the surface there, until a couple weeks ago. For Makeover Monday focusing on the death penalty in the US I decided to go all out and try and create a fully floating dashboard.

Here’s the final result:

Death row.png

It probably took me a little longer to create than otherwise would, because I had to get my brain engaged in the floating swing of things.

But here are 3 of my takeaways from experimenting with floating, as I use it more I’m sure I’ll find others as well.

Precision Sizing

Precision sizing – in floating mode Tableau allows you to define nor only the size of the object but also the exact position. This can be extremely useful when trying to align content in a dashboard. I’m extremely picky with this and have spent many minutes making sure all my dashboards align correctly.

P

Reorder Position – Similar to Powerpoint or any layered image manipulation software, in floating mode Tableau allows you to control the order of each of the elements in the dashboard. i.e you could “send backward” a chart

R

Overlay graphics – This is truly the essence of floating the ability to overlay the charts or images in Tableau, that way we can make better use of the space around the charts we’ve created, as it was the case with the circle below. Here I’m using the chart plus two images overlaying on top of the circle.

US Children

While looking for information about floating I’ve come across this post from Nelson Davis who has also tested performance of Tiled vs Floating dashboards and floating appears to be faster. Though this was done back in 2014 and Tableau have improved a great deal since. But it’s worth bearing it in mind.

Design for performance by Nelson Davis

On the other hand here’s a Tableau Tip from Andy Kriebel on creating long form dashboards, Andy uses a tiled approach with some great tips.

Tableau Tip Tuesday: Layout Tips for Long Form Dashboards

As a final thought, if you are taking the first steps using Tableau I’d say it will be worth your time to know how to work with both tiled and floating dashboards. It would make you a more competent user and you can decide when to use each of the methods according the end result you are looking for.

Hope you found it helpful, thank you for reading.

David

MakeoverMonday: US Children Well-being

This week’s #makeovermonday was really fun and one of those where I learned the most. But first a big thank you to Michael Mixon and Jeffrey Shaffer for their help. We are so lucky to have such an awesome community where we can just ask a question and someone is their willing to give you their time and help you.

Let’s start with the original from CNN, see original below and click for article:

160622031414-best-states-raise-kids-overall-exlarge-169

I don’t think this works because the way the original was split into quartiles you are left wondering which state is first. In this ranking analysis knowing which one is first is important. 1st and 13th are quite a way apart and the viewer needs to be able to distinguish that. The only apparent thing is that South states fare worse than North states but you can’t infer much else.

Inspired by Michael’s MakeoverMonday on Human Trafficking I thought a circle would work well here. Maybe a bar would be the simplest way of displaying this data but I wanted to learn how to create this. So after a bit of googling I found this great site that generates the angle, X and Y points for you. Once you have this add an extra column with an ID per row.

Bolt Circle Calculator

But while I had a circle I couldn’t quite get it to do what I wanted. My end goal was to have the states move position as the viewer changed the indicator.

I tried blending but wasn’t working properly so I spoke to Michael and Jeffrey to see if they could help and in true Tableau fashion they came up to the end result using different approaches.

Here’s Jeffrey’s:

You’ll need the original data and the newly created data set from that website which gave us X, Y and Angle.  Before you blend create a Parameter to select between each indicator and create a calculated field like the one below.

1 j

Make that new calculated field a dimension and create a custom relationship where your calculated field blends with the ID. Bear in mind this works because the measures are all ranks and they go from 1-50 like our ID’s.

2 j

Once that’s done just bring X to Columns and Y to Rows, I have changed the X to a negative so that my ranking goes clockwise.

-SUM([Sheet1 (Circle)].[X])

Bring state to detail and change the marks to a filled map and there you have it. A circle that changes when you select a different indicator.

Michael’s approach was slightly different in that it didn’t make use of that website to generate the angles, X and Y’s.

Here’s Michael’s workings:

Start by creating a calculated field like the one before, but this time as an aggregate and leave it as a measure.

1 m

Followed by this calculation to create the angles where 50=the number of states to be plotted.

2 m

Calculate the X

3 m

And Y

4 m

The next steps are similar to the ones before where you bring X to Columns Y to Rows and our calculated field allowing us to select from a parameter goes into color.

Bring State into detail, change the mark to a filled map and there you go your circle is ready.

I’ve published both methods to Tableau Public where you can download them and do it yourself.

Here’s Jeffrey’s – Blended Circle

And Michael’s – LOD Circle

I then spent time on design and colors and this is my end result, click for interactive version.

US Children

Quite simple but I really like it and most important of all I’ve learned a few new things.

Let me know what you think in the comments below, and don’t forget to check all other entries on twitter.

Thank you for reading

David

Makeover Monday: Theft in Japan

Another week another #makeovermonday this time one which I’d sent to Andy Kriebel a few weeks ago.

I like pies do you like pies? How about pie on a pie, if double pie is like a double burger it has to be awesome right? Wrong, pie on pie is terrible. Here’s the original, click to read the article.

h00068en_fig02

It is confusing and the colours chosen are ugly, but even despite that the use of very similar colours in the “Theft without breaking and entering” category makes it very hard for the user to get any meaning from the data.

That said and just because I wanted to see if I could. I created the exact same chart in Tableau, I didn’t do the call outs as that would be too much effort for an ineffective visualisation. In any case here’s my Tableau version of a pie on a pie. Click for interactive version.

Pie on Pie 2Pie on Pie

This week’s data worked better on a bar and that’s what I went with, just playing a little with the cosmetics. I’ve noticed I can easily spend more time working with fonts and colours than creating the actual dashboard. I need to find a way to not spend so much time on it. Here’s this week’s version:

Theft in Japan.png

Many of those creating this week’s #makeovermonday mentioned how safe we are in Japan but the reality is that this data set does not allow for that insight. Indeed the original article mentions that due to the way data is collected across the countries comparisons are difficult to make. Still this reminded me of a visualisation I did some months ago looking at Numbeo indices, see this post. I went back to that visualisation and looked at the safety index analysis and as predicted Japan came very near the top, in fact for 2016 it ranks as the 3rd safest country in the world.

Below we are comparing Japan’s and UK’s safety index, click for interactive version which will allow you to compare other countries as well.

Yearly Performance

I hope you have found this interesting and at the time of writing this I saw a tweet from Andy Cotgreave who’s currently in Japan(I’m so jealous), saying that 50 people in Tokyo joined the initiative, which is amazing. If you have yet to do a MakeoverMonday don’t be shy and submit your entry as well. Of course as usual don’t forget to check out the other entries on twitter.

Thank you for reading

David

DATA 16 – Tableau on Tour London

If you follow me on twitter you’d have noticed the barrage of #data16 tweets I sent last week. But you may be forgiven for not knowing what #data16 was all about.

#Data16 was the twitter handle for Tableau’s On Tour Conference in London being held in the great venue which is Tobacco Dock between 13th and 15th of June. If you missed there’s still time to attend two more conferences this year. Munich July 5th & 6th and the HUGE annual conference in Austin 7th to 11th November which should see more than 10,000 data geeks get together for all things Tableau.

The format of these conferences is pretty straightforward, the first day is usually reserved for registration and training or exams taking place. These are usually at a discounted price so take that into consideration if you are planning to attend a conference and take an exam or sit on some training class.

This was my second time at a Tableau conference and I knew more or less what to expect so I tried to plan accordingly beforehand. I arrived after lunch to get registered and participate on #MakeoverMonday live which backfired tremendously, my participation not #MakoverMonday mind you. I’m lazy and didn’t bring my laptop with me, for some reason I thought it would be a group effort to come up with one combined viz, but it turned out to be more like a hackathon where everyone was busy doing their own viz, timed for an hour. Still was good to see the Zen Master Rob Radburn at work and see how various people go about creating a visualisation in Tableau.

I spent the rest of the day just networking and getting a bit of time to chat with people I don’t usually get a chance to chat to.

Tuesday started bright and early with a keynote by SVP for EMEA James Eiloart and Francois Ajenstat. James’s talk was about the War of Current’s I personally found this very interesting and made me want to learn more about it. Francois keynote was all about Product Development, the various features Tableau has been adding to the tool in the last few years. It’s remarkable to see them all lined up. We often shout-out a couple of them, but Tableau has really been busy improving their software.

Ajenstat of course spoke all about the amazing Tableau 10 which is about to hit the road pretty soon. Instead of itemising all the features here, I urge you to get involved in the beta program. If you don’t have the time and rather just being told what’s new, in two days Tableau will host a virtual webinar to tell you all about the new features in Tableau 10, it’s worth it, sign up here.

After the keynote I attended a hands-on session on Optimizing Calculations which was very handy to solidify my previous knowledge of calculations. Two tips on attending breakout sessions at a Tableau conference:

  • Go early to the designated room, no matter how big the rooms are the best sessions become full very quickly. You can always network after, make it a priority to get your spot at your preferred sessions.
  • If you find yourself bored on uninterested in a session, get up and leave, you are there to learn and you should maximise your time at the conference. The speaker won’t be offended, leave and join another session that interests you more.

Once the session was over I joined Sophie Sparkes from Tableau and a few others for “Watch me Viz” where I shared a 5 minute tip on showing a % of total when you only want to show one of the categories. Sophie recorded it and I’ll share the link once that’s up.

Lunch over and it was time for the most anticipated keynote ever, Prof Brian Cox was there to tell us about the universe and I’ll be honest while I could follow some of what he was saying, quite a bit went over my head. But I was still mesmerised at the ease with which he explains really complex things about the universe. Prof Cox is quickly becoming the David Attenborough of astrophysics, quite an accolade.

I didn’t get to go to Vegas last year so I missed the amazing 320 slide presentation by Matt Francis on colour. I’m very interested in the subject and Matt gave a very good talk with some practical examples on the use of colour in data visualisation. I particularly liked the way Matt analysed room temperature at his workplace which made for an informed conversation with the maintenance company. It was also quite funny to see Fi Gordon sitting next to me trying to take a picture of a particular interesting slide and Matt running through them like Usain Bolt on a 100M sprint.

The rest of the afternoon was spent talking to Interworks about all things server, was great also to finally meet Mel Stephenson and to bond over our mutual love for Japan and the Japanese culture.

Wednesday started with a keynote by Jock Mackinlay VP for research and design at Tableau. Jock’s talk was about “A Language for Visual Analysis” an auto-biographic story about his PHD work on data visualisation.

I’ve been really interested in javascript recently and I want to be able to create my own html page with tableau public visualisations, so I attended a session called “Embed, extract and automate”, the first half was a bit boring as I don’t have much interest in Tableau’s sdk, but the second half made up for it, with a look at JS API and Rest API, the latter is quite useful for any server administrator to be able to automate tasks, such as site creation.  More information below:

JS API

REST API

The final keynote was by Maria Konnikova author of “The Confidence Game: Why We Fall for It . . . Every Time”, Maria’s talk was quite apt as we would be discussing imposter syndrome later on at the London Tableau User Group. Her talk was engaging and light-hearted the perfect way to close the conference keynotes.

I was in a pickle for my last breakout session trying to choose between hearing the Zen Masters talking about their approach to problems, or attend a session with Bethany Lyons, who incidentally was also the last session I attended last year.

Bethany is in my opinion, one of the most enthusiastic and skilled people I’ve come across in a long time. Her enthusiasm for Tableau and what Tableau allows you to do is palpable. Following her brain going 100mph is a challenge but you are sure to leave her sessions inspired and yearning to get your hands on Tableau to try some of the new things you’ve learned. If you are at a conference and Bethany is presenting, get yourself there, but as mentioned before go early.

The end of the conference was near and the last thing on the agenda was the Tableau User Group for London combined with the Data+Women initiative. If you attended that session don’t be fooled London TUG has a regular attendance of 150+ but understandably many people didn’t attend the conference or had to leave early.

The format of this TUG was slightly different with a panel made of Emily Cosh, Fi Gordon, Victoria Garner and myself. Hosted by Emily Chen and Sophie Sparkes, we covered topics like, Tableau Implementation, bias in data viz, imposter syndrome and mentorship. This was my first panel and I was rather nervous, but I thought it went well and I hope the audience has enjoyed it too. You can watch some of it as recorded by Paul Chapman here. Thank you also to the other London TUG organisers, Paul Banoub and Nick Bignell for inviting us.

This post is already at over 1300 words but I’d like to finish with a couple of thoughts.

Tableau has grown immensely in the past few years and their marketing team do an incredible job of keeping it fresh and informal. They also show how a large company can be nimble and react to events pretty quickly. As I’ve mentioned above a lot of the good sessions get oversubscribed pretty quickly and some other companies would probably congratulate themselves for it and move on. Not Tableau, what they did was to ask their speakers to do a second session straight after Maria’s keynote making sure their customers got the most of their conference ticket. Well done!!!

Another display of Tableau’s hands-on engagement by the management was the fact that James Eiloart took time of his busy agenda to attend the start of the London TUG and thank the user community. We often think of VP’s sitting in their ivory tower and not interacting much with clients, I saw James often throughout the conference, speaking to various people which is a testament of their commitment to their customers.

Finally a note to thank Francois Ajenstat. During his keynote Francois mentioned some changes to Web Editing in Tableau 10, those changes may have some impact for me at work with regards to permissions, and so I tweeted asking if he had 5 minutes for a chat. He came back to me and we managed to speak on Wednesday morning while grabbing a coffee, being able to ask questions directly to the VP of product management was really good. Francois is unlikely to read this, but if it ever makes it to your screen, thank you, I really appreciate it.

Thank you Tableau, you’ve been tremendous, see you next year.

David

 

Makeover Monday: Facebook Carbon Footprint

I’m afraid this week I hadn’t had the time to do a proper write up of my process. There’s a project that I’m working on which I hope will see the light of day this week.

That said here’s the original, where we looked at Facebook’s commitment to change their energy consumption to Clean & Renewable energy.

Clean

I think the donuts in this case worked well, but what we fail to see is the context of previous years. While you can use the arrows on their website it will require you to memorise each of the numbers. The colours work as well and the whole picture is appealing to eye.

For my take I decided to show the trend across the years with already famous trellis charts.

Facebook Carbon Footprint

It didn’t take too long to get to view above apart from choosing the colours for some reason they weren’t working as I intended and I end using Facebook’s corporate colours. I can spend an awful long time playing with colour palettes.

As always don’t forget to check out the other entries on twitter.

Thanks for reading

David

Makeover Monday: Arms trading

Another #makeovermonday this time we look at arms trading across the globe.

Here’s the original, click the image to read the article.

world-arm-trade

The visualisation in itself is appealing and I like the call-out on the circles for each country. But the lack of interactivity makes it harder to explore the data further. Overall I like it, it has merit and it tells a story.

I was short on time and I forgot to take screen shots of my various iterations, but I tried to create a trellis charts similar to last week’s and that wasn’t telling a good story, I also thought of using directional lollipops – see here But nothing was quite working until I remember a post I read back in December on quadrant analysis.

Chris Luv from the Information Lab had done it and he also created a video with step by step instructions on how to put it all together. – See here

I used a number of Chris’s tips and this was my end result, click for interactive version

Arms Trading

I love how clean it came out and the interactivity takes it a step further from the original in my opinion.

Let me know what you think, and as always please check the other entries on twitter. More than 150 people already took part in this community initiative which is amazing. If you have never took part please do so. You don’t need to use Tableau, use whatever tool you feel most confortable using, excel is fine too.

Until next week, thank you for reading.

David

 

Makeover Monday: Global Temperature Rising

Lately it seems like Makeover Monday comes around quicker and quicker. This week’s topic was Global Warming and how the earth’s temperature is rising every year.

Here’s the original, be sure to click the image so you can see the animation on the original site.

Global.png

When it comes to the original, I like it. It might not be the most accurate way of displaying the data, but it certainly has the engaging factor. What I’m not so keen on was the choice of colours, they were all too bold which made for a heavy visualisation, but that’s more personal preference than anything else.

I’m happy with my final result but it took me quite a while to get there.

My first idea was to create an area chart, showing the trend over the years, this was looking good but as it had been done already I thought I should do something different.

Line Chart

I tried to create a visualisation incorporating maps as small multiples and played with Tableau’s animations, but it just wasn’t working due to the large timeline (1850-2016)

Map

I even tried to combine both examples above but I didn’t like it, there was something missing.

Dashboard 1

This was an attempt at a unit chart with globe shapes, and the dashboard on the side is there so I can use the pick colour tool available in Tableau, that way you know how various colours work together.

The unit chart was quickly dismissed as well.

Dashboard 2.png

In the end I decided to look at one of my favourite types of visualisations at the moment. Trellis or panel charts.

I was able to bring the monthly trend that was missing from my previous attempts and show quickly how the temperatures are rising in our planet. I also decided that I needed much stronger colours to show the trend and settled on a brown background which helps with contrast.

Global Temperature Change

So there you have it, as you can see these past two decades have seen the highest temperatures yet and the tendency is for it to continue as a result of pollution and gas emotions.

I hope you found it interesting, please leave any comments below and as always don’t forget to see the other entries on twitter.

Thank you for reading

David

 

The art of iterating…

Google iteration and this is what you’ll get:

“Iteration is the act of repeating a process, either to generate an unbounded sequence of outcomes, or with the aim of approaching a desired goal, target or result. Each repetition of the process is also called an “iteration”, and the results of one iteration are used as the starting point for the next iteration.”

I used to think iterating was overrated, always striving to produce the goods as soon as possible with as few tries as possible. That was until I started to participate in Makeover Monday, for those who don’t know about it, Makeover Monday is an initiative run by Andy Kriebel and Andy Cotgreave. A visualisation is found online, posted on Sunday with the companion data set and the task is to find a better way to visualise that data. That can mean a more engaging visualisation, or perhaps a chart that is easier to understand.

My own approach is to allow for some off-the-wall ideas, and sometimes downright less than decent visualisations, but I allow myself that because it makes me better at my job. To me, Makeover Monday is my playground, my practice gym.

But back to the topic of iteration, often we see visualisations that are beautiful to look at or tell a great story, and for those just starting is easy to get demoralised and think – “I’ll never be this good” – however what you don’t see is the work behind the pretty picture, the frustrations and the countless drafts that end up in the bin. I started to notice a pattern in my own process and my own state of mind.

Here’s what that looks like:

 

MotivatedUnsureInsecureFlusteredFrustatedAngry

At this point it’s good to take a break from it, stepping back is very much underrated and it can often provide you with the clarity needed.

EnergizedEnthused

Luckily usually ends with me being proud of the work produced and publishing it.

HappyProud

I’d say that the majority of the creators of content go through most of this on a regular basis. Nevertheless, with practice, you learn to manage your emotions better and the time between each stage decreases. The only way to get good at it is to practice and practice and practice some more.

For example, I’ve been complimented on my good choice of colours but that’s because I’ve been relentlessly looking at colour palettes for the past two years and I try a bunch of colour combinations before I decide on the final one. I also grab inspiration from anything I can get, google, adverts, fashion, anything really.

So next time you start working on a project that is not going the way you expect, remember that sometimes you have to go through multiple iterations until you find something that you are happy with, and sometimes you go full circle and find out that your first idea was the best one after all, even if seemed pretty simple initially.

As always please leave any comments below and thank you for reading.

David

Create a free website or blog at WordPress.com.

Up ↑

Follow

Get every new post delivered to your Inbox.