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

Plotly Sankey Diagram: how to set position of nodes, explicit X and Y values dont work

Hope someone has a suggestion! When I dont specify X and Y positions, the Sankey plot looks okay in terms of shape but not in terms of vertical ordering: the vertical/Y order of the elements is not what I want (for every X position the ordering in…
IvoB
  • 23
  • 7
0
votes
1 answer

Multistep Sankey Graph from Dataframe

I have a dataframe with the following structure INDEX ANO DISTRITO CONCELHO NCCO 0 2013.0 Aveiro Albergaria-a-Velha 98 1 2013.0 Aveiro Albergaria-a-velha 1 2 2013.0 Aveiro Anadia 41 The full dataset can be found here This data set…
Jorge Gomes
  • 304
  • 2
  • 15
0
votes
1 answer

prepare dataframe for sankey diagram

i have a dataframe Source Target valuecount clusterAMarch clusterAApril 10 clusterAMarch clusterBApril 1 clusterAMarch clusterCApril 15 clusterBMarch clusterAApril 7 clusterBMarch clusterBApril 11 clusterBMarch …
0
votes
1 answer

Sankey paths/links are loosing their width when the link has a big curve

I am using highcharts library to plot Sankey chart with our data, which has many number of nodes in each column. My issue is links width is reduces when it is between one of nodes on the top and one of the nodes are a bit lower than that. More…
Sai Babu B
  • 162
  • 2
  • 14
0
votes
1 answer

Sankey diagrams and modify how links are displayed

I am plotting sankey plots in Python using plotly, based on a sample script: import plotly.graph_objects as go fig = go.Figure(data=[go.Sankey( node = dict( pad = 15, thickness = 20, line = dict(color = "black", width = 0.5), …
Francesca
  • 63
  • 1
  • 7
0
votes
1 answer

Sankey diagram in R; replacing log-scale value with normal value in "hover-box"

I am creating some sankey diagrams in R which shows the relationships between antecedent and consequent events, with the frequency of the relationships being plotted on the sankey diagram. I have been trying to make the results a bit more…
metaltoaster
  • 380
  • 2
  • 15
0
votes
1 answer

sankey diagram can't be displayed in powerBI by python plotly lib

I have below scripts with python import pandas as pd import chart_studio.plotly as py import plotly.graph_objects as go labelListTemp1 = list(set(dataset.source.values)) labelListTemp2 = list(set(dataset.target.values)) labelList = labelListTemp1…
peace
  • 299
  • 2
  • 16
0
votes
0 answers

How to add Holoviews chart in a Bokeh figure?

Let us suppose that I created a Bokeh figure as such fig = figure(title="Any title", width=1600, height=800) and that I created a Holoviews Sankey chat from a Pandas DataFrame as such sankey = hv.Sankey(data) sankey.opts(width=1200,…
0
votes
1 answer

How can I change the font size of link labels to a Sankey Diagram built with networkd3 in R?

I was trying to add link labels to a sankey diagram as described by CJ Yetman in: In R, how to display value on the links/paths of Sankey Graph? library(htmlwidgets) library(networkD3) nodes <- data.frame(name = c("Node A", "Node B", "Node C",…
0
votes
1 answer

Is there a technique to create columns headers for a Plotly Sankey Diagram, similar to Tableau

Is there a technique to plot a time series flow diagram with the column nodes representing the start date for each month, the values representing the counts for each type, and labels representing the types (i.e. Consumer, Home Office, Corporate,…
datalifenyc
  • 2,028
  • 1
  • 20
  • 18
0
votes
1 answer

how to make sankyplots with no color for source and target node and how to do legend to show the different colors of linkgroup

I am working on network data and want to visualize it using sankeyNetwork() from the networkd3 package in r. In my data frame, I have a source node and a target node, value, and a grouping column group. How can I make the sankey plot without…
adR
  • 305
  • 4
  • 14
0
votes
1 answer

Plotly.py Sankey Diagrams - Controlling Node Destination

I have a similar issue to a question previously posted: Plotly: How to set node positions in a Sankey Diagram? ..In which I need to get all my values which end in the same character to align in the same vertical column in my Sankey Diagram (There…
0
votes
1 answer

How do I make a Sankey diagram with Plotly with one layer that goes only one level?

I want to make a Sankey diagram that splits into different levels (obviously), but one of these levels should stop after one, because the further steps do not apply. Much like this: import pandas as pd pd.DataFrame({ 'kind': ['not an animal',…
Nicolas Gervais
  • 33,817
  • 13
  • 115
  • 143
0
votes
1 answer

Alluvial plot with 2 different sources but a converging/shared variable [R]

I have experience with making alluvial plots using the ggalluvial package. However, I have run in to an issue where I am trying to create an alluvial plot with two different sources that converge onto 1 variable. here is example…
0
votes
1 answer

Sankey Diagram: is there a way to color the flows according to an extra column in ggsankey?

I am making a Sankey diagram with ggalluvial. Here is my dataset library(ggsankey) library(tidyverse) df <- mtcars %>% make_long(cyl, vs, am, gear, carb) %>% mutate(color = c(rep("red", 80), rep("blue", 80))) You can obtain a Sankey diagram…
FrsLry
  • 348
  • 4
  • 19