How To: Dynamic Clusters in Tableau

Tableau 10 brought the new clustering feature, and this is one of my favorite new features of Tableau.  One thing that you might not realize is that you can reuse the clustering model within your dashboard after you create it.  Tableau allows you to save a cluster as a group.

Tableau 10 also allows groups to be used in calculated fields, so that means we can create a parameter to switch groups and apply color.  Using this technique, we can give our users the ability to change how many clusters are being applied to the data.  This lets them explore the data on their own without depending on someone to manually change the cluster size.  In this example, we are looking at NFL Combine statistics for Wide Receivers.

First, let's create a scatterplot and see how it's done.

1.  Click the analytics tab and drag the Cluster into your view

2.  In this case, I wanted to let the user switch between 3-5 clusters.  You can create as many clusters as you'd like, but we will set the first to cluster to 3.  In this example, we are clustering by 40 yard dash time and weight.  This will allow us to see players who are big and fast, small and fast, big and slow, etc.

3.  Once you have created the cluster, drag it back to the dimensions to create a group.

4.  Name the newly-created group so you can identify how many clusters were used.

5.  Now, click Edit clusters and change the number of clusters to 4.  Do this for as many clusters as you'd like to create.

6.  Once again, drag the newly created cluster to the dimensions and name it appropriately.

7.  Create a parameter with the list of clusters and the value

8.  Create a calculated field to check the parameter value and switch clusters appropriately.

9.  Drag the new calculated field to the color mark.

10.  Finally, we can enhanced the graph a bit by adding some dashboard actions to highlight the cluster and show the player names on hover.  For more details on this technique, see this post.

Feel free to download the workbook and comment with questions.

How To: Add Highlight Actions to Enhance Usability in Tableau

Click on dashboard to interact

For Makeover Monday, I remade the LinkedIn Top Skills report supplied by Tableau.  I wanted to focus my visualization on comparing the top global skills across all countries.  To do this, I used Andy Kriebel's excellent tutorial on ranked dot plots.  The finished visualization looks like this:

I think this is a really clean design.  The top row for "Global" sets the baseline for the top 10 global skills.  The reference line extending from the "Global" rank marks show how each skill compares to the global ranking by country.  When the dots are blue, the skills ranks at or above global average while green dots are below the global average.

I wanted to be able to show the marks for the ranks, but I didn't necessarily want to clutter the design by showing all of the marks.  Labeling everything looks like this:

This looks very cluttered to me, and I feel like applying a few hover highlight actions can help maintain the clean look while also enhancing usability.  Let's take a look how it's done.

1.  Drag the dimension or measure to the label.  For Marks to Label, choose Highlighted.

This will cause the marks to appear when clicking on the dashboard.

2.  For this dashboard, I wanted the marks to appear when hovering over the country or the skill.  That way you can easily see how the skill compares to the global rank but you can also see how each skill ranks within a country.  

Now for the magic of Tableau's highlight actions.  Click on the Dashboard menu option and click Actions

3.  Click Add Action, Highlight

4.  For my dashboard, I wanted the highlight to appear on Hover.  Choose Hover under Run Action on, and under Selected Fields, choose the fields that you want to highlight.

5.  When hovering, the dashboard will highlight the columns as well as display the marks for the ranks.

Feel free to download the workbook and comment with any questions.

How To: Shaded Slope Charts in Tableau

I recently found an article showcasing 2016 in charts, and I really liked the slope charts with the area shaded between the two categories being compared.

I found this to be a really cool technique for making a point and telling the story.  I wanted to see if I could recreate this in Tableau, so here's how it's done.  I'm using the Superstore data in this example.

1.  Create a standard slope chart by setting the Year to discrete, filtering to two discrete years, adding the measure to the Rows and Category to the detail.

2. In this case, I want to show the difference in Profit between Technology and Furniture.  To create the shaded area, I need to isolate their respective profits.

3. Drag the newly-created Furniture Profit measure to the Rows, and then drag the Technology Profit pill to the left to create the Measure Values pill.

4. Create a dual axis and synchronize the axes, change the Measure Values to Area, and remove Category from the detail.

5. Move the Technology Profit measure to the top of the Measure Values list and change the Furniture Profit color to white.  I also went ahead and changed the Technology Profit color to blue.

6. Since we are using an area chart, the Technology Profit is being stacked on top of the Furniture Profit, which is pushing the shaded area up above the slope chart even when synchronized.  To fix this, we need to subtract the Furniture Profit from the Technology Profit.  I went ahead and edited the calculation in the shelf: SUM([Technology Profit]])-SUM([Furniture Profit]])

7. To color the dimensions I wanted to compare, I created a calculation to only color those dimensions.  Drag this dimension to the color and turn on the dotted line.

8. Hide headers and clean up the chart formatting. I also thickened the lines and set the area chart color to blue with 20% transparency in my example.

9. Finally, incorporate storytelling elements like using color to point out the categories being compared and annotations to highlight the gap.

Feel free to download the workbook and comment with any questions.

National Championship 2017: Clemson vs Alabama

As a kid, I vividly remember seeing a Clemson 1981 National Championship poster in my friend's room.  I remember seeing that poster and being blow away that Clemson had previously won a national championship.  I've pondered over time if Clemson would ever win a National Championship in my lifetime; 1981 was a few years before I was born.  I always said that if somehow Clemson ever made it to the National Championship I would attend the game, and I was lucky enough to go to both of them and ultimately see the big win this year.  As an alum and employee of Clemson University, Clemson has always been a huge part of my life, so that whole experience is something I will remember forever.

To commemorate this event, I wanted to create a visualization of the entire game that would work well as a poster.  I plan on having this printed out for my son's room at some point.  I wanted to make it interactive so that you can hover over any play and see the details.  I also wanted to create something that would allow you to see the actual play in the game, so I was able to link game footage to all of the data in the visualization.

Hover over any play to see details; Click on any play to see the actual play in the game.

Click for the full interactive version