Introduction
Sankey chart is a type of flow diagram that visually depicts the flow of energy, materials, or costs from one state or stage to another. It is named after Irish Captain Matthew Henry Phineas Riall Sankey, who used this type of diagram in 1898 to show the energy efficiency of a steam engine.
The key features of a Sankey chart are:
Nodes: The start and endpoints of each flow are called nodes.
Links: The flow paths between nodes are called links. There can only be one link between a pair of nodes.
Link Width: The value of the flow between each pair of nodes is encoded by the width of the link. The wider the link, the greater the flow.
Colors: Coloring the links helps establish visual mapping with their respective nodes.
When to use Sankey chart?
Sankey charts are useful for visualizing:
The customer journey from initiation to purchase.
Movement of stock in a supply chain.
Website traffic flow and user journey.
Energy inputs, useful output, and wasted output.
Material flows and cost breakdowns.
How to build a Sankey chart in Tableau?
With Tableau viz extensions, building a Sankey chart has been simplified. In fact, you can build a Sankey chart in just 30 seconds. To demonstrate this, I will be using the Sample – Superstore dataset to show Sales flow between different product categories.
Once you’ve connected your dataset,
Under marks card, select Add Extension.
Choose Sankey on the available list of extensions and open it.
Next drag the three dimensions (Segment, Category, & Sub-Category) to the Level shelf.
Note, this gives us a sketch of Sankey chart - which lacks the link width (i.e., value of flow between nodes).
To add link width, drag the measure of interest (in this case Sales) to the Link shelf. This results to the view below.
(Note, the link widths adjust to emphasize the value of flow, the wider the link the greater the sales value)
You can further customize your Sankey chart under the Format Extension option - making changes such as level of appearance, behavior, labels and even changing the color palette.
For example, the above Sankey chart could be formatted and presented as follows.
Conclusion
In summary, Sankey charts provide an intuitive way to visualize flows and processes, with the link widths emphasizing the magnitude of each flow. They are widely used in science, engineering, and business to gain insights into complex systems and optimize processes.
If this post was helpful and you would like to receive more of these Tableau tips and tricks, kindly subscribe to our mailing list below.
If you like the work we do and would like to work with us, drop us an email on our contacts page and we’ll reach out!
Thank you for reading!