Data Viz Done Right

May 24, 2017

Workout Wednesday: NCAA Final Score-by-Score

No comments
For Workout Wednesday week 21, we look back at an epic NCAA final between North Carolina and Gonzaga.

Here's your challenge:

  • Final dashboard is 700x700
  • Everything must be a single sheet except for the footer
  • Match the title, summary below the title, colors, and tooltips
  • Each circle represents a score
  • Circles are sized by the type of basket (FT, 2Pt, 3pt)
  • Score must be cumulative across the game; note that time counts down in basketball
  • Tooltips should shows the score at that moment in time and a description of what happened
  • UNC color is #6490C6 while the Gonzaga color is #00143F
  • Gridlines should be displayed every 5 minutes and every 10 points
  • Last basket for each team should be labeled with the cumulative score

Download the data here. I think that's it, but if I missed a requirement, let me know and I'll update this post. Good luck!

May 23, 2017

Tableau Tip Tuesday: Two Methods for Creating Dashed Lines

This week's tip is a demonstration of how Eva Murray created the dashed lines in her Makeover Monday week 21 viz. In this video, I demonstrate Eva's method (via table calcs) as well as the way that I'd always done them with the Pages Shelf.

May 21, 2017

Makeover Monday: How has alcohol consumption in Britain changed since 2005?

This week we're taking Makeover Monday on the road to the Paris Tableau User Group. The French and the British have always had a "special" relationship, so this week I thought we'd make the TUG more fun by letting the French make a bit of fun on the Brits.

A couple weeks ago, BBC Health published this simple viz about the change in drinking habits in the UK between 2015 and 2016.

What works well?

  • Simple title that tells me what the viz is about
  • Subtitle that provides context for the numbers
  • Side-by-side bars are a good way of comparing values year-over-year
  • Overall clean layout
  • Nice fat bars to make comparisons easier
  • Colors are distinct enough

What could be improved?

  • Include a % symbol on the axis somewhere
  • This is a very narrow view of the data, whereas there are many more years available and it's also available by gender.
  • It's a pretty boring viz; one that you'll often skim by and not engaged with.
  • Label the bars

For my viz, I knew I wanted to use male, female and all people plus all years. This removes a bar chart as an option, preferring lines to show the trends since 2005. In addition, I wanted to show change since 2005 to provide better context that matches the purpose of the title.

I drew inspiration from this European IronViz entry by Ravi Mistry. I like how he is showing the change since the beginning.

Unlike Ravi, though, I decide to only label the line for all persons. I made this decision because labeling the end of each line would have made the viz feel crowded, as the numbers are varying enough to provide room to breathe.

I wanted to test out the Inconsolata font that Nathan Yau uses for his charts over on Flowing Data. If you have it installed on your computer, you'll see my intended display. If not, Tableau Public will server up something, not sure what really.

Lastly, the colors. I picked them from the ONS dashboard about the UK economy.

Click on the image below for the interactive version.

May 17, 2017

Workout Wednesday: Comparing Regions

Today at The Data School we took on Emma's Workout Wednesday challenge as a group, brainstorming along the way until we came up with a solution. We decided to take on Jeffrey's challenge for a bit more complexity.

Here are the requirements from Emma:

  • Dashboard size is 850x650
  • Quantity for the East and West regions should display as side-by-side bars
  • Sales for the East and West regions should be displayed as lines
  • Filtered to 2015 only
  • Match the colours and tooltips
  • Match the axis labels (abbreviated months)

We didn't find this too difficult. A simple calculation put the bars side-by-side. I'm going to ask Emma to be more harsh. :-)

May 16, 2017

Makeover Monday: Female vs Male Youth Employment in Latin America & Caribbean Countries

No comments
Yesterday I intentionally created my own data set for Makeover Monday. Why? Because I wanted to do a step-by-step makeover of the original (FYI, that's kinda what Makeover Monday is about for me).

Today, I had a few spare minutes and knew that Eva really wanted me to create something with the full data set she created for #VizForSocialGood. Also, I was really surprised at the remarkably few slope graphs this week. This is a great data set for slope graphs, whose main purpose is comparing two points.

So, here is my second Makeover Monday this week. Special thanks to Eva for feedback on my iterations. In this viz, I wanted to compare the unemployment percentage for 15-24 year olds by country. Perfect use case for a slope graph...and my 500th Tableau Public viz!! I wonder who has more??

Tableau Tip Tuesday: Using the Modulo Function to Conditionally Format Numbers

This week's tip came from a question reader Jonathan Hayter sent me.

I want to show one decimal point on the value of my mark labels -- except when the digit following the decimal point is zero. So, in the example below, I'd like to make the label for 2013 show as "57%" rather than "57.0%."

Great question! I told Jonathan that I disagree with formatting the numbers differently, but I also wanted to help him find a solution. The answer is two calculations and the modulo function.

In the final version you see below I've included a third calculation to highlight the bars that a zero following the decimal point. This is merely to make it easier for you to see. I didn't show this in the video. Download the workbook to see the solution.


May 15, 2017

Makeover Monday: What jobs do young people in Latin America hold?

1 comment
Today is a pretty big day for me and for Makeover Monday. For me, this blog post is my 800th since I started writing way back in August 2009. You might not care much about that, but for me it feels like a nice sense of accomplishment.

For Makeover Monday, this week is a collaboration with #VizForSocialGood and Inter-American Development Bank. It's always a special day when you can make an impact. Eva and I are also hosting a Brightalk webinar about Makeover Monday at 4pm BST today. Join us if you have a chance.

This week's makeover is a donut chart that shows how many youths in Latin America and the Caribbean are employed in different jobs.

What works?

  • Using a question for the title
  • People immediately understand how to read a donut chart
  • Sectors are sorted from largest to smallest
  • Nice tooltips

What could be improved?

  • Why are mining and basic services combined?
  • The middle of the donut is wasted.
  • The data doesn't tell an effective story.
  • A bar chart would make comparing the sizes easier than a donut chart.
  • Too many colors

For my viz, I decided to start by recreating the original in Tableau and then using story points to walk through each step of my makeover. I recalled this great post by Cole Nussbaumer in which she presents alternatives to pie charts. In particular I really like her big number viz, so I did my best to emulate that style. Simple and more effective that the donut chart for me.

May 10, 2017

Workout Wednesday: Product Spread Treemap - Part 2

1 comment
Workout Wednesday week 19 builds upon the challenge from week 17, so if you haven't done that one yet, don't worry. Many of the requirements of that challenge are repeated in this challenge.

CAUTION: This took me the better part of two days to figure out. Don't let that scare you though; I'm fairly sure there's a much simpler way that I missed because I got so deep into it.

Use this data source to build this treemap. The idea is to be able to count how many regions each product sells in, to highlight the region those products sell in and to include the regions in the tooltip. Here are the requirements (several are repeats from week 17):

  1. Dashboard needs to be 850x700
  2. Include a summary table at the top right that shows the number and % of products that sell in each region. 
  3. Match the color-coding and text of the table.
  4. Create a treemap that segments the products by the number of regions it sells in.
  5. Match the tooltips in the treemap. NOTE: The tooltip contains a list of the regions that each product sells in.
  6. Create a parameter that includes the list of regions and it should highlight the products that sell in the selected region. 
  7. Products that do not sell in the selected region should be the same color as the segment, but a lighter shade.
  8. Match the caption on the treemap.

Remember to post a picture on Twitter with the hashtag #WorkoutWednesday and tag me (@VizWizBI) and Emma (@EmmaWhyte). Good luck! 

May 9, 2017

Tableau Tip Tuesday: Using LOD Expressions to Color Lines By the Most Recent Value

This week's tip came about when working through a question at the Data School during our client project last week. The question was essentially:

How can I color each line on a line chart by the most recent value?
This requires a three-pass LOD expression. The key is to realize that Tableau created an aggregate table for each LOD working from the inside out. So

  1. Tableau calculates the inside LOD first.
  2. Then the second LOD is calculated based on the results of the first LOD.
  3. Then the third LOD is calculated based on the results of the second LOD. 

Make sense? I hope so! If not, let me know. Enjoy!

May 8, 2017

Makeover Monday: Which cars do the Dutch prefer?

The topic for Makeover Monday week 19 has come about because I'm headed to Amsterdam this week to work with our team there and to run two Makeover Monday events for customers. I need to give Martijn Verstrepen from our Dutch team a shout out. He came up with the idea for this week, found the article, created the data set, and even translated it to English for us. Thanks Martijn!!!

The viz to makeover this week is merely a table:

What works?

  • The table is ranked starting with the best seller.
  • Including only the top 10 gives the table focus.
  • Title gives us the overall summary for context.

What could be improved?

  • Include a more impactful title
  • How does this compare to prior years?
  • The table makes me do math in my head to compare the top cars.
  • Simply by making the table a bar chart it would become more engaging.
  • Some of the models are missing the brand.

The data set is actually pretty extensive: 9.2 million car purchases covering 1952-2017. For my viz, I'm going to focus from 1970-2017. I chose to start with 1970 because that looks like the start of purchases every month.

Before I start my exploration, here are the things I'm interested in learning (to help me focus my analysis):

  1. How are purchases changing over time?
  2. What car brand do people prefer? Has that changed?
  3. How has the price per car changed over time?
  4. What's the most popular color?
  5. If I were moving to the Netherlands and needed to buy a car, what should I buy?
  6. When is the best time to buy a car? Conversely, when is the most expensive time?

Next, I did a bit of Googling for inspiration. Over and over again, infographics about the best time to purchase a car came up. This one in particular caught my attention for the colors and the layout:

I used to upload the images and pick off the colors. I then added these to my preference file. I created a regular color palette that included the green and a sequential palette for the more brown colors. Overall, I want to mimic this layout, replacing the text with charts as much as I can.

Lastly, I really like the storytelling and design of Pooja Gandhi's week 16 viz, so I wanted to emulate parts of that and also use this an exercise to see how long it may have taken her. HINT: It took me hours to float everything and get it just right. It sure would be easier if there was a grid to snap everything into.

Another fun week, one in which I feel like I learned a lot about design. With that, here's my week 19 visualisation about car purchasing in The Netherlands. Click on the image for the interactive version.

May 3, 2017

What did it take to get to the Madrid Marathon?

No comments
My third marathon is in the books. A 12 minute PB on a super hilly course. The 4 mile long hill from miles 21-25 was pretty mean! But I got it done and I can't wait for my next marathon in October.

My TomTom watch syncs to both Runkeeper and Strava, both of which I used to visualize my 16 week training program.

The routes for each run are in the form of GPX files, with a data point for every second of the run. I created this Alteryx workflow to parse those files and create the routes I needed to visualize in Tableau.

I then used the Strava web data connector created by The Information Lab to get the summaries for each run.

When designing the dashboard, I wanted the focus to be on the map, so I allocated the most space for that. I used the Mapbox Outdoor theme map because it's very similar to what Runkeeper uses. I made the lines red so that they stand out against the map and then added indicators for the start, end, and each mile.

Above the map, I wanted to display the stats for each run (from Strava). I added a calendar on the right to show the frequency of my runs (I must admit I'm pretty consistent). The user can click on a date to see the details and map for that run.

Lastly, I added elevation and pace charts. I'm not all that pleased with how these turned out, but it'll have to do.

So that's about it. 16 Weeks | 64 runs | 528 miles - that's what it took to get to the Madrid Marathon.

Workout Wednesday: Appearing & Disappearing Charts

1 comment
That Emma can be quite sneaky! The challenge for Workout Wednesday week 18 was to use a series of icons to display a chart. Each icon displays a different chart and when unclicked, the chart should go away.

You can find the requirements over on Emma's blog. Here's my solution as a GIF:

The showing/hiding of the charts was pretty straightforward. My data doesn't match Emma's exactly despite using the same data source. I think maybe there's a join or data source filter on hers, but that's not really the point of this exercise. I also used different icons because I couldn't find the ones she used.

I won't give any hints as to how I did this so that you can do it on your own. I implemented this trick differently than Emma and both of our workbooks are downloadable if you care to have a look after you give it a try. Here's my Tableau dashboard.