Data Viz Done Right

September 20, 2017

Workout Wednesday: (It Takes) All Sorts

No comments
Oh Emma thought she was being sneaky today in the week 38 challenge. We had a similar challenge last year for the Data School Gym. For this week, given the EU Superstore data set, you have to meet these requirements (read the full details on Emma's blog):

  • Create the highlight table showing profit ratio by ship mode and sub-category.
  • The columns should be sorted by the ship mode selected in the drop down first, followed by the remaining ship modes sorted descending by their overall profit ratio.
  • The Product Subcategories should be sorted ascending or descending (depending on end user selection) of the profit ratios for the selected ship mode.

For me, the last requirement was the trickiest part. In the end, I had to create two parameters and three calculations.

Good luck!

September 18, 2017

Makeover Monday: A Day at the Races

As Eva already outlined, yesterday was race day for both of us. While she was at the Age Group Sprint Distance World Championships in Rotterdam, I was running the Richmond Marathon in preparation for the Frankfurt Marathon at the end of October.

Given there's also the #FitData17 challenge we thought we'd give everyone some data to play with.

I'm going to be making over my results from Strava.

What works well?

  • Of course no run is good without a map.
  • Including a breakdown of my pace for each mile
  • Showing a timeline along the bottom and allowing me to customize the metrics

What could be improved?

  • There are no markers on the map to show me where I started, ended nor any mile markers along the way.
  • The table shows me my pace, but it doesn't add any value because I can't see all of the miles at the same time making spotting trends impossible.
  • The line chart has three separate metrics showing, yet only one axis. It doesn't make sense to overlap three metrics.

What I wanted to learn?

  • Is my 3:25 goal for Frankfurt achievable?
  • Is there anything interesting in the heart rate data?
  • I want to be able to compare the key metrics across the two races.
  • Is hitting "the wall" avoidable?

I must admit that I need to dig into this data further in order to be able to answer these questions. However, time is running out on the day and I won't have time to look at it more tomorrow, so I'm starting with a viz that does some simple comparisons. It'll have to do for now and it certainly improves upon the original.

Click on the image for the interactive version.

Click on the image for the interactive version

September 13, 2017

Workout Wednesday: Killings of Blacks by Whites Are Far More Likely to Be Ruled 'Justifiable'

No comments
A few weeks ago on my Data Viz Done Right website, I highlighted a great viz from The Upshot that I thought was an exceptional design and told a great story. I like to use vizzes like this for inspiration to see how tough they are to build in Tableau. So that's your challenge for this week. Yes, it's waffle charts again, but I had this post ready to go before Emma stole my thunder in week 34.


  1. Dashboard size is 750x2350.
  2. Make sure you credit the data source and credit The Upshot for inspiration as I have.
  3. Match my title.
  4. For each city, there should be two waffle charts. The first should show the overall percentage of justified killings. The second waffle chart should show the percentage justified when a white person killed a black.
  5. Match the text under each waffle chart. Note that the text must be in the same worksheet and the percentage displayed must be based on a calculation.
  6. The text above each pair of charts should span across the two waffle charts for that city.
  7. There should be a 20 pixel buffer between each row of charts.
  8. There should be a 20 pixel buffer between cities that are on the same row.
  9. Use hex code #CC0000 to represent the percentage justified and use #ECECEC to represent the unjustified killings.
  10. Match the layout exactly for the text boxes.
  11. Match the tooltips.
  12. Everything MUST be tiled; no floating elements allowed.
  13. I used the Benton Sans font, but that won't render on Tableau Public, so use whatever font you wish. Benton Sans helped me get the word wrapping and spacing just like The Upshot had it.

Data sources:

  • Get the waffle chart template here
  • Get the data for the killings here

By the end of this exercise, you should be much more familiar with layout containers. Personally, I love containers because I know how to manipulate them well. Hopefully you'll feel the same by the end.

Make sure you tag @VizWizBI, @EmmaWhyte and @TheUpshot (for their inspiration) when you tweet your final work. Also include a link to your dashboard.

Lastly, this is not particularly difficult, there are no crazy calculations, it's more a tedious exercise. Have fun! 

September 11, 2017

Makeover Monday: Stolen Bikes in the UK

Having recently purchased a nice road bike for commuting to work and looking into registering it with the police, I ran across the great Stolen Bike UK website where people can report their stolen bike, see what's been reported and get more information about what's going on overall.

For this week's makeover, we're looking at the page where you can search a specific postcode. Given I ride to work, I naturally entered our work postcode and got this visualisation.

What works well?

  • The search feature and map are very engaging. I wanted to zoom all the way in to work.
  • The result set is within a mile of the postcode I entered, providing context and relevancy.
  • The map is easy to use. Click on a marker and you get a bit of information about the incident.
  • Using a map shows the volume of stolen bikes well.
  • The table and tabs provide a simple way for me to lookup information.

What could be improved?

  • Clicking on one of the numbers on the map doesn't then drill into each of those incidents.
  • The Last 6 Months tab doesn't show trends well.
  • The Worst Locations tab isn't very useful if you not very knowledgable about the area.
  • All of the tables would be more impactful as charts.

Questions I want to answer

  • What are the worst areas in the UK?
  • Is bike theft increasing or decreasing overall and in specific areas?
  • Are there as few positive outcomes as it seems?
  • Where should I avoid locking up my bike?
  • Is there any seasonality in the data? My hypothesis is that the number of bikes stolen would reduce in the winter months.

To answer the first question, I downloaded the police force boundaries from and merged all of the KML files together with Alteryx and output the result as a single shapefile.

From there, I blended the shapefiles with the bike theft data to create a map showing the log scale of bike thefts by police force. I chose a log scale because London is a crazy outlier.

With the questions in mind above, here's my Makeover Monday week 37 which I've optimized for mobile consumption.

September 7, 2017

Workout Wednesday: Which airport should you fly from?

No comments
This is first time I've ever created a variable width bar chart, so I had a lot to learn. I was able to quickly implement all of the requirements that Emma outlined except for the variable width bars. Fortunately there's a great knowledge base article that outlines the basic steps. Once I read through it, I was done!

What were the sneaky bits for me?

  • Creating a measure for the variable width bars
  • Using a table calc to return the airport with the shortest drive time (Emma did this as a separate sheet, whereas I did includes this in the title of my variable width bar chart
  • Using a data source filter to filter the airports

Another fun challenge in the books! Thanks Emma!!

September 5, 2017

Tableau Tip Tuesday: Comparing 75th to 25th Percentile With a Music Waves Chart

No comments
This week's tip comes from a request from Dan Cox on Twitter. Dan had seen Robert Crocker post about last week's Workout Wednesday and Dan wanted to know how to create this music waves or frequency chart. It's pretty simple with a few key parts:

  1. Create percentile calcs and place them on the same axis.
  2. The date field must be discrete.
  3. Use Measure Names on the Path shelf.

There are some other subtleties that you'll pick up on the video as well. Enjoy!

September 4, 2017

Makeover Monday: Which UN Sustainable Development Goals Are of Most Immediate Concern?

This week Makeover Monday is collaborating with Viz For Social Good and the UN Sustainability Development Goals Action Campaign to visualize data on people’s views on the state of poverty, inequality and climate change.

Let's have a look at the original viz:

What works well?

  • Nice interactivity with the icons at the top
  • Easy to see the breakdown by demographics
  • Simple filtering
  • Neatly organized
  • Labeling the boxes on highlight
  • Ordering the icons by goal

What could be improved?

  • Way too many colors
  • You eye goes all the way across making it look like all of the demographics are connected
  • Seems very busy

I wanted to keep the visualisation very simple, start with an overview, and allow the user to pick what they want to see. I ended up with this simple dot plot. I also used Device Designer to create a mobile version which will render if you're seeing this on your phone.

August 30, 2017

Workout Wednesday: Average Latitude of Solar Eclipses by Century

No comments
You might think I'm taking the easy way out this week for Workout Wednesday, but I found building last week's Makeover Monday chart not as straightforward as I thought so I figured I'd share the fun with you.


  1. Must be one sheet (except the footer)
  2. Must match my y-axis scale and format
  3. Must match my reference lines
  4. Match the blue and orange for the northern and southern hemispheres
  5. Match the title and subtitle
  6. Be sure to include the footer
  7. X-axis represents the centuries
  8. Century 3000 AD is excluded
  9. Black line is the average latitude across the centuries
  10. For each century and hemisphere, each "bar" spans from the max to the min average latitude by month, century and hemisphere.
  11. The bar width represents the difference between the max and min.
  12. Match the nice rounded ends on the "bars"
  13. Match the tooltips

You can download the data in Excel format here or the TDE here.

Good luck! Remember to tweet a picture and link to your solution and tag @EmmaWhyte and @VizWizBI. 

August 29, 2017

Tableau Tip Tuesday: Using LODs to Compare a Month to the Historical Monthly Average

No comments
For this week's tip, I show you how to use a LOD expression to calculate the average for a month across all years and then compare each month in each year to that average. This is a very useful example if you want to see how a month compares to a historical average.

August 28, 2017

Makeover Monday: Player Arrests in the NFL since 2000

No comments
The start of the 2017 NFL regular season is right around the corner, so this week we're taking a look at player behaviour, specifically, players arrested since 2000. The data come from and I used Alteryx to call their API and download and prep the data. Pretty simple workflow!

Let's have a quick look at the original viz.

What works well?

  • Really nice interactivity
  • Fast and slick filtering options
  • Sorting the teams from worst to best
  • Allowing the user to customize the view
  • Showing the top 5 in three categories
  • Expand button allows you to quickly see a bigger chart
  • Option to click on a team and quickly drill into that team

What could be improved?

  • The Hide All and Show All buttons are unnecessary.
  • Too many colors
  • Tooltips aren't very useful
  • Comparisons are more difficult than they need to be

My Goals

  • Allow for comparisons between teams
  • Make the patterns more obvious
  • Reduce the complexity of the view
  • Choose simple chart types
  • Show BANs to summarize the data
  • Make a mobile-friendly view

With those goals in mind, here's my Makeover Monday week 35. Enjoy!

August 23, 2017

Workout Wednesday: The Waffles of Disney's Domination

Oh Emma! She thought she could trick me today. Mind games I say! Today's workout is to create waffle charts. Read all of the details here.

The waffle chart bit was pretty straight forward. The trickiest part for me was the calculation to get the % of total.

Fun one! Give it a go!

August 22, 2017

Tableau Tip Tuesday: Using Actions to Highlight on Hover

No comments
During the Makeover Monday Viz Review for week 33, Eva and I were reviewing this viz from Sarah Bartlett.

We recommended that Sarah include a highlight action so that the user can click on a State on the right and highlight the corresponding line on the bottom right. Sarah commented that she wasn't sure how to do this and Eva volunteered me (as she does) to make a video.

This week's tip will show you how to use highlight actions to hover over a State and highlight it in the line chart. I also show how to include a label on the end of the line. Enjoy!

August 21, 2017

Makeover Monday: The Monthly Latitude Range of Solar Eclipses by Century

No comments
I'm not going to lie, I really struggled with the data set this week. It seemed everything I tried either wasn't interesting or didn't show anything particularly good. That happens I suppose and I'm ok with that.

This week we looked at this viz of thousands of years of solar eclipses:

What works well?

  • Fantastic interactivity and drill down capabilities
  • Showing the paths of each eclipse along with the partial eclipse breadth
  • Coloring each eclipse type
  • Leveraging Google Maps so the user can customize the map to their preference
  • Good explanations above and below the chart

What could be improved?

  • Remove the labels on each line to declutter the map
  • Avoid a repeating map
  • Include a more impactful title

My Goals

  • Explore the data to find some interesting analysis per Eva's request
  • Build lots of views to see what pops
  • Simplify the view to reduce complexity and clutter
  • Compare northern to southern hemisphere
  • Use colors that are clearly distinguishable

As I mentioned, I really struggled. I built lots of view and probably hit undo 200 times. I didn't like anything. I sent a few complaining messages to Eva and she essentially told me to suck it up. Tough love indeed!

Finally, I decide to create a calculation to aggregate by century and then created an LOD to return the max and min latitude in any given month within the century. By any given month, I don't mean month/year, I mean month. So what is the average of all Januarys, Februarys, etc. and then what is the max of those values. I then compared that to max to the min to determine the range.

I don't love it, but I'm done. I've struggled enough.

August 16, 2017

Workout Wednesday: How has your home price changed?

Inspiration for this week's Workout Wednesday comes from this great post by Curtis Harris. Of course with this being Workout Wednesday, I've added a few twists. In all, this took me about 45 min.

First, you can find the housing index data here. You will need to do some minor data prep. Curtis has some hints in his post if you get stuck.


  1. The data is displayed as the monthly percent change in the house price index based on the date chosen above the chart.
  2. The State selected must be highlighted in the greenish color (#3B6F84).
  3. The US average must be highlighted in black.
  4. The most recent value should be shown on the end of the selected State and the US average.
  5. All States must be in the view. All States that are NOT selected should be thin and grey.
  6. Include a reference line for the month selected and include a dot at that point.
  7. Match all of my titles and formatting. Note that the chart title is dynamic.
  8. Match my axes.
  9. Match the footer (except replace my name with yours).
  10. Be sure to tag Curtis (@Harris7Curtis) so he gets credit when you publish it to Twitter.

Good luck!!

August 15, 2017

Tableau Tip Tuesday: How to Create a Trend Line for a Single Dimension Member

This week's tip comes from Eva's Makeover Monday week 33 in which she created a trend line for a single member of a dimension. She asked me how to do this and encouraged me to share it with all of you as well.