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
1 answer
Using ggalluvial with nodes holding different values
My data is a set of activities completed by persons. The sequence of activities a person takes varies. The data below show the activities for each step (Step1, Step2, etc). I'd like an alluvial plot that labels the activities at each step (each a…

Ben
- 1,113
- 10
- 26
1
vote
1 answer
How to toggle visible the Highcharts Sankey link with javascript
How can I toggle visible the Sankey link (together with the node and label)?
I want users to expand nodes step by step by clicking on the node. The diagram would have ca 5 levels and ca 10 columns when fully expanded. Default view on the first load…

Vikero
- 13
- 5
1
vote
1 answer
highchart Sankey chart nodes flow with image for insights
highchart Sankey chart nodes flow with image for insights
enter image description here

Souresh Coumar
- 11
- 1
1
vote
0 answers
sankey.layout() is not a function
I am trying to follow the tutorial for d3 sankey diagram using Vue.js. However, I currently face an error saying that Uncaught TypeError: this.sankey.nodes(...).links(...).layout is not a function. Also, I cannot get dy, dx, x, y in d.dy, d.dx, d.x,…

Phuc Nguyen
- 11
- 1
1
vote
1 answer
How do you convert an object to a data frame class object?
df2 df1
I'm trying to create a Sankey Plot in R, but I keep getting an error that one of the parameters needs to be a Data Frame Class Object. See below:
library(d3Network)
d3Sankey(Links = df2[ ,('value')], Nodes = df3[ , c('name')], Source…

Julia Grace Dunn
- 11
- 2
1
vote
1 answer
How to force networkD3::sankeyNetwork() to repeat nodes rather than circling back to same node
Hi I am creating a sankey diagram to show migration. One aspect I am facing issues with is how to deal with scenarios when status doesn't change i.e. migration doesn't happen.
In such scenarios, the sankey is circling back to same source, creating a…

LBZR
- 161
- 12
1
vote
2 answers
How to locate nodes in the middle in plotly sankey diagram
With plotly sankey diagram I want to locate a node in the middle using code, but since this node does not have a flow for another node, plotly places it at the right end. I have the next code:
import plotly.graph_objects as go
fig1 = go.Figure(
…

gabriel11
- 80
- 6
1
vote
1 answer
plotly sankey - is it able to put the node labels to the right for last layer(column)
I have a sankey chart created by python plotly with 8 layers(columns).
dataset = pd.read_csv('cleanSankey.csv')
labelListTemp1 = list(set(dataset.source.values))
labelListTemp2 = list(set(dataset.target.values))
labelList = labelListTemp1 +…

peace
- 299
- 2
- 16
1
vote
2 answers
Setting group order on pySankey sankey chart
I'm trying to use a sankey chart to show some user segmentation change using PySankey but the class order is the opposite to what I want. Is there a way for me to specify the order in which each class is posted?
Here is the code I'm using (a dummy…

Santiago Veintimilla
- 41
- 1
- 5
1
vote
1 answer
R Riverplot remove node labels on one side of Sankey plot
I'm using Riverplot to create Sankey plots and placing them in one plot to create a continuous look with three plots. My problem is that I only want node labels on the outmost left and right nodes, not inside.
I've managed to remove the labels from…

Kylee
- 41
- 5
1
vote
2 answers
Removing circular data in a dictionary of dictionaries for use in Sankey diagram
I've hit a challenge with Sankey diagrams for my personal accounting app. The issue is that the Sankey, generated using Google Charts, won't render if the cash moves in a circle, eg from Ledger A to Ledger B to C and back to A.
The script needs…

rcx935
- 217
- 5
- 15
1
vote
1 answer
HighCharts Sankey + NextJS: TypeError: Cannot read property 'Core/Series/Point.js' of undefined
I am trying to render a HighCharts Sankey chart using HighCharts React and NextJS. I've followed HighChart's documentation on how to add the Sankey module, but the page fails with this error:
TypeError: Cannot read property 'Core/Series/Point.js' of…

Martin Devillers
- 17,293
- 5
- 46
- 88
1
vote
2 answers
How do I make a simple, multi-level Sankey diagram with Plotly?
I have a DataFrame like this that I'm trying to describe with a Sankey diagram:
import pandas as pd
pd.DataFrame({
'animal': ['dog', 'cat', 'cat', 'dog', 'cat'],
'sex': ['male', 'female', 'female', 'male', 'male'],
'status': ['wild',…

Nicolas Gervais
- 33,817
- 13
- 115
- 143
1
vote
1 answer
Highcharts sankey diagram node rearrangement
Highcharts.chart('container', {
chart: {
width: width,
height: height
},
series: [{
keys: ['from', 'to', 'weight'],
data: [
['a', 'd', 1],
['b', 'c', 1],
['c', 'd', 1]
],
type:…

applewil
- 336
- 1
- 5
- 15
1
vote
1 answer
how to give different color for the lines in the Sankey plot to show different groups?
I have a question on this Sankey plot in R. So basically I want to give different color for the line that connect the source and target nodes based on the variable group. Below are the codes I found from one of the R platform. Essentially the code…

adR
- 305
- 4
- 14