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
3
votes
1 answer
Remove font's shadow in Sankey
Is it possible to remove the white shadow of the font in the following sankey diagram?
import plotly.graph_objects as go
fig = go.Figure(go.Sankey(
arrangement = "snap",
node = {
"label": ["A", "B", "C",…

Stücke
- 868
- 3
- 14
- 41
3
votes
0 answers
Using sankey-diagram in grafana with mysql-source
I am trying to create sankey-diagrams within grafana, using:
https://github.com/kumaravel29/grafana-sankey-panel
I have problems understanding how to create a sankey diagram with multiple "layers".
With the following statement, I can create a…

BAdev
- 27
- 3
3
votes
1 answer
Using Sankey plot to see data flow in R ggalluvial and cosmetics by ggplot
I have a data table of patient clusters before (consensus) and after treatments (single drug) and I want to show how patients flows into different clusters before and after treatment. In this case the actual cluster number doesn't mean much, the…

ML33M
- 341
- 2
- 19
3
votes
1 answer
sankey/alluvial diagram with percentage and partial fill in R
I would like modify an existing sankey plot using ggplot2 and ggalluvial to make it more appealing
my example is from…

captcoma
- 1,768
- 13
- 29
3
votes
1 answer
How can I add images in the nodes of a D3 Sankey diagram, using the rcv and networkD3 packages in R?
I am working with ranked-choice voting data in R, and would like to plot it using a Sankey diagram (here is an example). Sankey diagrams default to color-coded nodes for each candidate, but I would like to place an image of each candidate within the…

Count Orlok
- 997
- 4
- 13
3
votes
1 answer
Plotly: How to plot Sankey diagram with matching rows across different columns?
I am plotting a Sankey Diagram through plotly to compare different classifications of observations. However, I am having some issues with more than two classifications, where the order of observations in each classification changes between the…

gc5
- 9,468
- 24
- 90
- 151
3
votes
3 answers
sankey diagram in R - data preparation
I have the following data frame, where each patient is a row (I am showing only a sample of it):
df = structure(list(firstY = c("N/A", "1", "3a", "3a", "3b", "1",
"2", "1", "5", "3b"), secondY = c("N/A", "1", "2", "3a", "4",
"1", "N/A", "1", "5",…

Omry Atia
- 2,411
- 2
- 14
- 27
3
votes
1 answer
Colour the links between nodes in sankey diagram: networkD3
I am looking for help colouring the links between nodes in a sankey plot. I am using the networkD3 package in R to create the plot. Here is a very simple example of what I'd like to achieve:
library(networkD3)
nodes <- c("a", "b", "c")
source <-…

the_witch_dr
- 123
- 1
- 9
3
votes
2 answers
Highcharts sankey diagram, series color
How to make the series color identical to the data color?
In the example, the "imbalance" data is red, but the series is colored blue.
Highcharts.chart('container', {
title: {
text: 'Highcharts Sankey Diagram'
},
series: [{
…

al.koval
- 2,087
- 4
- 28
- 35
3
votes
1 answer
plot from sankeyNetwork in networkD3 does not show output neither generates any warning/error in R
I want to generate a Sankey plot to visualize movements to different areas using sankeyNetwork() from the package networkd3 in r. I tried to mimic some examples as perfectly as possible. But when I run the function sankeyNetwork, no output is…

Liri
- 350
- 3
- 19
3
votes
1 answer
Sankey Diagrams in R
I am working on making a sankey diagram in R but having trouble with the meaning behind the node names.
Below is an example that I found online:
library(networkD3)
nodes = data.frame("name" =
c("Node A", # Node 0
…

nak5120
- 4,089
- 4
- 35
- 94
3
votes
1 answer
Group alluvia in the R alluvial diagram
In the alluvial package, is it possible to combine those alluvia that have the same source and target nodes? For example the two dark alluvia in the image below, that both go through AB and 3.
Edit: Here is an example using the Titanic dataset,…

Cos
- 1,649
- 1
- 27
- 50
3
votes
1 answer
D3.js Sankey diagram: Add title (text) above each column of nodes
I want to add titles above each column of nodes in a D3.js Sankey diagram. For example, I take this example: http://bl.ocks.org/d3noob/5028304 and this is the result I want:
Sankey graph
I thought something like this but it doesn't convince me. I'm…

Edu
- 107
- 1
- 4
3
votes
0 answers
Print number of calls for source, target and stream sankeynetwork diagram R
Is there a way to print the number of calls for source, target and stream on a sankeynetwork diagram?
These numbers are printed in a box when hoovering. But can these (all) be printed on the diagram, so they can be seen when it's not possible to…

Peter P.
- 51
- 7
3
votes
1 answer
networkD3 Sankey Diagrams - controlling node locations
I wish to create an interactive Sankey diagram using HTML widgets/Javascript within R Markdown, so am looking at using the networkD3 package. The main interactivity I wish to utilise is clicking on the nodes to have the pathways emanating from it…

Nevil
- 161
- 1
- 11