Questions tagged [sankey-diagram]

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.

752 questions
0
votes
1 answer

Sankey Plot not Showing in Jupyter Notebook

I'm pretty sure my code is fine, btu I can't generate a plot of a simple Sankey Chart. Maybe something is off with the code, not sure. Here's what I have now. Can anyone see a problem with this? import pandas as pd import holoviews as hv import…
ASH
  • 20,759
  • 19
  • 87
  • 200
0
votes
0 answers

Add logo to SankeyNetwork chart?

I am trying to add a logo to a sankey chart created using the code below but all attempts did not work: library(networkD3) p <- sankeyNetwork(Links = links, Nodes = nodes, Source = "IDsource", Target = "IDtarget", Value = "value",…
CharlesG
  • 3
  • 3
0
votes
0 answers

Is it possible to give a link in a sankey diagram a grading colour in R?

I've made a sankey diagram to illustrate the change of a conclusion after an index event. The conclusion is noted as "Normal", "Borderline", or "Abnormal". I have changed the nodes of the diagram to reflect the conclusion by giving them either the…
0
votes
0 answers

D3 Sankey diagram links do not cover the entire node height

I am using D3.js to produce Sankey diagrams, and I'm not satisfied with the resulting connection between nodes, particularly when the total input of a node is different from its total output. As an example: // set the dimensions and margins of the…
rikyeah
  • 1,896
  • 4
  • 11
  • 21
0
votes
0 answers

is there any idea about how to put percentage value in Sankey graph?

can anyone please tell me how to put percentage value or percentage sign in the Sankey graph using pandas code? enter image description here i am trying this graph but expecting each category with percentage
0
votes
0 answers

Highcharts Sankey diagram direction reversal issue

Wanted to revese the rendering of Highcharts Sankey Diagram from left-to-right to right-to-left. according to Highcharts forum, it was suggested to switch the keys value from: series: [{ keys: ['from', 'to', 'weight'], data: ... …
Vishnu Baliga
  • 413
  • 6
  • 13
0
votes
0 answers

Creating edges and nodes from dataframe for sankey diagram

I've been using Python for a short while to create simple graphs which work fine and I am reasonably confident in that area. But now I have moved on to Sankey diagrams and here I am on deep waters with regards to creating nodes and edges. I have a…
Kasper
  • 3
  • 2
0
votes
1 answer

Why is this color incorrect in Sankey R plot?

The code below generates a Sankey diagram. However, as you can see in Figure 1, the "No Change" box is orange ("#eb6841"), not yellow ("Yellow"). This does not appear to correspond to the code, where I specified yellow as the colour I wanted. Does…
HelpMe
  • 87
  • 1
  • 8
0
votes
0 answers

Plotly Sankey: How to use defined node positions with vertical orientation? (without cutting off parts of the chart?)

I am encountering frustrating layout or plot dimension issues when creating a vertical flow chart with Plotly's Sankey figure. Parts of the chart get cut-off like so: The core of the problem appears to be the use of defined node positions in…
Naibaf
  • 417
  • 5
  • 15
0
votes
2 answers

How to generate Sankey diagrams using Brightway2?

I know that we can get Sankey diagrams using activity-browser. Is there a way we can generate a sankey diagram for one of the ecoinvent activities using brightway2 functions and python? I looked into brightway2 functions but couldn't find one that I…
gary_brown
  • 25
  • 6
0
votes
0 answers

R Sankey Diagram for fund flow visualization with Period

Dataset: source <- c( 'C-new (Bank)','D-new (Bank)','E-new (Bank)', 'A-Orig (non-Bank)','B-Orig (Bank)','B-Orig (Bank)', 'B-Orig (Bank)','B-Orig (Bank)','B-Orig (Bank)' ) target <- c( 'B-Same-name (non-Bank)','B-Same-name…
Yin LI
  • 1
0
votes
1 answer

Highchart - Sankey click event for node

i tried to add click event to sankey diagram node. I found link click event is possible, but not node click event. is it possible to add click event to node?
Bewan
  • 115
  • 1
  • 1
  • 7
0
votes
0 answers

How to change the link color of a sankey in d3.js based off a boolean variable?

I'm trying to create a sankey diagram using D3 in observable based off a CSV. I would like to partition the sankey based off a boolean column of the CSV, similar to this picture: partitioned on male/female I'm currently trying to create…
0
votes
1 answer

How to move Sankey first node text to left

I am creating a sankey plot (migration form): library(tidyverse) library(networkD3) library(htmlwidgets) links <- data.frame(source = c("a","b","a","a","c","c","d","e","e"), target =…
Kevin Li
  • 79
  • 5
0
votes
1 answer

create Sankey plot that show annual land use change

How can I create a Sankey plot that indicates a change in land use class by years from a dataframe that shows proportion of area for each land use class. lu_dt <- structure(list(LU_class = c("Cropland", "Forest", "Grassland", "Other Land",…
Lily Nature
  • 613
  • 7
  • 18