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
R netWorkD3 Sankey - trouble adding percentage
I'm creating a Sankey chart in R with networkD3::sankeyNetwork(). I want to show percentage besides the node label, but can't get this to work using an approach on a similar post and to show clean names. Originally I had the code for the node name…

Rokit87
- 23
- 3
1
vote
1 answer
Alter right node y-axis position in parellel sets diagram {ggforce}
I am struggling to figure out how to alter the position of the right node in a parallel sets diagram. I would like all the ribbons on the left to flow to the right node in a centered-aligned position rather than bottom-aligned, as shown in the…

Natalie O'Shea
- 197
- 1
- 8
1
vote
0 answers
Sankey chart in plotly: need to arrange my nodes as columns. Is this possible without messing with x and y?
Could someone with knowledge of Sankey-charts please help?
I am creating a sankey-chart that has nodes of 4 different categories.
I need the 1st group of nodes to be displayed on the left one under another, then the 2nd group should be to the right,…

JustLearning
- 180
- 2
- 12
1
vote
1 answer
change font size in SankeyFlow
Since I saw the answer about Sankey diagrams in python, I'm trying to familiarise myself with "SankeyFlow". I used exactly the same code below, but wondering if it is possible to change the font size and location of the texts.
from sankeyflow import…

Masaaaa
- 11
- 1
1
vote
1 answer
Create Flow chart in R
I am trying to make either a multi node Sankey or Alluvial plot whichever is more appropriate.
The output would be similar to this which is from the ggalluvial packgage vignette here gg alluvial vignette
The difference would be that my time_period…

te time
- 485
- 3
- 9
1
vote
1 answer
Highchart sankey - Make node have a higher weight than total out going
I'm trying to use highcharts to render a sankey chart like this.
In here, the first node has a higher "value" compared to its outgoing link. Is there a way to achieve this? I've gone through the highchart's sankey APIs but can't find anything which…

Mia214
- 13
- 2
1
vote
2 answers
Drawing point to another point in R?
I have a information of migration data of different countries to Mexico. I want to represent it in a sanky. I am new to R and having a difficult time to produce it. Can someone please help me to achieve this? The destination is Mexico, so all the…
user19239587
1
vote
2 answers
Making a Sankey Diagram in R
I'm trying to create a Sankey Diagram. I am using R with either {plotly} or {networkD3} packages. Both ask for the same type of data: source, target, value. I'm not really sure what source, target, and value is supposed to be and how to aggregate my…

wisamb
- 470
- 3
- 11
1
vote
1 answer
Highcharts sankey node without links
I have a highcharts sankey diagram with two sides:
There are situations where some of my nodes have empty links (=with 0 weight). I would like the node to being displayed despite having no link from or to it.
Any chance I can achieve this?
I read…

Augustin Riedinger
- 20,909
- 29
- 133
- 206
1
vote
1 answer
Sankey plot not displaying
Not sure what I am missing... I can reproduce the example and some answers by @CJ Yetman, but not the following simple reprex:
library(tibble)
#> Warning: package 'tibble' was built under R version 4.0.5
library(networkD3)
#> Warning: package…

leo
- 415
- 1
- 5
- 14
1
vote
1 answer
How to make multi Levels of sankey diagram using R?
I have accounting data need to be visualized by Sankey Diagram in multi levels.
I made my dataset sample reproducible in case you need it.
structure(list(
network_name = c("YAGHO", "YAGHO", "YAGHO", "YAGHO","YAGHO", "YAGHO", "YAGHO", "YAGHO",…

Tarek Atassi
- 13
- 6
1
vote
1 answer
Highcharts sankey diagrams multiple series
I would like to have multiple series in my sankey diagram so that the legend adjusts along.
For now, I have to have to trick with an empty data series:
series: [{
name: 'New allocations',
keys: ['from', 'to', 'weight', 'color'],
data:…

Augustin Riedinger
- 20,909
- 29
- 133
- 206
1
vote
1 answer
Adding a color legend with JavaScript to a networkD3 sankeyNetwork() in R
I am currently working on an Shiny-App which displays Sankey-Plots. In order to create the Network I use the networkD3::sankeyNetwork() function which has no attribute to show a legend of the colorScale for the LinkGroup in general. Now I am…

weldbild
- 13
- 4
1
vote
1 answer
How to set order of the nodes in Sankey Diagram Plotly
So i am traying to make a cycle that gives different sankey diagram the thing is due to the plotly optimization the node are in different positions. I will like to set the standard order to be [Formal, Informal, Unemployed, Inactive]
import…

A6UD3L01196
- 29
- 1
- 3
1
vote
0 answers
How to create a sankey plot in R for a dataset of three years?
I have a dataset of 3 years (2019-2021), which looks something like as following:
Date Topic Users
01/01/2019 News user_a
02/01/2019 Sports user_b
03/01/2019 Entertainment user_c
...
…

AneesBaqir
- 423
- 1
- 12