November 17, 2014

Makeover Monday: The Facebook Election

From Buzzfeed: "The social network (Facebook) may end TV’s long dominance of American politics — and open the door to a new kind of populism." The purpose of this article was to demonstrate that conversations on Facebook are becoming a dominant force in the U.S. political landscape. The article included this infographic about Facebook users' sentiment towards 2016 Presidential candidates.

There are several things about this infographic that I don't like:
  1. The title doesn't tell us what the graphic is about.
  2. The pie charts; simply too many of them making comparisons difficult.
  3. There's no apparent order to the candidates.
  4. Candidate names are in ALL CAPS...why?
  5. The label for the Democrats section is off to the right, why?
  6. Some of the pies add up to less than 100% and some to more than 100%.
Those are the immediate things that stuck out in my initial review. I recreate the data in Excel, imported it into Tableau and built my own infographic. Download the workbook here.

I believe I've made improvements to all of my concerns above:
  1. The title makes it more clear what you're looking at.
  2. I switched the pie charts to stacked bars.
  3. The candidates are ordered by positive sentiment.
  4. The candidates names are easier to read since they're in proper case.
  5. The labeling for the two sections is aligned.
  6. Since I'm using stacked bars, the fact that some of the candidates are not equal to 100% is irrelevant.
According to this sentiment data, it will be Condoleeza Rice vs. Joe Biden in 2016. I certainly am not looking forward to all of the political ads coming our way.

Thoughts? Which one do you prefer? What would you do differently?

November 9, 2014

Tableau Tip: KPIs and Sparklines in the Same Worksheet

I'm writing this blog post outside of a Starbucks in the Sao Paulo airport.  Sao Paulo you say? I'm in Brazil this week with four other folks from the San Francisco Bay Area TUG to help Tableau leaders in Rio de Janeiro and Sao Paulo get their own TUGs started. I see this as a way that I can give more than I take from the Tableau community. Yes, this is what I choose to do with my vacation time (it's a bit of a sickness) and no, Tableau doesn't pay me to do this.

Anyway, as I was on the plane, I thought it would be great to kick off the week with a new tip. Today, I'm writing about combining KPIs and sparklines in a single view. It's very common for business users to want to see KPIs and trends in the same view. These give them a sense for the overall direction of their product and also highlight the most meaningful numbers to them. I often see people create these as separate worksheets in Tableau, but with this post, I'm going to show you how to combine them into a single view.

Combining them into a single view provides a couple of benefits:
  1. Tableau only needs to render a single sheet, so until parallel processing comes out in v9, you'll see a performance benefit.
  2. If you have a hierarchy, then expanding the hierarchy will keep the table and the sparklines together. 
This example is using a very simple data set of daily volume for several stocks.  My KPIs include:
  1. Trading volume for the last 7 days
  2. Trading volume for the prior 7 days
  3. Week over week change (raw & %)
This should be a fairly typical set of KPIs for most products. You could easily expand this technique to include m/m or y/y calculations depending on how your organization calculates those.  Here's the final solution, with details on how to create this view below.

October 31, 2014

Facebook Jeopardy: Accordion Views

Alex, I'll take No Assembly Required for $300 please. The answer is:
I wish I could expand a section in-line 
We all get frustrated with the inability to scroll synchronously across multiple worksheets on a dashboard in Tableau. At #DATA14, I showed how I address this problem by creating accordion views.
Here's the demo of the hack from #DATA14 (the hack starts at 20:22 if it doesn't start there automatically):

Give it a whirl in the viz below. Click on the Regional Sales tab to see how it doesn't work, then click on the Category Sales tab to see the accordion views in action.

Download the Tableau workbook here.

Join and/or Support our Tableau #Movember Team

Matt Francis - Our #Movember Team Leader
This Movember, along with Matt Francis and several others, I will be raising vital funds and awareness for men’s health, and I want you to join my team.

The goal is to get the Tableau community together behind this cause, spark the conversation about mens health, raise money, have some fun and look damn good in a mustache. Look at Dan for example!!

Dan Murray - Many moons ago
The Movember Foundation is the leading global organization committed to changing the face of men's health. They achieve this by challenging men to grow mustaches during Movember (the month formerly known as November) to spark conversation and raise funds for prostate cancer, testicular cancer and mental health problems.

I'm passionate about this cause because too many men are dying unnecessarily from prostate cancer. In 2014, more than 233,000 men will be diagnosed with prostate cancer.

The Movember Foundation is working tirelessly with an urgent goal in mind: accelerating breakthroughs in prostate cancer research that will benefit patients and their families. Movember is achieving this with the formation of the largest, global alliance of prostate cancer researchers and clinical specialists, who are tackling the toughest prostate cancer challenges.

Signing up to my team and taking part in Movember will ensure you make a real impact to the men and their families affected by this disease. It would be simple to just sit back and do nothing, but it would be admirable to sign up and do something significant.

Mo Bros, sign up to grow a moustache for 30 days, and Mo Sistas, sign up to support the men in your lives. Join my team today and help change the face of men’s health:

Personal Page:

For some additional inspiration, check out this great viz that Matt made last year to help raise awareness:

October 30, 2014

The Hubspot Writers Guide - Stop with all of the excuses!

I don't remember how I ended up on Hubspot's email list, but I'm certainly glad I did. Just about every week I receive an email from them with content that interests me. Today, I received a link to this great guide written by Corey Eridon and fantastically designed and edited by Shannon Johnson:

Given that I love writing, yet I often struggle with how to communicate clearly, I downloaded the guide and read through it. I was blown away by the fantastic advice and wanted to pay it forward to you all. If you write a blog, a book or have any interesting in writing at all, you should read this.


October 29, 2014 - A simple interface for creating great looking charts in d3

Yesterday I had the pleasure of meeting Matt Sundquist, Co-Founder and COO of Plotly is a really interesting new data viz product that allows you to quickly build charts directly in your browser. It's built on top of d3, so it has tons of styling capabilities. If you're looking to build charts with d3, but don't want to do much, if any, coding, then you should definitely check it out. They have a free version.

What is Plotly? The folks at have a great summary:
Plotly is a young graphing and analytics startup, which makes it easy to analyze and visualize data together. Using, users can import data from anywhere, then make and share online graphs using Python, MATLAB, R, Excel, Julia, and their web app. Users can also share work and collaborate on projects.
The Plotly API enables users to analyze and visualize data in one place, and forms an important step in building the infrastructure for data science to be further democratized. Their goal is to be an awesome platform for collaboratively analyzing data and making graphs. 
From the Plotly website, in the workspace area (think of this as a worksheet in Tableau):
Easily make graphs with your data in the workspace. Import data from Google Drive or upload Excel or text files. You can apply fits, stats, and functions to your data.  
Every element of a Plotly graph is customizable. Change the colors, annotate, write LaTeX, toggle graph ticks, and much more. It's up to you!
The best way to get familiar with any new product is to start using it. Since I had just publish a parallel coordinates plot in Tableau yesterday, I thought I would use the same dataset and see how long it takes to build something similar in Plotly. I was pleasantly surprised by the simplicity and intuitiveness of the interface. It took me about 30 minutes to build this view, but a lot of that time was spent tweaking the settings to get them just right, which I'm perfectly ok with given the very detailed control I have over the final display.

Plotly doesn't currently support things like filtering and parameters yet, but for a first pass through, I really like it and will definitely be using it more often going forward. So, here's my first viz (be sure to hover over dots to see their awesome interactivity):

October 28, 2014

My first experience with and Tableau

Remember when you first found Tableau and realized you would never use Excel to create charts again? Well, I had a similar eureka moment last Thursday when I sat in on a great webinar by hosted by Alex Gimson - Build Grow Scale: Getting started with The difference here is that I will no longer need to copy/paste from webpages; will do all of the work for me!!

During the webinar, Alex revealed that he was a huge Arsenal fan (as am I), and I wanted to find a simple project to become more familiar with the tool. My basic idea was:
  1. Use the Extractor to download the Premier League table from ESPNFC for every season since 2002
  2. Create a visualization in Tableau
  3. Allow the people interacting with the viz to highlight their favorite team
  4. Make Alex happy!
During the webinar, Alex went through a simple Extractor example. Here's a screenshot of the extractor that I built (click on the image to make it larger):

Get the dataset here. Overall, the process was super simple. All I had to do was paste the URL in the box on the left, then add a URL for each season. From there, I clicked on the Download button on the upper right to download it into Excel. I did a bit of cleanup in Excel to make it Tableau-ready.  Download the Excel data here.

Before, this would be a painful process of navigating to each webpage, copying the table, pasting it in Excel and repeating for each season. Using, I completed the whole process, including cleaning up the data, in under 5 minutes.  The portion of the process took about 2 minutes.

From there, I built this simple viz in Tableau. It took about 30 minutes to build this in Tableau, but I had already sketched out on paper what I wanted to create. I waited until match week 9 completed to publish this viz because I wanted to test how easy it is to refresh the data in the Extractor. It was super simple!

I would highly recommend using I'm going to continue to look to use it whenever I need to crawl webpages for data.

Download the Tableau workbook here.

October 27, 2014

Monday Makeover: The odds of dying from select causes in the USA

Peter Gilks of Paint By Numbers sent me this viz last week for a Monday Makeover.

At first, I thought Peter was trolling me, because this is just so, so bad. My initial thoughts:

  1. Why is there an "any cause" box? We're all going to die so of course the ratio is 1:1.
  2. There are two causes with 1 in 7 odds, yet the boxes are different sizes.
  3. Americans have a 1in 28 chance of dying from Chronic lower respiratory disease, yet that box isn't 1/4 the size of the 1 in 7 boxes.
It only gets worse from there. I would have made this much simpler with a bar chart. Yes, it's boring, but it's more effective.

Download the data here and the Tableau workbook here.

October 24, 2014

Tableau Tip: Blending data sets that have different max dates

Fun little problem at work today. Imagine you have four data sources that all have a Date field in common, but they all land in your database at different times. You want a view of the data for the latest date that they all have in common.

Here's a sample of data the represents the situation:


Inside Tableau, these are four different data sources.  I blend them all together onto a single worksheet like this:

What I desire is to only show the data for the latest date that all four data sources have in common, 10/17/2014 in this example. While there might be a more efficient way to perform these calculations, I want to share the approach that I took to solve the problem.

First, I created a calculated field in each data source to get the max date. Note that I've set the table calculation to calculate along Date.

I then added each of these calculations to the view to make sure I was getting the results I wanted.

Sweet! This is exactly what I was hoping for. Next I need to determine which one of these four dates is the minimum and then return the date from that data source. This is the calc I created and it's kinda messy, but it works. Note this I set the calc to compute along Date.

This calc returns 10/17/2014, which is exactly what I was expecting. One more step. I need to create a calculated field to use as a filter in my view so that I only see one row.

I add this to the Filters shelf, set the Compute using to Date and choose True. That's it!

If anyone knows a more efficient way to do this, I'm all ears! Download the workbook here.

October 23, 2014

Facebook Jeopardy: My extract has been failing for the last 3 days and I just noticed

Alex, I'll take Tipping The Scale for $200 please. The answer is:
My extract has been failing for the last 3 days and I just noticed
Anyone that uses Tableau Server can benefit from this hack. Our admin team created this awesome tool that monitors the extract refreshes on Server and sends us notifications once extracts complete or fail. Imagine a life where you have trigger kicking off your extracts and you have a service that monitors your extracts; that's what we have and it freaking awesome!

While we cannot share the code for this (it's built on our internal code stack anyway), the idea and the implementation is quite simple. A couple weeks ago, I was at Tableau HQ and did a deeper dive into this for them; here's to hoping they add this into Server as a standard feature.
Here's the demo of the hack from #DATA14 (the hack starts at 10:22 if it doesn't start there automatically):