Data Viz Done Right

December 9, 2018

Makeover Monday: How much land is needed to produce our food?

No comments
This week Eva chose a data set about the amount of land it takes to make one gram of protein. For example:

  1. A 9oz/251g steak contains 62g of protein. 
  2. Multiply that by 1.02m² (the amount of land needed to produce 1g of steak) 
  3. It takes 63.25m² of land to produce ONE STEAK. That's 678ft² for my American friends. 


That's like a one bedroom apartment for every 10oz steak. That's ridiculous and a major reason why I went vegetarian 18 months ago.

Let's have a look at this week's chart:

What works well?

  • Using a descending bar chart for ranking from largest to smallest
  • Labeling the ends of the lines for more precision
  • Simple title

What could be improved?

  • It took me several times to read the subtitle to make sense of it. Something simpler would be helpful.
  • Remove the gridlines
  • Remove the axis

What I did

  • Recreated the waterfall chart that I had to create for Workout Wednesday week 49
  • Used color to highlight the food types that come from animals; I used red to represent bad (my opinion)
  • Change the title into the form of a question
  • Included a BAN to summarize the findings

With that, here's my Makeover Monday week 50.

December 3, 2018

Workout Wednesday | Week 48: Profitability Bridge

No comments
I'm a bit behind again on Workout Wednesday, you know, this whole life thing. Today I had a few minutes to look at week 48. As it was a waterfall chart with a couple of other tricks thrown in, I thought it would be pretty straightforward, and it was...thank goodness.

The basic requirements:

  • Create a waterfall chart showing the top 5 sub-categories by sales. Include an other category for all other categories.
  • Show a bar on the far-left of the waterfall that shows all sub-categories. Label it all.
  • Add dashed lines that “connect” each bar.
  • Add a dashed line that connects the All bar with the Other bar.
  • Make sure each line looks as a single continuous dashed line. 
  • Label each sub-category above the bottom line of each bar.
  • Label each bar with the profit ratio below the bottom line of each bar.
  • Add a filter by region. Make sure the filter is centered on the dashboard above the chart.
  • Color the bar gray if it above zero or pink if it is below zero.

Get the full list of requirements here. Thanks for the challenge Luke!

December 2, 2018

Makeover Monday: How many New York Times crosswords have been created by women?

No comments
We've had quite a few Makeover Mondays this year focusing on gender disparities. This week, we're analyzing the gender composition of constructors of New York Times crossword puzzles. The original viz come from XWord Info:

What works well?

  • The title explains what the chart is displaying.
  • The x-axis and y-axis are easy to understand.
  • Excluding 1993 and 2018 since they are partial years.
  • The chart has the proper height-to-width ratio.

What could be improved?

  • The title could be a bit more informative. Something like "Over the last 24 years, there have been only three weekdays where women has constructed at least 50% of the crosswords."
  • There are too many colors, making the chart distracting and the lines hard to follow.

What I did

  • Separated the days into separate charts so the trends for each weekday would be easier to follow
  • Created sparklines and highlighted the high point for each weekday
  • Labeled the values for 1994 and 2017 for context
  • Included a BAN for the overall percentage for each weekday
  • Created a mobile layout
  • Shaded every other row to distinguish the weekdays and help guide the eye across the chart

November 28, 2018

Workout Wednesday: Sales for the Last N Periods vs. Prior Year

No comments
I'm going back to Workout Wednesday week 16. Why? Because I really struggled with it. I was so close for so long, but couldn't quite get my date calculations correct. After writing them down on paper and building tables in Tableau to verify I had them correct, the rest was pretty straightforward.

This use case is super useful in a business context. I like Workout Wednesday challenges that you can employ later. The most important requirements:

  1. Use a date parameter to select a select end date, limit it to all days in 2017.
  2. Use a parameter to select the period type (day, week, or month).
  3. Use a parameter to select the number of periods to go back (limit from 1 to 12).
  4. Create a bar chart that show the total sales for the last complete period. 
  5. Add sales for the same period as a label on the end of the bars.
  6. Compare the selected period to sales over the same period from the prior year.
  7. Add a blue arrow up if sales are up compared to prior year.
  8. Add a red arrow down if sales are down compared to prior year.
  9. Show the difference in sales over these time periods. Make sure to show no negative signs. The arrows will indicate the change.

Read the full requirements here. Really good challenge from Luke.

November 26, 2018

Makeover Monday: The Cost of a Night Out

No comments
For Makeover Monday week 48, Eva chose this visualization from Thrillist (created by Statista):

What works well?

  • Choosing a topic that is relatable
  • Good title and subtitle
  • Sorting the bars from most expensive to least expensive
  • Using colors that are easy to distinguish
  • Including the labels on the ends to the bars

What could be improved?

  • Lose the icons on the lower right
  • Remove the gridlines and axis labels (they're not necessary if the ends of the bars are labeled)
  • Remove the flags next to each city; First they add no value. Second, the data is about cities not countries.
  • The title is a bit misleading; this is only a selection of cities.
  • Using a stacked bar chart makes comparisons across the items difficult; maybe if this was interactive and you could choose the item to sort by, it would work better.

What I did

  • I wanted to make the comparisons easier, so I chose to create a bump chart.
  • I added a highlight selector so the user can focus on a single city, yet keep the others in the view for context.
  • I sorted the values from least expensing (top) to most expensive (bottom).

With that, here's my Makeover Monday week 48.

November 20, 2018

Fanalytics: Why I created the FT Visual Vocabulary in Tableau

No comments
20 November 2018: This post now includes the recording from my repeat session on BrightTalk. The record is below the presentation slides. Thank you to all of those that attended the talk and for asking great questions. I hope you found it insightful and inspiring. ~Andy

On the last day of TC18, I had the honor of presenting at Fanalytics, the post-TC wrap up about the Tableau Public Community. The team asked me to present about the FT Visual Vocabulary that I built in Tableau, my motivations for doing so, and my thoughts about learning in general. For those that missed it, here are my slides. Enjoy!



Tableau Tip Tuesday: Using Table Calcs for Dynamic Reference Bands

No comments
For #WorkoutWednesday2018 week 46, I required people to use table calculations to:

  1. Show the percentage of the total population for each age group for each year
  2. Show labels on the outside ends of the lines
  3. Plus some other requirements

This challenged was based on my #MakeoverMonday week 45.

In this video, I show you how to create the calculations for items 1 and 2 above. The calculations are quite simple once you know how to do them. The padding table calc is particularly useful when you will have data that updates and you can't fix the axis.

Apologies in advance for the audio cutting out every now and then. 

November 19, 2018

Makeover Monday: Where do you have to work the most hours per month to afford a home?

No comments
This week's chart to makeover is nothing short of hideous; I mean like really, really bad!

What works well?

  • Including the data sources
  • Labeling each mark, otherwise we'd have no idea what each thing means

What could be improved?

  • The title is wrong; it should say hours per month.
  • 3-D bars are never a good idea putting them on a map is even worse.
  • The color legend doesn't help interpret the chart at all.
  • It's overly difficult to find a city; the labels aren't even near most of the cities.
  • The whole thing is terrible. Start over!

What I did

  • I took the map and turned it into a ranked bar chart.
  • I put the bars in descending order by the number of hours per month needed to work to pay afford a home.
  • I split the bars into four columns so that they would all fit in one view. I learned this from Workout Wednesday Week 47 2017.
  • I added a highlighter on the bottom right (intentionally out of the way) so that you can find a city in the rankings.
  • I ignored all of the other metrics.

With that, here's my Makeover Monday for week 47 2018.

November 12, 2018

Makeover Monday: The Lack of Diversity in Tech Companies

No comments
This is the 150th week of #MakeoverMonday as a Community project. Congrats to those that have completed every week so far. I'm sure you have quite an incredible portfolio. For week 46, Eva chose this visualization from Information is Beautiful:

What works well?

  • Vertical groupings work well for comparisons
  • Using more pronounced colors for the companies and greying out the comparators
  • Nice filtering options
  • Title and subtitle are simple and tell us what the viz is about
  • Good labeling
  • Including a white divider line at 50%
  • Including sort options

What could be improved?

  • Including the gender breakdown as well as the ethnicity breakdown in the same chart makes it feel too cluttered.
  • As the years are set as filters, it's overly difficult to see if companies are becoming more or less diverse over time.
  • Are the logos necessary?

What I did

  • Focused on the gender diversity
  • Chose a simple dot plot to make the viz less cluttered
  • Included a more impactful title
  • Kept their background color, but used a different color for highlighting

November 10, 2018

Workout Wednesday: Cross-Highlighting

No comments
Week 45 continued the post-2018.3 set actions theme. This week, Rody gave us a fairly simple, yet extremely useful challenge. We had to create a simple table that highlighting the rows and columns for the selected cell that you hover over.

The highlighter is very fickle. It seems you have to hover over a very specific spot to get it to work. I was able to make it work by using a boolean calculation, but the highlight set action was going crazy. So I went with Rody's technique of making it a continuous field so that it would actually stick.

November 4, 2018

Makeover Monday: America's Aging Population

No comments
As this week is election week in the United States, I thought it would be fun to give everyone a data set about population projections by race, sex, origin, age and year. It's a fascinating data set to explore.

The original visualization is from the US Census Bureau:

What works well?

  • The title above the charts tells us the insights in the data. This is a very effective technique.
  • The colors work well together.
  • Labels for the ages are well-placed and colored to represent the lines
  • Labeling the start and end of the lines
  • Hiding the axis but still leaving the axis title
  • Including the note about the 2016 data

What could be improved?

  • Remove the title at the very top, the entire blue section
  • Make the footer less prominent; it's competing with the viz for attention when it should be secondary
  • Kill the bar chart; it looks strange have axis labels for every five years, but then only showing the data for a set of years
  • Remove the dots on the lines except for the start, end and where the lines cross
  • Remove the vignette shading behind the charts

What I did

  • I like the idea behind the line chart, so I used that as my starting point.
  • I pivoted the data by age, then created age groups that match the original (under 18 and 65+).
  • I wanted to compare ages and origins for the two age groups to see if the crossing of the populations is consistent (spoiler, it's not).
  • I wanted to add focus to the year the lines cross. I did that by adding a black dot on that year and by including a reference line.
  • I kept the labeling of the start and end of each line.

Overall, I find the patterns in the data really interesting. 
  1. While the population in total gradually shifts towards the older generation, the split between hispanic and non-hispanic does not follow the same pattern. 
  2. Older hispanics will likely outnumber hispanic children between 2070 and 2075, whereas non-hispanic older people will outnumber non-hispanic children much sooner.
  3. The female population is shifting much more quickly to the older generation than males.

With that, here's my Makeover Monday for week 45.

November 3, 2018

Workout Wednesday: Drill Down with Set Actions

No comments
This being the first Workout Wednesday since TC18, Ann Jackson decided to spoil us by letting us test out set actions. Set actions allow the user to dynamically update a set based on actions in a dashboard. They're wickedly powerful and a game changer for Tableau.

Here are the basic requirements (full list here):

  1. Create a line chart of monthly sales that drills into the months you select
  2. Create a treemap of sales by category that has the ability to drill to sub-category and product name upon clicking
  3. When selecting months in the line chart, the treemap should also filter.
  4. Create dynamic labels (and tooltip) for the treemap that display based on the level of detail shown (category/sub-category/product name)

I added in a Viz in Tooltip in the treemap to practice those as well. In my tooltip, I have colored the bars that are unprofitable by the color of the category.

October 31, 2018

Analyzing Pitcher Performance With Density Heatmaps

No comments
With Tableau 2018.3 comes density heatmaps, a feature I've been playing with quite a bit and love it for when I have a dense concentration of points and a regular scatterplot doesn't work well. Transparency can help with dense dots, but I think the heatmaps work much better.

To give it a test, I downloaded every pitch for Clayton Kershaw and Justin Verlander (two of the best pitchers in Major League Baseball) from 2008-2018 from the great stats website Baseball Savant. Every time I look at baseball data, I'm amazed at the detail of the stats covered; the data far exceeds anything that is covered in other sports.

After downloading the data, I built the small multiples view below for each pitcher so that I could see their progression through the years. Click on the images for the interactive versions. I love how the data shows me how each pitcher has gotten better with their "misses" through their careers. For example, when they throw sliders for balls, they now tend to miss below the strike zone. This is a great sign that they have command of their pitches and are less likely to miss in an area where the batter can take advantage.

The density heatmap feature will most likely be used by most people on maps, which makes sense, but consider looking at it as an alternative whenever you need to plot x/y coordinates and have lots of points to display.

Makeover Monday: Women are more likely to always wash their hands after using the toilet

No comments
When Eva told me about this week's data set, all I could do was chuckle. Being a huge fan of the squatty potty (and the dad of four kids), I knew this was a data set that was ripe for analysis. Unsure of what the squatty potty is and WHY YOU NEED IT, watch this's indeed magical!

Anyway, onto the viz to critique:

What works well?

  • The design of the responses as a stacked bar chart is easy to understand.
  • The responses are ordered from highest to lowest.
  • Women and men are assigned difference colors in the text
  • Good title and subtitles
  • Colors are easy enough to distinguish

What could be improved?

  • Comparisons between women and men in the same categories are hard to make
  • Maybe there could be an easier way to distinguish between poo and pee

My Goals

  • Do something quick (like 10 minutes); I'm late for MM for the first time ever, but it's ok because I'm on holiday with my Dad and Brother.
  • Make the comparisons easier
  • Use colors that are a bit easier to associate to the men and women categories

With that in mind, here's my Makeover Monday for week 44 2018.

October 24, 2018

Workout Wednesday: Where should we focus our sales effort?

No comments
This week's Workout Wednesday was a live edition at TC18 hosted by Ann Jackson and Luke Stanke. You can get the challenge requirements here. I worked with Lorna Eden (former Data Schooler) and we nearly finished in the allocated time; the only part we could get quite right was the shapes.

I headed back to my hotel room after the session because I had to finish it (plus I have a presentation to work on). What we did wrong was quite a dumb oversight. In the calculation to create the shapes, we were using the wrong dimension. How dumb of us!

Anyway, we're done now. It was really fun to try to get it done in 50 minutes. So close!