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
1 answer
R Sankey Diagram using riverplot - Vertical Labels
I am using the riverplot package in R. I am able to make a Sankey diagram. I would like to be able to add a vertical label (preferably on the bottom). I found one example that appears to do this:…

bill999
- 2,147
- 8
- 51
- 103
2
votes
1 answer
ordering nodes in riverplot
I'm currently developing a riverplot diagram with the riverplot package. However, I struggle to get my data ordered on the plot. Let me explain with an example:
library(riverplot)
df.nodes <- cbind.data.frame(c("A", "B", "C", "D", "E", "F", "G",…

Simon H
- 75
- 9
2
votes
3 answers
plot line width (size) based on counts using ggplot or any other method in R
I have a dataset in long-format, each ID 'walks' 3 steps, each step (variable name is step) can land on different locations (variable name is milestone), I want to draw all of the paths. Because there are some paths more traveled, I want to make the…

Chuck C
- 153
- 2
- 12
2
votes
2 answers
Collapsible Sankey Diagram - D3
I want to know how to make a sankey diagram collapse/expand the nodes based on mouse click.
My diagram is this: https://bl.ocks.org/TheBiro/f73a2a0625bb803179f3905fe7624e22
For example, I want to click on the node "PAGOU" and all of the subsequent…

cirofdo
- 1,074
- 6
- 22
2
votes
1 answer
How can I add axis labels to a sankey diagram in d3?
I want to add axis on a sankey diagram. The code for the chart can be found in the following links: https://github.com/irbp005/d3SankeyAndLineInteraction
The visual representation of the char is as follows:
Ans I want to add labels like:
Basically…

Selrac
- 2,203
- 9
- 41
- 84
2
votes
0 answers
sankey diagram with rCharts into shiny application. Color issue
I am using rCharts to create a Sankey plot
library(networkD3)
library(rCharts)
source1 = c('Proizvodnja okroglega lesa', 'Uvoz okroglega lesa', 'Poraba okroglega lesa', 'Poraba okroglega lesa',
'Zage','Zage','Zage', 'Zagan les','Uvoz…

JerryTheForester
- 456
- 1
- 9
- 26
2
votes
1 answer
Google Charts Sankey - Node text style
Is there a way to change the color of the target node text with style role in Google's Sankey diagram? Currently I have data setup like this:
[Source, Target, Label, Style]
[A,B,"Test Label", "#ffffff"]
I am able to change the color of the node…

Zaba
- 27
- 6
2
votes
1 answer
A diagram for fluxes and stores of a hydrological model
What is the easiest way in Python to draw a Sankey diagram with variable node (stock) sizes as well as arrows (flows)?
I'm currently working on a hydrological model. The structure of the model can be seen below
On every timestep of the model there…

F. Jehn
- 367
- 2
- 15
2
votes
0 answers
Make collapsible sankey charts like Tableau in R
I'm using the rCharts package to make interactive Sankey charts in R. I'm able to get the chart like I want to, but the issue is, the paths are not collapsible.
For example, if I click on the first node, I want to see just the paths of that…

kaelthaas
- 41
- 3
2
votes
2 answers
Why does this d3 chart render with crosses, then get rid of them upon moving a node?
I've built a d3 sankey diagram adapted from this example to show the flow of prerequisites for courses in my program. However, instead of letting the library auto-position the nodes, I've manually set their x and y coordinates to minimize crosses…

Charles Clayton
- 17,005
- 11
- 87
- 120
2
votes
1 answer
Cytoscapejs: Sankey-like edge size
is there a way to create Sankey like edge width diagrams in cytoscape.js? To be clear, I do not want to create a Sankey diagram in cytoscape.js. What I do want is to create edges which have in total the size of the node they originate from.
One way…

Andy
- 9,483
- 12
- 38
- 39
2
votes
0 answers
Change root node color in d3 Sankey graph based on additional column in data
I am referring this example: http://plnkr.co/edit/4xPx05PxnWxoQBhIj2lo?p=preview
The node colors here are dependent upon an additional column in data. The data…

d33a
- 690
- 1
- 14
- 39
2
votes
1 answer
Riverplot package in R - Sankey diagram colors
I try to create a sankey diagram using the Riverplot package in R with fixed node and edge colors. The colors are given in separate colors in the .csv files
library(riverplot)
# import data
edges = read.csv("sankey_data_edges.csv")
nodes =…

StefanOverFlow
- 389
- 4
- 17
2
votes
0 answers
GVis Sankey Diagram integration with Shiny: Rendering Issue
I'm just getting started with Shiny, but I have been using googleVis within R for some time now, and I have successfully produced Sankey Diagrams prior. I'm setting up a Shiny app to allow for filtering on specific values in order to generate a more…

Vaughn Shirey
- 35
- 8
2
votes
1 answer
How to place node title to the left or right of the node in d3 Sankey graph?
Here is the example I'm referring to:
http://bl.ocks.org/d3noob/c9b90689c1438f57d649
The second level nodes have their title to their right. How can I place those to the left of the nodes? Please help.

d33a
- 690
- 1
- 14
- 39