Sankey diagrams are a kind of flow diagram, in which the width of the arrows is shown proportionally to the flow quantity. They are typically used to visualize energy or material or cost transfers between processes.
Questions tagged [sankey-diagram]
752 questions
1
vote
2 answers
Plotly Sankey Diagram, problem with broken edge
I am using Sankey plot, from plotly, and for some reason I keep getting a weird shape on the edges of my graph, as seen on the image:
I expected that the green line should flow directly to from one edge to another, instead of doing this weird…

Sergio Polimante
- 149
- 10
1
vote
1 answer
Why is plotly's sankey diagram not plotting all my source nodes?
So I am trying to plot a sankey and it should be showing 13 source nodes going to 4 different target nodes, but I have no idea why it is not showing the 13 and is only showing 6? Here is my code and output. It is successfully plotting all 4 of the…

Amateur Pythoner
- 43
- 5
1
vote
0 answers
Multi-level Sankey
I am currently using v0.99 of Superset and am able to create a 2 level Sankey diagram.
I would like to plot a sequence of User actions as follows:
Sign up selected -> Base package selected -> Extras selected ->Accounts created ->Sign up completed ->…

sunny
- 11
- 1
1
vote
2 answers
Vertically re-order nodes in Highcharts sankey-diagram
I currently have the following Sankey Diagram:
I would like to ensure that the nodes that start with C0 are always on top. The nodes with c1 are always on the bottom, and the nodes with C2 are in between (when they are present). Is there any way to…

sandertjuh
- 550
- 2
- 13
1
vote
0 answers
Is it possible to add more white space between this title and plot?
I'm using python with plotly to create a Sankey Diagram. I've attached an image below that shows how the subtitle text overlaps with the Sankey Diagram- which I don't want. Is it possible to create more white space between the two? I've tried adding…

carsof
- 83
- 1
- 8
1
vote
2 answers
Removing NA from Sankey Diagram (flipPlots Sankeydiagram)
I am currently struggling with a sankey diagram visualising the flow of anti-cancer treatment for women with advanced breast cancer.
I have a columnn for each line of treatment (beh1, beh2 etc) naming the given treatment (6 options or…

Tobias Berg
- 49
- 4
1
vote
1 answer
Add column names as labels to my Sankey plot
I want to add column names as labels to my Sankey plot in R (at the bottom of each column in the Sankey diagram). How can I do that?
My code and data are below.
Appreciate!
library(tidyr)
library(dplyr)
library(networkD3)
links <-
…

Ester Silva
- 670
- 6
- 24
1
vote
1 answer
Extracting a matrix from dataframe
I have something like this:
import holoviews as hv
import pandas as pd
from holoviews import opts, dim
hv.extension('bokeh')
renderer = hv.renderer('bokeh')
csv_path = r'C:\Users\jose\Downloads\enron-v1.csv'
df_csv = pd.read_csv(csv_path…

darklight213
- 83
- 4
1
vote
0 answers
Visualise user journey for binary variables with Sankey
I have a dataset that tracks lead generation (5 categories) to sales(binary). In between this process, there is an app involved with some analytics available - no. of sessions, duration of session, pages visited and buttons pressed (binary variable)…

aksassin
- 11
- 2
1
vote
1 answer
Plotly node placement in R in a Sankey Diagram
Okay, I can't figure out what I'm doing wrong here.
I want the nodes to be positioned green, yellow, red in descending order. I'm trying to create a number of them, so I don't want to have to position the nodes by hand in Viewer.
I've updated R, and…

user15664585
- 11
- 3
1
vote
0 answers
How to do a grid with sankey diagram in python?
I have the following pandas dataframe
import pandas as pd
df_dict = {'index': [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10,
11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23,
24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37,
38, 39, 40, 41,…

quant
- 4,062
- 5
- 29
- 70
1
vote
1 answer
Brighter node color in D3 sankey diagram
I wanted the blue color in this sankey diagram to be brighter than the links color, but for some reason its working for all other colors and not the blue. Noob here, thanks in advance for your help.

brunurb
- 43
- 3
1
vote
1 answer
Additional colour transparency categories in ggalluvial
I'm trying to reproduce a mobility flow diagram and don't really know how to add additional colour transparency to the fill argument based on axis2 categories. Or whether that's even the way to go about solving this problem!
Any suggestions would be…

Krzys Adamczyk
- 42
- 1
- 7
1
vote
1 answer
Change node color in D3 sankey diagram
How could I change the node color in this sankey diagram
I wanted the two bottom central nodes to be the same color as the previous link color (in this case the bottom node red and the one above it orange)
Noob here, thanks in advance for your help.

brunurb
- 43
- 3
1
vote
0 answers
Format data in Pandas for multi-level Sankey in Plotly: source and target columns
I have data on the sequence of courses taken by students and I would like to represent the flows between classes using a Sankey diagram. My data is in a Pandas dataframe in a long format, where each step that someone took has a row and the order of…

NLR
- 1,714
- 2
- 11
- 21