September 1, 2014

Makeover Monday: Where We Donate vs. Diseases that Kill Us

One of the ways that I can tell I've made an impact on people I've interacted with is when they send me links to terrible visualizations that they want me to makeover, long after we have worked together. My friend Karyn, who I used to work with at Facebook, send me a link last week to this infographic:

Source: IFLScience

Of course the point of this infographic is to show how much money the ALS Ice Bucket Challenge has raised compared to how few die from the disease relative to other diseases. The data is from 2011, so it doesn't account for the fact that the Ice Bucket Challenge has now raised over $100M. For the purpose of this makeover, let's focus on the chart itself. I see several issues immediately:
  1. The bubble sizes were originally based on the diameter of the circles, not the area.  This is a big mistake! The author has since fixed this so the graphic above is now correct.
  2. There are too many colors. I find myself going back and forth to the legend. It shouldn't be so hard for the readers.
  3. The colors in the legend are in no particular order; not alphabetical, not by deaths, nor not by money raised. This is way too confusing.
  4. It's difficult to trace the relationship between the deaths and the money raised. 
Taking these difficulties into account, I have created this slope graph.

Some of the benefits of presenting the data with a slope graph include:
  • We can see the ranking relationship between the cause and the disease much easier. 
  • I've highlighted the Ice Bucket Challenge since it is the focus on the article.
  • I colored the remaining line by red or blue to indicate a decline or increase in rank respectively.
  • I labeled the ends of the lines directly to eliminate the need for a legend.
One additional element that would add value to the slope graph would be to include the bubble size. If you'd like to build your own infographic, you can download the data here and/or the Tableau workbook here.

August 28, 2014

Two-way Sorting in Tableau - Sorting Some of the Viz by a Measure and the Rest Alphabetically

I had an interesting requirement posed to me yesterday that I hadn't ever run into before. I'm using this Airline Delays data to demonstrate the technique. The requirements were along these lines:
  1. Given a list of airports, there are a subset that are "targets". Let's assume they are the top 15 with the most flights in 2014: ATL, DFW, ORD, LAX, DEN, IAH, SFO, PHX, LAS, MCO, CLT, EWR, BOS, SLC, LGA
  2. The airports need to be sorted by the latest delay rate.  However, only those in my top 15 list should be sorted by delay rate, the rest should be sorted alphabetically to make them easier to lookup.
  3. Include sparklines for each airport for 2010 to present.
This is the final product and here's how I went about solving this problem. There could very well be a more efficient method, but this worked for me.

August 25, 2014

Tableau Tip: Month over Month KPI Movers

Reader Brian Bieber (no relation to Justin), a Data Analyst at Vanguard, sent me this question:
I'm currently running some monthly data where a list of records is assigned a KPI indicator like G/Y/R. I've been asked to produce a follow-up piece that would show "movers" from the prior month's data, just in a simple text view. So I guess what I need to try and do is figure out how to do a lookback/compare from prior month data to see who went from Y/R to G on the positive change side and who went from G to Y/R on the negative side.
What Brian didn't realize was that answer to his question was pretty much in the question itself; he needs to use to LOOKUP() function. I sent Brian a solution, but decided to fancy it up a bit more and add some more functionality using parameters:

The steps for building a KPI movers viz like this are pretty straight forward. I'm using the Superstore Sales data set that comes with Tableau in this example.

August 22, 2014

Spreading the Gospel of Data Viz & Tableau at Facebook: The VizWiz Tour

Tuesday was the final stop on my three city tour, evangelizing the work we do at Facebook with data viz & Tableau. We're on a ninja hunt, so these types of events are fantastic for meeting new people, identifying talent and learning the various way that people are implementing data viz & Tableau.

My first stop was back at my old stomping grounds at the Atlanta Tableau User Group, where Andy Piper and John Hoover of Norfolk Southern hosted over 100 people. A few days later I was preaching again to a group of about 50 at the San Diego Tableau User Group, where Matt Shoemaker of Interactions Marketing and Ben Sullins of Pluralsight hosted the event.

Tuesday marked the culmination of the mini-tour, with 2014 IronViz contestant Jeffrey Shaffer of Unifund and Jonathan Pickard, the leader of the Cincinnati Business Intelligence & Analytics group, hosting the event at the amazing Linder College of Business at the University of Cincinnati. They really have something special going on at UofC in the business analytics space. If you're looking for great analytical talent, they definitely need to be on your list of places to visit and connect with.

There were about 100 people in attendance, all armed with Tableau Public, data about airline delays, great questions and an incredible appetite to learn.

The format of my talks during this tour generally followed this three-hour agenda:
  • Hour 1: Presentation – Building a data viz & Tableau culture; How we did it at Facebook & how you can do the same
  • Hour 2: Tableau Training - Fundamentals for analyzing an unfamiliar data set
  • Hour 3: Group exercise and viz presentations
Here is the presentation I gave in Cincinnati:

One of the things I like to do when giving these talks is to ask the audience why they are there. This way, I can customize the talk along the way to make it more suitable for them and to ensure they get the most value out of it. The drawback of this approach is that the talk tends to go on longer than one hour, which was the case Tuesday.

To accommodate for my long-windedness, we decided as a group to skip the group activity and focus on the Tableau training. The fact that every person in the audience came prepared with Tableau installed was a HUGE help and a big time-saver. When I teach, my goal is to overwhelm the class. I have always felt that when learning Tableau, you should drink from the fire hose. I move very fast in the training, yet I don't leave anyone behind. The class will often feel that I'm moving way too quickly at the start, but I do that intentionally, so that they learn how easy it is to build in Tableau.

The class of 100 was comprised of only a handful of people that had been using Tableau for more than one year, with about 80% of the class getting a taste of Tableau for the very first time. In 90 minutes, we build 17 different worksheets and one interactive dashboard. You can download the workbook here. This training session was really fun because I had to hold a mic the whole time; this meant I was teaching and building vizzes one-handed. We covered a few major areas, while using the Show Me only once (I like to teach people how to build visualizations without it):
  1. Bar charts: Ranked bars, Small multiples, Stacked bars, Side by side bars, Stacked % of Total, Bar in bar, histograms
  2. Line charts: Basic line chart, Multiple lines, Year over year, Small multiples, Forecasting, Moving avg, Area chart
  3. Maps: Dot maps, Colored dot map, Sized dot map, Sized and colored dots
No two training classes are ever alike either. The classes always asks different questions, which lead me to different ideas. This class was no exception. In the end, we built this interactive Airline Delays dashboard that uses containers and actions to show/hide other charts. This was 90 minutes of pure fun and I bet Tableau has some new zealots.

August 18, 2014

Makeover Monday: SEC Football Coaches Get Paid!

College football season is nearly upon us and for those that live in the Southeastern US, college football is king. It dominates EVERYTHING - from sports talk to newspapers to online forums to Facebook posts to coaching salaries. College football = Life to so many people. If you've never been to an SEC football game, add it to your bucket list; it's an experience unlike any other.

Saturday Down South is a website dedicated to all things SEC football. This past Thursday, they published this list of the salaries for each coach in the SEC (except for Vanderbilt who does not publish their coach's salary).

This list is simple enough, yet when I saw it, I felt like there was more of a story in there. You can clearly see, just from the table, that Nick Saban is a huge outlier. He's a winner, and he gets paid to win. Keep in mind that these are only their base salaries too. Bonuses, appearance fees, etc. are not included.

I decided to use Tableau's story points for the first time to answer a couple of key questions:
  1. How much of an outlier is Saban compared to his peers in the SEC, to other coaches in other sports and to other college football coaches?
  2. How widespread is this level of pay for college football coaches and how does the SEC stack up?
  3. Is Saban worth the money?
I also need to give a quick thank you to Emily Kund and Matt Francis for reviewing this story for me.

Some things I've learned while using Story Points for the first time:
  • If you want to tell a story, know the questions you want to answer ahead of time. This will help you plan the beginning, middle and end of the story.
  • As I answered questions, I was led to more questions, which led to finding more data, which led to a better story. Be prepared to iterate.
  • Story Points are pretty inflexible. You can't do any formatting of you viz once you're inside the Story Point. You have to go back to the original worksheet to change anything. I had expected this to work more like editing a viz on a dashboard.
  • I feel like I'm not quite using Story Points as they were intended. I feel like I'm missing their intent in this attempt because I could have done all of this same formatting with multiple dashboards and tabs. I need to learn more about the “idea” behind Story Points.
Download the data here and the Tableau workbook here.

August 12, 2014

Tableau Tip: Creating a Connected Scatterplot

Today I had the incredible honor of helping Alberto Cairo create his very first Tableau visualization. Alberto chose to create a connected scatterplot.  Shortly thereafter on Twitter, Lynn Cherny asked:
So this post is dedicated to her question.  Here you go Lynn:

Step 1: Create the scatterplot

Step 2: Change the Mark type to Line

Step 3: Add a continuous date dimension to the Path shelf

Step 4: Add Markers to the lines via the Color shelf

Step 5: On each axis, uncheck the "Include Zero" option

Step 6: Add a dimension to the Color shelf to create additional lines

That's all there is to it!  Super simple!  Download the sample workbook here.

July 21, 2014

Makeover Monday: Slicing Up the La Liga & Premier League Revenue Pies

Over the weekend, Reader Ben Jones sent me a message on Twitter pointing me to this post by @kmgfootball, which he thought would be great for a Makeover Monday example.

The point the writer is trying make is clear: Barcelona & Real Madrid combined get almost as much revenue as the rest of the clubs in La Liga, whereas in the Premier League, there's much more parity and revenue sharing. The problem is that the charts are basically unreadable.
  1. There are 20 slices in each pie.
  2. Each slices contains way too much content: team logo, team name and revenue, yet it lacks the percentage each team takes in, which is more meaningful than the revenue in this case.
  3. The image is blurry.
  4. The fonts are tiny.
I recreated the data and used Tableau to build a lollipop chart instead of a pie chart.

I chose a lollipop chart because I wanted to show the data in a bar chart view, but accentuate the end points. I then color-coded the dot on the end of the lollipop by the revenue and kept the range consisted across the leagues. In addition:
  1. I kept the scales for the bars the same on both charts so that you could see how the leagues compare to each other.
  2. I converted the Pounds to Euros (1 british pound sterling = 1.26 Euro) to make the data more comparable.
  3. I included the share of revenue as a label on the lollipop.
This view makes two points very obvious:
  1. There are only two teams that matter to TV networks in Spain.
  2. The Premier League is very, very rich. The team will the lowest revenue allocation is higher than the third highest team in La Liga.
How would you visualize this data differently? The lollipops are merely one approach. Download the Tableau workbook here and leave a comment with a link to your version.

June 30, 2014

Makeover Monday: How Americans Spend Their Online Time

Time spent online - we all do a LOT of it. Whether it be Facebook, Instagram, YouTube, ESPN, or any other site, the data shows that the average American spends a LOT of time online. Business Insider took a look at this recently with this circular chart:

The content of this slide is quite interesting, but their approach for visualizing it could be better.  I feel like they went after cute instead of simple. 

In his article "Our Irresistible Fascination with All Things Circular", Stephen Few talks about how hard it is to make comparisons with circles. Many designers use the diameter of circles to distinguish size. It's hard to tell precisely if Business Insider made this mistake, which in itself is a problem.  If I can't easily tell that the 19 for Online Games is just over half of Social Networks, then I'm having to do too much work.

In addition, they have plotted the circles on two rows. Comparing any two of these circles that are not directly adjacent to each other is too hard.

I would have created a simple bar chart instead.

I've made a two notable changes:
  1. I converted the circles to bars, making comparisons much easier.
  2. I added the % of total time spent online to the end of the bars to give additional context.
Do you agree that this is easier to read? If not, why not? How would you do visualize this data differently? Download the data here or the Tableau workbook here.

June 16, 2014

Makeover Monday: Where do World Cup players play professionally?

Unless you live under a rock, you know the World Cup started last week. In this spirit, Chart of the Day published this chart showing where the players play professionally.
This chart seems simple enough, yet they make it too hard on the reader.
  • A horizontal bar chart would be easier to read
  • The sorting is backwards
  • They're not doing enough to show the geographic distribution
In about 10 minutes this morning, I built this viz with Tableau for Mac to address these concerns.  Go USA! I believe that we can win!

June 9, 2014

Makeover Monday: Label bar charts for easier comprehension

I'm in the market for Chromebooks for my twins and was reading quite an excellent overview by The Wirecutter. In the middle of the article is this chart comparing the performance of various Chromebooks:

This chart seems innocent enough, yet I found myself having to constantly reference the legend because they didn't bother including the labels directly on the chart. A more understandable alternative might look like this:

In this chart I have:
  1. Added labels for the bars
  2. Removed the legend and the different colors for each Chromebook
  3. Made the bar horizontal bars so that the labels are easier to read. I also find it easier to compare the length of the bars on horizontal bar charts, but that's a personal preference.
  4. Added a metric to show how much slower the other Chromebooks are compared to Wirecutter's recommendation (Dell Chromebook) and colored the bars by the % difference. This helps provide more context to the speed comparisons and I don't have to do the math in my head.