In this blog, I’m going to walk through how to improve your bump chart design by adding curvature to each line. Bump charts are great at showing a change in the ranking of an item over the course of time. Classic use examples include visualizing a sports team’s change in league position over time or ranking states or counties by a specific metric.
This weekend, I explored a #MakeoverMonday dataset which ranked US States by their fiscal condition (MoM Week 15, 2019).
Link to data: https://data.world/makeovermonday/2019w15
I specifically chose this dataset to refine my ‘bump’ chart building skills and built a chart showing the top 10 states by fiscal condition between 2006 to 2016. The resulting bump chart from Tableau looked like this:
As you can see above, when making a bump chart Tableau defaults to joining each subsequent mark with a straight line, resulting in acute angles across the dashboard that are visually unpleasant.
Before we begin constructing a curvy bump chart, download the following MS Excel and Tableau workbook templates:
Link to Template: https://drive.google.com/drive/folders/1MCJrlqjenL1nzSrp5f9dndw56kJOK3db?usp=sharing_eip&ts=5c830c3e
In the excel file, we can see three workbooks names ‘Entry Sheet’, ’Data Template’ and ‘Join’
The sheet we will focus on populating with our data is the ‘Entry Sheet’
Entry Sheet:
The column contents are as follows:
Dimension: The entity you wish to rank – in our case US States.
Time: This is an integer that must be sequential, that corresponds to the ‘Actual Time’
Rank: the assigned ranking for each dimension in each time bracket – if ranking has not been determined and you have only measured values then leave the column blank.
Measure: the value for each dimension in each time bracket, which will be used to assign rank – if ranking has already been determined in the data set then leave this column blank, otherwise the template will determine to rank for you in the ‘Data Template’ sheet.
Actual Time: the true time frame that will be plotted on the x-axis.
As the template is populated ensure that you consistently specify in either the Rank or Measure column. Avoid populating the rank column for certain time brackets and measure column for other time brackets, as this can cause errors in the subsequent calculations within the template.
If you wish to add additional information to your chart (in this case that may have been State Population or Total State Assets) then this can be done within the ‘Data Template’ sheet – populating column J. Ensure that none of the rows of data highlighted grey are not modified – just add in the supplementary data alongside it. In addition, no modification to the ‘Join Data’ worksheet is required – this sheet creates multiple data points per row and allows Tableau to create a smooth curve.
Save and close the excel worksheet and open the tableau worksheet. You will arrive on a landing dashboard that contains a picture. Now we need to connect to the data we have inputted into the excel template. Click on the ‘Data Source Tab’ and click on the downwards arrow next to ‘Sigmoid Bump Chart Data’ and edit connection to the excel file you have previously saved.
The workbook will now refresh with your data – it may take a while to load so persevere. You will see in the Data Source tab the ‘Data Template’ worksheet joined with the ‘Join Data’ worksheet and will have created 49 points per individual row in the data template.
Finally, click on the ‘Curvy Bump Chart Worksheet’ and you should see a bump chart that has been produced using your input data. You can now begin formatting, adding tooltips, parameters, filters, etc. to make the chart your own.
Note – the dashboard is built from 2 charts – one showing the bumps and lines, the other displaying the x-axis time-series. Keep these charts tiles so the axis is properly aligned with the bumps.
Inspiration for this blog comes from www.kevinflerage.com/2019/03/curvy-bump-chart-slope-chart-template.html
This work is based on the work of Jeff Shaffer, Rody Zachovich and Matt Chambers.