Mastering Sankey Diagrams: An Engaging Example Walkthrough

Visualizing data flow and transformation is a crucial aspect of data analysis. One powerful tool for this is the Sankey diagram, named after the Irish engineer Matthew Sankey who first used such diagrams in the 1890s. Today, Sankey charts are widely used to illustrate the movement and status of entities within a system, making them perfect for displaying process flows, energy transitions, or even website user journeys.

a diagram showing the different types of air pollution in cities and towns around the world
a diagram showing the different types of air pollution in cities and towns around the world

In this article, we'll explore the Sankey chart, its applications, and provide a comprehensive example to help you understand and create your own.

Comment choisir une ville facilement avec un schéma de Sankey
Comment choisir une ville facilement avec un schéma de Sankey

Understanding Sankey Charts

At its core, a Sankey diagram consists of bands connected by arrows. The width of the bands represents the quantity of the flow, while the arrow's direction indicates flow from one state to another.

Sankey scheme for selecting cities
Sankey scheme for selecting cities

Sankey charts are distinct from other flowcharts due to their use of color. Each band is typically assigned a unique color, making it easy to trace multiple flows simultaneously. Moreover, these colors can be used to represent different categories, making Sankey diagrams an excellent choice for complex data visualization.

Sankey Chart Elements

the number of employees in five days has been changed to more than one hundred years
the number of employees in five days has been changed to more than one hundred years

A Sankey chart comprises four primary elements:

  • Nodes: These represent the start or end points of a process.
  • Edges: These are the arrows connecting nodes, symbolizing the transition of entities from one state to another.
  • Visual width: The width of the arrow represents the quantity of entities moving between states.
  • Color: Each flow path is color-coded for easy identification and tracking.

Understanding these basic elements is key to creating informative and engaging Sankey diagrams.

a black and white diagram with the words where is petroleum in our daily lives?
a black and white diagram with the words where is petroleum in our daily lives?

Sankey Chart Use Cases

Sankey charts are versatile and can be employed across various industries. Here are a few use cases:

  • Supply chain analysis: To illustrate the flow of products or materials through different stages of production and distribution.
  • Energy efficiency: To show the consumption and losses of energy at different stages within a power system.
  • Website user journey: To map out how users interact with a website, from arrival to conversion or exit.
Creating a Multi-Stage Sankey Chart via Template Cascading
Creating a Multi-Stage Sankey Chart via Template Cascading

Each use case presents unique challenges and requires tailoring the Sankey chart to effectively communicate the data.

Creating a Sankey Chart Example

Sankey Diagram Infographics PowerPoint Template
Sankey Diagram Infographics PowerPoint Template
the wiring diagram for an electric vehicle that is connected to two different wires, including one wire
the wiring diagram for an electric vehicle that is connected to two different wires, including one wire
Sankey Diagram - DevExpress
Sankey Diagram - DevExpress
an image of a diagram with different colors and shapes in the same area on each side
an image of a diagram with different colors and shapes in the same area on each side
an info sheet with different types of bank
an info sheet with different types of bank
an image of a map that shows the locations of major cities in each country, and where they are located
an image of a map that shows the locations of major cities in each country, and where they are located
A Sankey diagram says more than 1000 pie charts
A Sankey diagram says more than 1000 pie charts

Let's create a simple Sankey chart example to illustrate the flow of website visitors. We'll use the following data:

Stage Visitors Entering (V) Visitors Exiting (E)
Homepage 100 30
Product Category 70 20
Product Listing 50 10
Product Detail 40 20
Cart 20 5
Checkout 15 0

Using this data, we can create a Sankey chart to visualize the flow of visitors through the website, highlighting potential drop-off points and the final conversion stage.

Steps to Create the Sankey Chart

Here are the steps to create this Sankey chart using a visualization library like D3.js or a tool like Tableau or Power BI:

  1. Define the nodes based on the stages listed.
  2. Create edges between nodes based on the visitor flow.
  3. Set the visual width of the edges proportional to the number of visitors (V or E) at each stage.
  4. Assign unique colors to each stage for easy tracking.

Implementing these steps will result in an informative Sankey chart that communicates the data effectively.

Interpreting the Sankey Chart

By analyzing the Sankey chart, we can draw several insights. Most notably, we see high visitor drop-offs at the Product Category and Product Listing stages. This could indicate navigation issues or a disconnect between user expectations and what's offered. Additionally, the final conversion rate (Checkout stage) is 15/20 = 75%, suggesting room for improvement.

Based on such interpretations, we could then A/B test different layout variations or content changes at the identified drop-off points to improve the visitor journey.

In the world of data visualization, Sankey charts remain a useful tool for illustrating complex processes. By understanding their principles and applications, you can create informative and engaging charts that drive data-driven decisions. Whether you're analyzing website data, optimizing energy usage, or tracking supply chain efficiency, Sankey diagrams offer a versatile and intuitive approach to data representation.