Data Viz Done Right

October 6, 2015

Tableau Tip Tuesday: Create Great Looking Confidence Bands

No comments

Back in February 2014 I wrote about creating Bollinger Bands. Today’s tip is a simplified, more practical version of this tip. This tip will help you to create bands lines that are quite visually pleasing to the consumers of your work.

In this video I focus on three topics:

  1. How to create confidence bands
  2. Using parameters to control the size of the confidence bands
  3. How to create a user-defined moving average based on a parameter

Click on the image below to watch the video and interact with the visualisations.

October 5, 2015

Who's to Blame for Chelsea's Worst Start in 37 Years?

To say the start to Chelsea’s season has been a debacle would be a massive understatement. From an outsider, it seems fairly clear that Jose Mourinho has lost the dressing room. He even got the kiss of death today when the club released a statement giving him a vote of confidence.

It’s been interesting watch it unfold from this side of the pond. Mourinho is a media darling, even getting away without punishment from the FA and the club for his treatment of team doctor Eva Carneiro. After every loss he pushes the blame on someone other than himself. It’s likely only a matter of one more loss before he gets the sack.

Given all of Mourinho’s shortcomings as a manager this year, the ultimate proof comes in the form of his players’ performances on the pitch. So far this season, those performances have been downright dreadful. Just how bad has it been? The viz below shows that things are really, really bad.

I looked at three key stats from Player Rating, Pass Completion %, and Aerial Duals Won. I took the data and filtered it down to the outfield players that made contributions both last season and this. I then created the simple analysis below.

Some notes:

  1. Every player has a lower rating this year than last. Particularly in poor form are Terry, Hazard, Costa and Ivanovic.
  2. Some of Chelsea’s most creative players are struggling to connect passes. Are the likes of Ramires, Oscar and Fabregas trying too hard under the pressure perhaps?
  3. Matic has been taking a lot of stick from Mourinho, but his pass completion % is 3.5% better than last year. He’s not being nearly as sloppy with the ball as his midfield counterparts, though if you read the papers you would think it was the opposite.
  4. John Terry is showing his age when it comes to aerial duals. He’s winning less than half as many as last year.

If things don’t turn around in the next fixture against Aston Villa, I wouldn’t be at all surprised if Jose got the sack. Why? Because you can’t fire 24 players at once and because Mourinho’s ego is too big to last more than three years at any club.

Click on the image below to interact with the viz.

Makeover Monday: Taxpayer in Some States are Voting with their Feet

John Schoen over at CNBC is a pretty regular Tableau user and it’s great to see Tableau being used in news organisations. However, I think he missed the mark with this visualisation about taxpayer migration in the US.

Let’s start with the squared map.

  1. While some might see this as cute, it’s quite poor at communicating effectively. It’s difficult to compare the size of the squares. The size legend is essentially useless.
  2. The colour scale is not colour-blind friendly. I suppose he’s going for a stop light type of look, but that’s not even what this is because it has four colours, not three. 
  3. The placement of the squares is not geographically accurate.

How about the scatter plot?

  1. Again, why the squares?
  2. Same colour issues as the map, but at least it’s consistent with the map.
  3. The annotations he added work well and the reference line at 50% aids in understanding, but both of those are merely encoding the same measure as the colour scheme.
  4. What is the scatter plot adding that the map is not already showing us?

And the line chart?

  1. This works well for a single state, but what if I want to compare states? What if I want to see all states at the same time so that I can see if there are any common themes?
  2. The colour scale is not consistent with the other two charts. Click on California and you’ll see what I mean.

One of the great things about Tableau Public is that most people allow you to download their workbooks so you can have a play for yourself. That’s exactly what I did in this case. I’ve build the dashboard below to address the communication issues that I feel the original has.

Click on the image for an interactive version.

What did I do?

  1. Focused on a single metric, in this case net migration, since that’s what the original story was about.
  2. Used a single colour pallet that is colour-blind friendly
  3. Added all states to the line chart. Clicking on a state in the map will highlight the state on the line chart.
  4. Included a bar chart of the states that have a net outward migration
  5. Gave the visualisation a more meaningful title

What would you do differently? I’d love your suggestions for making this better.

October 4, 2015

Dear Data Two | Week 24: Doors - How Colourful is My Neighbourhood?

No comments

When I saw the topic for week 24, I immediately knew what I wanted to create. In California, our neighborhood was managed by a homeowner’s association, which meant uniformity everywhere, including every house door being black. One of the first things I noticed upon moving to our home in Kingston was how colourful the doors are.

Since there are so many homes on each street (townhouse/terrace style homes mostly), it was going to take quite some time to document all of the door colours. My wonderful daughter walked me with to help with the survey; I wrote down the door colours while she told me what they were. We got a few bizarre looks from people. Given that I was writing in a notebook as we looked at each house, it wasn’t too surprising.

When I started entering the data into Excel, I realized that I didn’t write down the house numbers. So out we went again for a second survey. After entering all of the data, I copied the addresses into Batch Geocoder to get the latitude and longitude for each address.

Next, I create a custom black and white Mapbox map for use in Tableau. I initially used a house shape for each house, but when I was showing this to people at the Data School, they thought it looked to cluttered, so I stuck with circles.

My postcard looks pretty similar to Tableau in terms of style. However, I think my postcard looks cleaner and simpler. I almost felt like an architect or city planner creating this map.

Click the image below to view my story. Enjoy!

October 3, 2015

Mass Shootings: America's Gun Violence Problem

Another mass shooting in the USA. 17 more people shot. 10 dead. 7 wounded.

So what’s one to do? How about find some data and see if a visualisation can have an impact?

This morning, I woke up early thinking about the data. I didn’t want data about murders; I wanted data about shootings. Why? Because if shootings don’t occur, then gun murders can’t occur.

A Google search turned up the amazing website Mass Shooting Tracker. They’ve been collecting data about mass shootings since 2013. Their explanation of what and why they track what they do is critical:

The most obscene incidents of gun violence usually do not make the mainstream news at all. Why? Because their definition is incorrect. The mainstream news meaning of "Mass Shooting" should more accurately be described as "Mass Murder".

The old FBI definition of Mass Murder (not even the most recent one) is four or more people murdered in one event. It is only logical that a Mass Shooting is four or more people shot in one event.

Here at the Mass Shooting Tracker, we count the number of people shot rather than the number people killed because, "shooting" means "people shot".

I downloaded all of the data, parsed out the locations, loaded them into Batch Geocoding and viola…all the data I needed to build this viz.

Click on the image for an interactive version.

September 29, 2015

Tableau Tip Tuesday: Sorting Dimensions with Lots of Members

I’ve been faced with this scenario many times - I need to sort the top N of a dimension by a measure (e.g., sales), but I want the rest of the members of the dimension to be sorted alphabetically. This is an especially handy trick if you have tons of members in your dimension. It makes it easy to see which members are in the top N, then the rest can be found by looking them up alphabetically.

This is a video tutorial that’s simpler than the method I outlined previously here. In this video, I use sets as recommended by commenters Nelson Davis and Joshua Milligan.

Click on the image for the video and to interact with the dashboards that you see me build. You may also pick up a few other tips along the way, like creating sets and parameters, quickly formatting worksheets, faking headers, etc.

September 28, 2015

Makeover Monday: How Much More Valuable are NFL Franchises than Other Leagues?

A couple weeks ago, Business Insider published a very simple bar chart showing the total value of all franchises for the four major professional sports in the USA. At the Data School, I’m always stressing context in visualisations.

Business Insider’s chart is lacking context, so in today’s makeover, I walk you through a few simple methods for adding context to a simple bar chart. Click on the image below to view the story.

September 27, 2015

Dear Data Two | Week 23: Being Nice(r)

No comments

I had finally caught up on all of the Dear Data Two postcards, then this extremely difficult topic came up. The problem isn’t necessarily the topic itself, but the data collection. How the heck do you collect data about being nice?

My initial thought was to do a word analysis for Tweets and emails, but that didn’t interest me much. I considered tracking every time I said something nice to someone, but that would be a data collection nightmare.

Instead, I settled on a simple list of some of the people I’m closest to and ways that I can be nicer to them. I borrowed heavily from Giorgia’s categorisation. From there I thought I would create tree-like structures for each person, but when I sent a sample to Jeffrey, his first comment was:

Wow. This looks really awesome. Antenna charts.

So deflated! But drawing the trees meant adding a lot of rows to the dataset…maybe this was a blessing in disguise. I decided to go with the antenna charts idea and straightened out the branches. The Tableau part was pretty simple, since it’s really just a game of “connect the dots”. The tough part was transforming this onto a postcard given my limit drawing skills.

With that being said, click on the image below to view my story of Dear Data Two | Week 23: Being Nice(r).

September 25, 2015

Tableau Tip: Sizing Dashboards | Transport for London Bikes: Where & When Were They Installed?

1 comment

Bonus tip today. This tip started with a request for feedback from The Information Lab’s head honcho Tom Brown. Tom is getting ready to demo a dashboard to a customer and we noticed that he was using automatic sizing on the dashboard he created. This is generally not recommended because Tableau will re-size the dashboard depending on the device size, which can cause your dashboard to not look as you intended.

Click on the image below to interact with the dashboard I created for the Transport for London bike scheme and to watch the video on how to get your dashboards to be the “perfect” size. In this video, I used James Dunkerley’s Web Data Connector, which you can find here.

September 22, 2015

Tableau Tip Tuesday: Using Lollipop Charts to Track Progress

I was first exposed to using lollipop charts to track progress by Alberto Cairo back in January 2013. In the viz, I used lollipop charts to show the percentage of educated and obese people by State in the U.S. I realized I never wrote about how to create them, so in this tip, I’m going to show you several things:

  1. How to use to get the data
  2. How to use the Tableau Web Data Connector to bring data into Tableau from
  3. How to build the lollipop progress charts
  4. Options for customising the view
  5. A practical example that will likely apply to your work

Click on the image below to watch the video and/or download the workbook. It’s a bit of a long video since there’s so much to cover. If there’s anything else you’d like me to create videos for, please let me know in the comments below.

NOTE: After creating the video, I did quite a bit of formatting on the visualisations to get the sorting to keep the sheets in sync and to create the second dashboard. I’d highly recommend you download the workbook to see how I did it. Particularly, see the LOD calc I had to create to get the sorting to work on the sparklines.

September 21, 2015

Makeover Monday: SEC Football Claims Some of the World's Largest Stadiums

Saturday Down South, which focuses almost exclusively on Southeastern Conference (SEC) football, posted an article back in January about the size of SEC football stadiums. In the article, they have a great line:

The conference’s stadiums are some of the biggest in the world, representing four of the top 10 and seven of the Top 25, many in towns that more than double in population on game days.

They wrap up the article with this basic table:


1. Rungrado May Day Stadium (Pyongyang, North Korea): 150,000
2. Salt Lake Stadium (Kolkata, India): 120,000
3. Michigan Stadium (Ann Arbor, Mich.): 109,901
4. Beaver Stadium (State College, Pa.): 107,282
5. Kyle Field (College Station, Texas): 106,511*
6. Estadio Azteca (Mexico City, Mexico): 105,000
7. Ohio Stadium (Columbus, Ohio): 104,944
8. Neyland Stadium (Knoxville, Tenn.): 102,455
9. Tiger Stadium (Baton Rouge, La.): 102,321
10. Bryant-Denny Stadium (Tuscaloosa, Ala.): 101,821
11. Bukit Jalil National Stadium (Kuala Lumpur, Malaysia): 100,411
12. Darrell K Royal-Texas Memorial Stadium (Austin, Texas): 100,119
13. Melbourne Cricket Ground (Melbourne, Australia): 100,024
14. Camp Nou (Barcelona, Spain): 99,786
15. Soccer City (Johannesburg, South Africa): 94,713
16. Los Angeles Memorial Coliseum (Los Angeles, Calif.): 93,607
17. Sanford Stadium (Athens, Ga.): 92,746
18. Rose Bowl (Pasadena, Calif.): 92,542
19. Cotton Bowl (Dallas, Texas): 92,100
20. Memorial Stadium (Lincoln, Neb.): 91,471
21. Wembley Stadium (London, England): 90,000
22. Ben Hill Griffin Stadium (Gainesville, Fla.): 88,548
23. Gelora Bung Karno Stadium (Jakarta, Indonesia): 88,306
24. Jordan-Hare Stadium (Auburn, Ala.): 87,451
25. Borg El Arab Stadium (Alexandria, Egypt): 86,000

Simple enough, right? The focus of the article is on SEC football stadiums, but their method of emphasising (via bold text) is easy to overlook and comparisons to other stadiums is difficult.

For my makeover, I’ve:

  • Changed the view into a bar chart, which helps see the size variances between the stadiums
  • Used colour to group the stadiums as to whether they are in the SEC, another college football stadium, or something else
  • Used the SEC’s official yellow for the background and blue for the bars of the SEC stadiums
  • Used the News Gothic font, which is the closest I can get to Benton Sans, the font the SEC uses on their website
  • Included a map for the locations of the college football stadiums (this was also my first time creating a custom Mapbox map)

Click on the image below for an interactive version.

September 15, 2015

Tableau Tip Tuesday: Creating a Chart with One Measure & Two Number Formats


This week I go back to a post I wrote in January that showed how to create a parameter that returns a value, but those values have multiple number formats (e.g., pounds and percentages). I then show how to use custom number formatting to display the metric selected with the proper number format.

Note: This logic only works if all of the numbers you are showing are positive.

Click on the image below to view the video and download the workbook.

September 14, 2015

Dear Data Two | Week 22: Our Past

The topic for week 22 of Dear Data Two was our past. I immediately knew what I wanted to create in Tableau, and that was a visual resume (which you can view here). The inspiration for the resume comes from Ben Jones, who showed me his resume built in Tableau a couple years ago before he started working at Tableau.

From there, I started working on a couple of different draft versions of my postcard for Jeffrey. I thought I had settled on one and I showed it to my wife. When I asked for her impressions, she thought it was strange how I had stuff going left and right; she thought left looked negative and right positive, so in the final version I incorporated her feedback.
Data collection was pretty straight forward. I used:
  • LinkedIn for the dates of my professional history
  • Blogger for the dates when I started my various blogs
  • The rest was by memory (or what is left of it)
From there, I simply plugged all of the dates into Tableau, categorized them, and built the resume in Tableau.

Click on the image below to view my Tableau resume, and draft and final versions of the postcard.

Makeover Monday: How Does Your State Size Up?


After last week’s Makeover Monday, several people pointed me to this tweet from World Economic Forum, asking me to immediately give it some love.

How much does each state contribute to the US economy? #economics
— World Economic Forum (@wef) September 7, 2015

It looks like WEF hired to create this tree-map pie chart thingy, as they have a more extensive write up about it here. I’ve used story points to review the visualisation, walk through a series of alternatives, and then conclude with an interesting tidbit about how uninteresting their data is.

Click on the image below to view the story.

September 8, 2015

Tableau Tip Tuesday: Sorting Marks on a Map

No comments
Hashu Shenkar from the Data School was rehearsing his Alteryx/Tableau demo this morning and showed us a simple map like this:

One of the problems with maps like this is that the sorting defaults to the data source order, which is this case is the zip code.

What I want the map to do is bring the highest and lowest values to the front. When I look at the sort options on the zip code dimension, I can choose Profit in descending order.

Choosing that only bring the positive values for profit to the front.

To get the positive and negative outliers to the front, I need to create a simple calculated field on Profit that returns the absolute value.

Then in the sort for zip code, choose this measure.

And now you can clearly see the outliers for your map.

If you really want to see the outliers to pop, make one small adjustment to the colour scale. Change it to a palette that has white in the middle of the range.

Download the workbook used to create from Tableau Public here.

Tableau Tip Tuesday: How to Create Lollipop Gantt Charts

1 comment
I used lollipop Gantt charts in Dear Data Two Week 14 and thought it would be useful to share how to create them. I tend to prefer this look to my Gantt charts instead of standard Gantt charts because I like how to end of the timeline is more prominent.

Click on the image below to view the video.

September 7, 2015

Makeover Monday: The United Nations of Debt

1 comment
Several people pointed me to this graphic by Visual Capitalist. It's quite a bad way to represent parts-to-whole. In short, it's basically impossible to make any comparisons. I'm using story points this week to walk you through the makeover.

Click on the image to view the makeover.

September 6, 2015

Dear Data Two | Week 15: Compliments

No comments
Just realized this is my 500th post on this blog.  Feels like quite a milestone for some reason.  Anyway, for Dear Data Two | Week 15: Compliments, like Jeffrey, I looked at my content that people liked across social media platforms (assuming that I can take those like, favorites, reshares as compliments).

Click on the image to view the story.

September 3, 2015

Dear Data Two | Week 21: Our Cities

No comments
The topic for week 21 was "Our Cities" and given how Jeffrey loves music, data viz and is a church-goer (amongst other things), I thought I would plan his itinerary for a 5-day holiday in London.

Click on the image to view the story of Jeffrey's future travel plans.

September 2, 2015

Dear Data Two | Week 14: Productivity

Nearly caught up on the weeks I had to skip. Week 14 was pretty straight forward, but I wanted my gantt chart to look a bit fancier so I put dots on the ends. For this type of lollipop Gantt chart, you need to use both axes. I'll show how to do this for Tableau Tip Tuesday next week.

To collect the data for this week, I combined data from Moves (for places and times), Fitbit (for sleeping) and Sunrise (for my calendar). I entered everything manually into Excel and connected it to Tableau.

Click on the image to view the story.