Monday, 6 July 2026

Visualizing User Journeys with Sankey Diagrams in Apache Superset (Step-by-Step Guide)

  

Understanding how users move through your system is critical for decision-making. Whether it's tracking customer journeys, product flows, or data pipelines. Traditional charts often fall short in showing relationships between stages. This is where Sankey diagrams shine.

 

In this post, we’ll learn how to build a Sankey chart in Apache Superset using a simple website user journey dataset.

 

Demo Dataset (CSV)

We’ll use this dataset representing user flow.

 

websiteTraffic.csv

traffic_source,page_category,action,user_count
Google,Home,Signup,120
Google,Home,Browse,300
Google,Product,Add to Cart,180
Google,Product,Purchase,90
Facebook,Home,Signup,80
Facebook,Home,Browse,220
Facebook,Product,Add to Cart,140
Facebook,Product,Purchase,60
Direct,Home,Browse,200
Direct,Product,Add to Cart,160
Direct,Product,Purchase,110
Email,Landing Page,Signup,150
Email,Landing Page,Browse,100
Email,Product,Purchase,70
Referral,Home,Browse,130
Referral,Product,Add to Cart,90
Referral,Product,Purchase,40

Follow below step-by-step procedure to build Sankey diagram.

 

Step 1: Load Dataset.

Navigate to Data -> Upload CSV to database

 


Select the csv file, Database and Schema, give the table name as web-site-traffic.

 


Click on Upload button.

 

Reload the Dataset listing page, you can observe that the ‘web-site-traffic’ dataset is created.

 

Step 2: Create Sankey Chart.

 

Navigate to Charts listing page and click on Create Chart (+ Chart+ button.

 


Choose the dataset as ‘web-site-traffic’, select ‘Sankey Chart’ and click on ‘Create new chart’ button.

 


You will be taken to Sankey chart configuration page.

 

Configure

·      Source traffic_source

·      Target page_category

·      Metric SUM(user_count)

 

   

Click on ‘Create chart’ button, you can see that Sankey diagram created like below.

 

 

   

Why Sankey Over Other Charts?

Unlike bar or pie charts, Sankey diagrams:

 

·      Show relationships between stages

·      Highlight flow magnitude visually

·      Make complex journeys easy to understand

 

Previous                                                    Next                                                    Home

No comments:

Post a Comment