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
2
votes
0 answers
Vertical positioning of nodes in Sankey diagram to avoid collision with links
I'm trying to make a Sankey-plot using Plotly, which follows the filtering of certain documents into either being in scope or out of scope, i.e. 1 source, 2 targets, however some documents are filtered during step 1, some during step 2 etc. This…

DasBoot
- 411
- 2
- 12
2
votes
1 answer
Plotly Sankey diagram group label and color
I'm creating a sankey diagram using plotly and there is the built in method to use 'group' to combine nodes. However, when I use this the color of this node will be black and no label is showing. This is expected as the colors of the grouped nodes…

Chrisvdberge
- 1,824
- 6
- 24
- 46
2
votes
1 answer
How to change position of nodes vertically in Sankey Diagram
How can I change position of the nodes in a Sankey Diagram vertically (y axis) to get them in the middle / central to the previous node and not at the bottom?

Daniela Rodrigues
- 545
- 3
- 17
2
votes
1 answer
How to create a sankey diagram in R showing changes over time for the same node?
I am trying to create a Sankey diagram of my data.
For each therapy, individuals are followed over time. I would like to have one node "Therapy" (categorical variable with different therapy names) repeated over time and x axis accounting for the…

Daniela Rodrigues
- 545
- 3
- 17
2
votes
1 answer
Structuring transactional data for Sankey Diagram
There are a lot of packages for Sankey diagrams. However, these packages assume the data is already structured. I'm looking at a transaction dataset where I would like to pull out the first sequence of products in a time series. Assume the time…

kakashi hatake
- 31
- 3
2
votes
1 answer
Sankey diagram in R: How to change the height (Y) of individual sections related to each node?
Problem
How can I change the height of each section/node of a Sankey diagram? I want to create something like Image 1 below where 'gender' section is small, then 'cause' section large and then 'age' section small again:
My output is more like Image…

Daniela Rodrigues
- 545
- 3
- 17
2
votes
1 answer
How to resolve undefined columns error for a Sankey in R?
I'm building a sankey diagram using networkD3 in R but I'm getting an error message:
Error in `[.data.frame`(Links, , Source) : undefined columns selected
The code that I have is the following:
library(networkD3)
library(magrittr)
# Data…

Selrac
- 2,203
- 9
- 41
- 84
2
votes
1 answer
R sankeynetwork force nodes to flow left to right
I am using the networkd3 package in r to create a
sankeynetwork diagram based on this example: https://christophergandrud.github.io/networkD3/
Here is my code:
# Load Packages
library(dplyr)
library(networkD3)
# Read data
a0 <-
…

P5C768
- 152
- 10
2
votes
1 answer
How to convert table data to nodes and links for d3js Sankey
We have a project where we are working several thousand items through a multi-step process. I want to create a multi-group Sankey diagram to help visualize where we are in the process. This is to run in a browser and is client-side javascript. I…

Rothrock
- 1,413
- 2
- 16
- 39
2
votes
1 answer
Python - Merging bundles in floweaver
I have a list of clicks on a website for a set of users. I'm trying to create a flow of clicks through the website. With the code below I get the following result. I'd like to have the end of the first bundle be joined with the end of the second…

Alex C.
- 53
- 5
2
votes
0 answers
ggalluvial: How do I plot an alluvial diagram when I have a dataframe with links and nodes?
I have this dataframe with timepoints (a, b and c), labels (l1, l2, l3) and frequencies that are distributed over the timepoints and labels.
I want to create a sankey diagram with the ggalluvial package in R.
Here's some…

Robert
- 924
- 1
- 9
- 20
2
votes
1 answer
ggalluvial: Order flow of lines based on a variable within stratum
I am using generic Diabetes data,
Processing data(continuous to discrete)
library("ggalluvial")
dat$Glucose_cat<- cut(dat$Glucose,breaks=c(1,100,125,max(dat$Glucose)), labels = c("Low","Normal","High"))
dat$BMI_cat <- cut(dat$BMI, breaks=…

Trupti
- 33
- 6
2
votes
1 answer
Sankey Diagram Jupyter Notebook
I am doing some twitter analysis and would like to use the pySankey package to visualise my results. But when I try to use this package, I get the following error that originates from the package itself. Does anyone know how to fix this? I am using…

inimaduas
- 21
- 2
2
votes
1 answer
How to properly update the nodes on a Highcharts Sankey?
I'm trying to build a toggle switch to change between two different data sets on a Highcharts Sankey chart. The data is more or less updating properly, however the nodes don't get destroyed on each chart.update() so the new set of nodes are redrawn…

Moss
- 71
- 8
2
votes
0 answers
R Interactive Sankey Diagram + Hierarchize Nodes
I am trying to visualize sequences of events by using Sankey diagrams.
I have a set of event (Event1 to Event16) over sequences of different length.
The steps of the sequences are noted by T0, T0 - 1, T0 - 2 ...
The width of the flow is…

rom9569
- 21
- 3