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
0
votes
1 answer
stacked chart combine with alluvial plot - python
Surprisingly little info out there regarding python and the pyalluvial package. I'm hoping to combine stacked bars and a corresponding alluvial in the same figure.
Using below, I have three unique groups, which is outlined in Group. I want to…

Chopin
- 96
- 1
- 10
- 35
0
votes
1 answer
SankeyNetwork... How to deal with added Data
Here is an example of a (totally random) graph of a categorization of…

Gmichael
- 526
- 1
- 5
- 16
0
votes
1 answer
D3 Sankey node color arrangement
I want to change d3 sankey node color. This is data sampledata-sample and I tried below coding but it didnt work;
color =…

juniord3
- 1
0
votes
0 answers
NetworkD3 Sankey Diagram in R: How to display different sub-categories of the dataset in a sankey diagram in LinkGroup?
I am working on making a sankey diagram in R, but having trouble with the LinkGroup code. I attach parts of my code which should explain the problem and the head of the data. I have a current plot without the legend of products, and I also attach…

Manan Bhan
- 1
- 1
0
votes
1 answer
Cannot perform reduce with flexible type error in Sankey HoloViews
I have this code but i keep getting a "cannot reduce with flexible type error"
import holoviews as hv
import pandas as pd
from holoviews import opts, dim
hv.extension('bokeh')
renderer = hv.renderer('bokeh')
file input path
csv_path =…

darklight213
- 83
- 4
0
votes
1 answer
sankey plot R not displaying markdown
I'm working on an R markdown document but am stuck with a "sankey chart" element. The Sankey element works fine in its code, but when I knit markdown the element doesn't show up in the markdown (or is just blank[?]).
Migration…

Agner Schibler
- 11
- 4
0
votes
2 answers
Sankey Diagram labels in R
Background
I am creating a Sankey Diagram in R and I am struggling with labeling the nodes.
As example, I will reuse a dataset with 10 imaginary patients that are screened for COVID-19. At baseline, all patients are negative for COVID-19. After…

user213544
- 2,046
- 3
- 22
- 52
0
votes
2 answers
How can I add a dollar sign to link and node labels?
I want to add a dollar sign to the link and node labels in a networkD3 Sankey plot. A similar question has be asked and answered here:
Link value label thousands separator
In the above link, CJ rewrites the link titles with htmlwidgets::onRender to…

MilkManSteve
- 15
- 4
0
votes
1 answer
Sankey Diagram with Network package in R
I am trying to create a simple Sankey diagram following the instructions of R Graph Gallery: https://www.r-graph-gallery.com/322-custom-colours-in-sankey-diagram.html. I have a dataset with two obvs per ID. For each period I know if someone is poor…

anabelbs
- 33
- 4
0
votes
1 answer
How to load data from a CSV-file to a Highcharts sankey diagram
I want to load data from an external CSV-file to a Highcharts sankey diagram. After trying several options, I am not sure if this is even possible, as the result is always an empty chart? The CSV-file will be on the same server in the final…

Björn
- 3
- 2
0
votes
1 answer
Labels in sankey diagram
I created a Sankey diagram with Plotly but I don't understand the behaviour.
import plotly.graph_objects as go
fig = go.Figure(go.Sankey(
arrangement = "snap",
node = {
"label": ['F1', 'F2'],
'pad':10
},
link…

Stücke
- 868
- 3
- 14
- 41
0
votes
1 answer
Reorder each axis element independently, ggplot2 [R]
I'm trying to create a plot similar to a Sankey plot but not with frequencies but with each case separately: I want to reorder each element from x-axis individually and connect each dot from the same case.
That's what I'm doing and getting...
> data…

jgarces
- 519
- 5
- 17
0
votes
1 answer
Highcharts Sankey Colors not working in django
Does anyone know why the sankey chart responds differently in a django compared to just an HTML file that is not in a server. The chart options and the data provided to them is the same and the chart definition is also the same but the rendering of…

Dumi
- 1
- 1
0
votes
1 answer
Reformatting dataset for Sankey in Pandas
I have my data in melted Pandas dataframe (code for data…

NLR
- 1,714
- 2
- 11
- 21
0
votes
0 answers
Why th first link in Sankey diagram it is not shown in R?
My Sankey diagram shows all the elements and the colors that I want but it doesn't shows the link between the first node and the second one.
I tried to modify the source and the target in order to match but it doesn't work.
Did you had the same…