Data Viz Done Right

October 16, 2017

Makeover Monday: Ranking Drivers in Formula-E

No comments
This week we look at Formula-E results. I must admit, this was a bit tough. Nothing absolutely zero about the sport make it hard, yet it can make focusing easier as well...more about that in a sec.

First, let's look at the table of results.

What works well?

  • When looking at results in events, it never hurts to have the results in finishing order.
  • Including the pictures of the players helps make it more personal.
  • Showing the gap to first place helps provide context on how much the winner won by.

What could be improved?

  • There no sense of how the driver has done over time. Are they getting better or worse? You can't tell.
  • There's very little detail about what the stats mean. Definitions would be helpful for an audience to which this sport is foreign.

What were my goals?

  • Compare drivers in the most recent season
  • Only include drivers that completed every race
  • Provide season summary stats
  • See if any drivers are dominating the circuit

With those goals in mind, here's my Makeover Monday week 42. Click on the image for the interactive version.

October 11, 2017

Workout Wednesday: State to City Drill Down

This week's challenge started with a Convo challenge at The Information Lab from Chris Love. In Chris' challenge, he created a scatterplot that allows the user to click on a State and drill down to the City level. That is the starting point for this week's challenge and I've taken it to another level.

As a hint, in Chris' version, all cities were in the initial view, but for each State, all of the cities in that State would display the same value until you click on the State. The drawback of this method is that displaying mark labels (i.e., State names) only looks decent when a State only has sales in a single city. I want to show the labels for all States that have enough space to display it. In other words, the initial view should show only one dot per State, then when you drill down, you will see one dot per City in the selected State.

Before you start, I would highly encourage you to interact with the viz below to see how the drill down works.

Using this data source, here are the requirements:

  1. Create a scatterplot of sales vs. profit.
  2. In the initial view, you should see only one dot for each State. If you do this part right, you will have 48 marks in the view.
  3. Label the dots for the States in the initial view where the labels fit (using Tableau's automatic labelling).
  4. If you click on one of the States, then the view should automagically drill down to the cities for the selected State.
  5. If you choose more than one State, then the drill down should be disabled.
  6. Once you are in the City view, you should see one dot for each city. For example, if you click on Washington, then the City view should have 40 marks (one for each City).
  7. At the City level, the user should be able to click on the white space in the chart to go back to the State level.
  8. At the City level, no cities should be highlighted.
  9. You must match the tooltips. They show the State, Sales and Profit when each dot is a State. The tooltip shows the City, Sales and Profit when each dot is a City.
  10. The title and subtitle should change depending on if the view is State level or City level.
  11. Each dot should be colored by profit ratio for the State or City.
  12. The view should be 600x650.

Be sure to tweet an image of your work and a Tableau Public link and tag @EmmaWhyte and @VizWizBI. Good luck! I guarantee you'll learn a lot this week.

October 9, 2017

Makeover Monday: Adult Obesity in the United States

It's week 41 of Makeover Monday 2017, which can only mean one thing...Makeover Monday Live at TC17! This week, we're looking at adult obesity rates in the United States and this viz from The State of Obesity:

What works well?

  • Simple title that tells me what the viz is showing
  • Pulling the smaller States out separately to ensure they don't get lost due to their size
  • Creating an inlay for Alaska and Hawaii
  • Including a definite for obese
  • Great filter action on the regions
  • Everyone understands maps!
  • Nice highlight action to show the State on the line chart and vice versa
  • Great tooltips on the line chart
  • Keeping all lines on the line chart and highlighting the selected State
  • Keeping the scale on the line chart at the appropriate intervals
  • Using colors that people typically will identify with good and bad

What could be improved?

  • You lose the sense of change in the map.
  • The height and width of the line chart seem odd. It's too tall for my liking. This accentuates the vertical change.
  • There's no real story to the data. A more impactful title that has a definitive statement would help keep me there longer.

My Goals

  • Create something engaging. I'm going to see if something like Michael Mixon's tilemap birth rates chart works well with this data set.
  • If that doesn't work, make something that shows comparisons well.
  • Make sure States are easily comparable.
  • Give States even weight in the viz.
  • Keep the highlighting by obesity rate and filtering by region from the original.
  • Make nice tooltips like the original.
  • Look for stories in the different demographics.
  • Learn something new!
  • Have fun at Makeover Monday Live!

With those goals in mind, here are a series of vizzes I made for Makeover Monday week 41 for each of the demographics. Click on any of them for the interactive version.

October 5, 2017

Gun Ownership vs. Gun Control - Which do Americans prefer?

No comments
Earlier today I posted a viz from FiveThirtyEight about the growing divide in opinion about gun control and gun ownership when comparing political affiliation. I was quite inspired by the simplicity of the viz and how effectively it communicates, so I decided to use it for vizspiration.

The data used was readily available on Pew Research Center, so I used Google Sheets to import the data. Since FiveThirtyEight focused their viz on those people preferring gun rights over gun ownership, I only used that metric.

However, on the Pew Research Center website there are many other ways that the data is sliced demographically. I started by trying to create a single dashboard that contains each of the demographics displayed simultaneously and it was a mess! In the end, I went with a parameter to allow the user to choose the demographic they are interested in.

What did I find interesting?

  • Overall, there's been a steady increase in the percentage of people preferring gun rights over gun control. Sounds like the NRA's propaganda is working.
  • As stated by FiveThirtyEight, the gap between political parties is growing larger and larger. In the most recent poll (7 Apr 2017), only 20% of self-identified Democrats favored gun rights over gun control, whereas 79% of Republicans favored gun rights. It's this growing partisanship that is really damaging America.
  • The younger generation is less likely to favor gun right over gun control. Is the proliferation and accessibility to information from the younger generation signaling a shift towards more liberal views?
  • The most educated Americans favor gun control over gun rights. Are the undereducated preyed on by the NRA machine?
  • The gap between whites and blacks is as stark as the gap between Republicans and Democrats. 30% more whites than blacks prefer protecting gun rights.
  • Regionally, the South and Midwest prefer gun rights compared to the West and Northeast. This pretty much aligns with any election map you look at.
  • People that live in cities are 26% less likely to favor gun rights over gun control compared to those lives in rural communities. Again, this falls pretty much in line with political affiliation.

UPDATE: Thanks to Rody Zakovich for this great tip for shading between two lines. Much better than my area chart trick!

October 4, 2017

Workout Wednesday: All the Sorts | Part 2

No comments
Emma sneakily added a part two to her previous Workout Wednesday. This week, she wanted us to include a line chart below the heatmap with these requirements (full details on the challenge on her blog):

  • Add a line chart showing profit ratio over time (continuous months) by each ship mode.
  • The ship mode selected by the end user should be highlighted in red in the line chart, the rest in grey.
  • The line chart should show by default the profit ratio for the product sub-category which is in the top row of the highlight table. Remember this can be changed by selecting a different ship mode or row sort.
  • When a user selects a product sub-category in the highlight table the line chart should change to show the selected sub-category

Seemed innocent enough at first. I had a pretty good idea that I needed a table calc to make this work, but it took me a while to get the settings just right. Anyway, another challenge done!

October 2, 2017

Makeover Monday: Which Quarter Performs Best in the UK Economy?

No comments
For Makeover Monday week 40, Eva has asked us to remake this chart from The Financial Times about the growth of the UK economy vs. other G7 countries:

What works well?

  • The title tells me what the viz is comparing.
  • Highlighting the UK since that's the focus on the article
  • Using a line chart to display data over time
  • Including a reference to the data source
  • Sticking with the FT themed colors

What could be improved?

  • The article that was part of references Brexit, but this timeline doesn't show pre- AND post-Brexit vote. Including a longer time range would be more useful to understand the long-term trends.
  • There are extra tick marks on the time axis, making it look sloppy.
  • Include a % since and an axis title. I had to go back to the subtitle to get that.
  • Use a more impactful title and subtitle. The source article has plenty of sentences they could have used instead.

My goals

  • I wanted to understand how each quarter performed by year, not year by quarter. This will allow me to see historically which quarter performs the best.
  • Use a better title and subtitle
  • Include a mobile design (for my own practice)
  • Keep the other G7 countries in the background for reference, but don't actually refer to them.
  • Stick with the FT theme

With those goals in mind, here is my Makeover Monday week 40.

September 29, 2017

Announcing the #RunData17 routes

No comments
If you're into running, be sure to join us each morning (Mon-Thurs) for a run around Las Vegas. Two years ago when TC was in Vegas, we had a massive turnout.

Given the conference is significantly larger this year, I bet we can double it! There are 5K, 10K and 21K options and all different paces. Want to go set a land speed record? Go for it! Want to walk? That's fine too! The point is to get out and start your day the right way...with a run!

The run start and end at the Mandalay Bay lobby. We'll start at 5:30am, so get there a few minutes early to sign a waiver and for a group photo.

To help you, I've created this dashboard so you know the routes. It's mobile friendly too!

I hope to see you in Vegas!

London Bus Routes - The Benefits of Linear Geometries in Tableau 10.4

No comments
As I mentioned previously, one of my favorite new features in Tableau 10.4 is support for linear geometries. Think about it this way...let's say you want to plot a bus route. You can either:

  1. Plot each bus stop and connect the dots, or
  2. Create a single line for the entire path

What are the benefits of each?

Plotting Each Bus Stop

This method, which uses the Path shelf to connect the bus stops, allows you to indicate the name of each bus stop along the route. However, the drawback is that Tableau has to draw each bus stop. For London bus routes, this means drawing 28,270 marks then connecting each of those dots for the respective route.

Using Linear Geometry

This method, which creates a mark represented as a line for each bus route, results in only 736 marks (one for each route). That means you'll be significant performance gains. The drawback is that you lose the detail of each bus stop.

Which should you use?

It depends on the granularity you need. If plotting each point is important, the go with method A. If aggregating to the route is ok, then go with method B.

For this use case, I wanted to test both options. First, I went to the TFL website to download the data of every stop for every bus route (requires an account). The data comes as a CSV with eastings and northings, so I turned to my friend Alteryx for converting these into shapefiles.

I used this tip by Rob Suddaby from when he was in The Data School to convert the Eastings and Northings into a spatial object. From there it's simple to create either the linestrings for the entire route or points for each stop.

A quick Mapbox map added for context and we're done! One additional twist I added was to size the bus routes on the map based on the number of routes selected. This only works on the map with each individual stop. I'll be sharing this tip during my TC session in Vegas.

Have a play...enjoy!

September 27, 2017

Roads Across America - Tableau 10.4 Linear Geometries

Tableau 10.4 came out this week and with it support for linear geometry shapefiles. This feature makes visualizing routing data so much easier and faster. You no longer have to plot each point, change the mark type to line and play a game of connect the dots. Now, connect directly to your shapefiles and you're done!

Of course, I had to play with it. I went to the US Census website and downloaded shapefiles for every primary and secondary road for each State. With a couple clicks, I had an incredible map showing all of these roads. I wanted to highlight interstates, so I made them blue. 62,000 roads plotted with only a couple of clicks. Amazing!

Have a play with it yourself below! I'm excited about what boxes are now opened with this new capability.

Workout Wednesday: Are the contributions of top sellers increasing throughout the year?

No comments
This week we delve into some tricky calculations for Workout Wednesday week 39. My goal for this analysis was to understand:

  1. How much the maximum selling product sub-category accounts for in a given month.
  2. How much that contribution has changed throughout the year.

The idea being that you would hope that irrespective of WHICH sub-category is the top selling, the contribution of the top selling product would remain steady. It's generally not good for one sub-category to account for too much in sales because then it could be a sign that you need to diversify. (Correct me if I'm wrong please).


  1. The line chart shows how the contribution of the top selling sub-category within each month has changed since January. That means you'll need to first figure out the value of the top selling category, then figure out the contribution of that sub-category within each month, then figure out how that contribution has changed compared to January within each year.
  2. Label the ends of each line. The label need to be right-justified horizontally and center-justified vertically. The label MUST NOT overlap the line at all.
  3. Match the format of my numbers.
  4. Match the tooltips.
  5. Match the title (easy peasy, just write what I wrote).
  6. Product categories are listed down the left.
  7. Years and Months are listed across the view. 
  8. Month labels are hidden.

Download the data here.

If you have any questions, let me know. Please tweet a picture of your attempt, include a link to the viz on Tableau Public and be sure to tag @EmmaWhyte and @VizWizBI.

Good luck!!

September 26, 2017

Tableau Zen Master Webinar Series


Have you ever wanted to learn from a Zen Master for free? Well here's your chance. 

Join us for The Information Lab Europe Tableau Zen Master Webinar Series with me, Chris Love and Craig Bloodworth. We'll be sharing our love for Tableau in three webinars starting in October.

Sign up here:

Part I: My 20 Favorite Tableau Tips
Presenter: Andy Kriebel
Date: Oct 17, 2017 9:00 AM BST

Part II: Advanced Charting with Unions
Presenter: Chris Love
Date: Nov 10, 2017 9:00 AM GMT

Part III: The Future of Mapping in Tableau
Presenter: Craig Bloodworth
Date: Dec 05, 2017 9:00 AM GMT

After registering, you will receive a confirmation email containing information about joining the webinar.

September 25, 2017

Makeover Monday: Restricted Dietary Requirements Around the World | Dot Plot Edition

No comments
Yesterday I saw this great dot plot from Jeff Plattner and thought I'd see if I could replicate it for practice.

Jeff used this video from my Tableau Tip Tuesday series to create his dot plot. I love how clean his design is and I hadn't built something like this in a while so I thought I'd give it a go. I chose a color scheme that matches the Nielsen colors, but otherwise, it's pretty much identical.

Thanks for the inspiration Jeff!!

September 24, 2017

Makeover Monday: Restricted Dietary Requirements Around the Globe

No comments
This week we head back to a simpler data set. The data this week comes from Nielsen's "What's in our food and on our minds?" report. Specifically, we're taking a look at this visualisation on page 8:

What works well?

  • Consistent ordering of the countries within each diet type
  • Colors are easy to distinguish from one another
  • Arcs, while not best practice, are engaging and capture your attention
  • Subtitle that explains what the viz is about

What could be improved?

  • Comparing the length of arc is difficult, especially across diet types.
  • The icons are not needed since each diet is already labeled.
  • The story in the data is lost as it's not included along with the charts.

My goals

  • Simplify the visualisation; bar charts are a good place to start.
  • Turn the text from the previous page that explains the findings into a story of some sort, probably long form and not story points.
  • Remove the icons

With those goals in mind, here's my Makeover Monday week 39.

September 23, 2017

Vizspiration: Chicago Taxi Trips from Near North Side

No comments
During Makeover Monday week 38, Suraj Shah created what might be one of my favorite Makeover Monday vizzes ever.

With his permission, I wanted to try to remake his viz with a different data set. On the last day for DS6 at The Data School, they had a two hour task of creating a viz with the Chicago Taxi data that we used for MM week 6. I figured this might be a perfect data set to give it a go.

I don't like mine nearly as much as Suraj's. It sure was fun creating it though. It took me about 45 min total. There's nothing very complicated about the viz itself, and it's probably this simplicity that I like the most.

Thanks Suraj for the inspiration!! Click on the image below for the interactive version.