Search
  • jaredflores0523

Arc Sankey Chart - Tableau Prep Template





All credit for the original template, method, and workbook goes to the Flerlage Twins. Thanks for letting me create this!

Original Post: Creating an Arc Sankey in Tableau - The Flerlage Twins: Analytics, Data Visualization, and Tableau

Prep Template Build Video: Arc Sankey Tableau Prep Template: Put Some Prep in Your Step - YouTube



We're continuing our journey of revisiting some of the popular Tableau Templates and creating Tableau Prep templates! Here are the previous templates for you to check out: Curvy Bump Chart & Slope Chart - Tableau Prep Template (whattheviz.com) Coxcomb Chart - Tableau Prep Template (whattheviz.com)


This time it's going to be a little bit more involved, but with the main focus being to understand how the data is being restructured, it should continue to reinforce your data prep knowledge!


I will continue to note: I'm not inventing anything new here. Kevin and Ken are the real pioneers of this work, I'm simply providing a way to incorporate Tableau Prep if you use their templates. For details on how the visualization came about in tableau and also how to fill out the sheets, check out the original blog: Creating an Arc Sankey in Tableau - The Flerlage Twins: Analytics, Data Visualization, and Tableau


This time we have two sheets to fill out. Arc and Orders.

(Arc Sankey Template - Google Drive)


The Data You should see the following sheets:


Arc

Order


Here is a quote from the original blog on how this should be filled out:


The Order sheet allows you to specify the order, left to right, which your entities appear along the x axis. You’ll need to modify this sheet to include each unique entity and a numeric order.
Finally, the Arc sheet will be used to populate your data. It contains just four columns. You can add more if needed, but these are the four that are required by the Tableau template. The columns are as follows

You'll want to reference Ken & Kevin's original post to go fully in depth (Creating an Arc Sankey in Tableau - The Flerlage Twins: Analytics, Data Visualization, and Tableau)

Note: Apologies if some of these links are repetitive. I want to make sure these posts are as easy to move through as possible. If the link only needs to appear once at the top or bottom of the page, let me know. Feedback will help me improve the overall structure and make these posts as useful to you as possible.


Prep Flow


Once you've got your sheets filled out, you'll want to download the Prep flow from the google drive. When you open it up, you'll have some errors:






We're going to use the excel sheets to correct the errors.


In the Connections pane in Tableau Prep, click the plus sign and then Microsoft Excel





Connect to the filled out template. Since you've got two sheets, we will start with Arc. Click and drag the Table in the connections pane, and hover over the Scaffold Range step. You'll see 'Add' which is where we want to drop the table.






You'll do the same with the Join From Step





And again with the To/From step





Next, we want to drag the Order table from the connection pane and add it to the Join From step.






We will rename the Order table to 'From Order'. Then, we will drag a second copy of the Order table from the connections pane to the Join To step, renaming it 'To Order' when done.




This is what you should end up with




Notice one difference here vs the previous templates is that we've pushed some of the calculations into Prep to reduce processing time in Desktop. We didn't move them all here though, only calculations that aren't using an aggregate function (SUM(), MIN(), AVG(), MAX etc.). It's important to note where aggregation is happening in your data process and in this case, it's best left in Desktop.


From here, you just click on the play button next to the output step, designate a destination for the file, and you're ready to connect to the bump chart workbook! (Global Migration 2005-2010 | Tableau Public)


When you open the workbook, you'll find Data in the toolbar and click New Data Source


In the connection menu, you'll go to "More..."






Once you add the new data source, we're going to make one change. Go to the Arc Sankey Data Extract data source, and move the Dimension Orderx field from Measures to Dimensions.








Now you can replace the data source. You'll get some errors, but we will fix those.






You'll see the final calculations carried over to the new data source, and a few fields with 'Abbr' in the name have errors. Let's delete those by holding ctrl and click all three fields, then right click and select delete.







Click yes on the message that pops up




Finally for your labels, go to SUM(0) on the marks card and drag Dimension to the Label mark.





And there's your arc chart!





I hope you are able to make use of this Prep template! If you'd like to learn how it was built, check out the video here: Arc Sankey Tableau Prep Template: Put Some Prep in Your Step - YouTube

97 views0 comments

Recent Posts

See All