A Hack-Job way to create a Jump Plot in Tableau

Ok, so before I get into this...if you really want to use a Jump Plot, you should probably go to http://www.jumpplot.com/ and follow Chris DeMartini's awesome posts (also, I'm writing this fairly quickly, so I apologize if it sucks). But if you just want to create something quick as a proof of concept, or something that doesn't really need interactivity, or just because it's kinda of cool hack, here you go.

This will be a short post, so I'm going to run through this quick (because I refuse to put more time in the blog post than I did the viz). What is a Jump Plot? Per jumpplot.com.."The Jump Plot allows for scalable graphing of sequence event data with multiple variations to successfully visualize the performance of your workflow". Here is an image of a Jump Plot from Chris.


As you can see, there are "Nodes" that identify the various steps your workflow may go through, and the "Jump" is relative to a variable measure related to those steps (in most instances it would be time).

With that in mind, we can identify that there are 3 primary point to this viz. There are the nodes, and there is the Peak measure (time). The curved lines are visually important, but in terms of what we need, there are only 3 points.

Ok, so how do we cheaply make this in Tableau?

1. Data Prep


As you can see, I have a Category, a field called CheckPoint, NextCheckPoint and Value. There are the three points I need. But to do what I want in Tableau, I need to densify this data out. I could Pivot the dataset and get the same end goal, but that only works with Excel/CSV so I am going to use a Scaffold instead. My Scaffold Dataset just has 3 rows with values 1-3. I am going to crossjoin it to my datasource so that my data is replicated by a factor of 3.




Easy so far right. Ok, once we get in Tableau, we need to create our X/Y calcs.



Cool. So all we are doing here is padding out our data to fit on a Scatter Plot. So for the first 2 row on the X axis, we want them to be our Checkpoints, but we need a Checkpoint between these two, that we can use as the Pinnacle of our curve. So we do that by Subtracting the Difference between the points, dividing that by 2 and then adding it to the first point. Once we have that, we can flip over to the Y, and set the Check Points equal to 0 on the Y axis, and the Middle Point equal to our Value.

After that, we just need to plot them.


Perfect! No really, this is what I wanted. You may notice I put Category on the Color Mark, and made them all the same color...why did I do that? Well, I need it for the hack of course.

Once you are at this point, right click on the Canvas and show the Trend Line per Color.


This still looks kinda F'd up, but we are getting close! To see the glory, right click on the Trend Line and switch it to POLYNOMIAL 2 DEGREE.....



It's like Magic! Yeah, we are using a Trend Line to create a Jump Plot...hacky shit. So at this point we need to do some cleanup. You need to fix the Y axis to Start at 0, so that you don't see the never ending Trend Lines (which means this technique will not work for having reversed Jump Plots for sequences moving backward). We also need to deal with the note at the Top of the Pinnacle. Easiest way to do this is just to reduce the Size all the Way.

I then create Dual Axis on the Y at 0.7 for the Nodes, and make sure it is the Same Color as the Trend Lines (because Trend Lines will always overlap your marks).


So here is there final Hacky Product.

Now that you've read this, please go to JumpPlot.com And/Or this blog post on DataBlick http://www.datablick.com/blog/2015/08/20/time-to-get-hopping-with-jump-plot-by-chris-demartini-and-tom-vanbuskirk to do this the correct way.

Rody
Previous
Next Post »
0 Comment