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
0
votes
0 answers
How to not show NA blocks in sankey diagramm R?
I want to change this plot so that these grey (NA) blocks dissapear.
This is my code right now:
df_nr <- df_skey %>%
filter(!is.na(node)) %>%
group_by(x, node)%>%
summarise(count = n())
df2 <-
df_skey %>%
left_join(df_nr)
skeyp3 <-…

marie
- 1
0
votes
0 answers
Sankey Diagram Alignment Issue between a Node
I am working on Sankey Diagram using Plotly. The link line is not correctly aligned between a node. I guess the plot automatically put the highest source value to the top. Could you please advise how to fix this issue?
enter image description…

stevekkong
- 1
- 2
0
votes
0 answers
How do I add automatically matching colors to the nodes and links of this sankey diagram?
This is the code for my sankey plot I got:
fig = go.Figure(data = [go.Sankey(
node = dict(
pad = 15,
thickness = 20,
line = dict (color = 'black', width = 0.5),
label = unique_source_target_ses,
),
…

Sophie Martusewicz
- 47
- 5
0
votes
0 answers
Group Sankey Flows by Color? (with plotly)
i am trying to order the flows of my sankey diagram by color. The color is red for not implemented, yellow for recommended and green for implemented. These colors go through the diagram. Now i would like to have all green (implemented) flows go into…

seppulah
- 1
- 1
0
votes
0 answers
Sankey diagram: problem with too many sources and targets
I am here seeking your help. I have a problem with plotting sankey diagram with networkD3 package.
here is the data: https://docs.google.com/spreadsheets/d/1nc2RVGulnjXjN4YLVdYka_sdcmww-W6kZcgRJaJOw0s/edit?usp=sharing
In this dataset, I have 226…

Young
- 1
- 1
0
votes
1 answer
How to append each single value from a dictionary list into its own column?
This is the dictionary I have and I wanted to put every single value from the list into its own column.
my_dict = {1: ['Home', 'Stories'], 2: ['Sounds', 'Stories', 'Home', 'Home', 'Stories'], 3: ['Journeys', 'Journeys', 'Journeys '], 4: [ 'Home',…

Sophie Martusewicz
- 47
- 5
0
votes
1 answer
How to add text above and at the end of the link in D3.js Sankey diagram?
I am currently working on adding text above the links in my visualization and would like to position it at the end of the link, just before the target node.
And this is my code of adding text to the link
// Add the link text
var linkText =…

Kaow
- 483
- 2
- 9
- 22
0
votes
1 answer
Sankey diagram that looks like the one used by Google Analytics for users flow
GA4 users flow screenshotIs there a way to use your diagram to make something similar?
s s

hsnicolaysen
- 1
- 1
0
votes
0 answers
For Sankey Diagram - Unable to resolve the error Property 'series' does not exist on type '{ load(): void; }'
I was trying to implement the toggle functionality on my Sankey diagram for when the nodes are visible on click and invisible on another click. I had gone through this stackover flow link…
0
votes
1 answer
Python: Sankey plot chart with complex data
I have the following dataset:
data = {
'1': ['A', 'B', 'C', 'NAN', 'A', 'C', 'NAN', 'C', 'B', 'A'],
'2': ['B', 'NAN', 'A', 'B', 'C', 'A', 'B', 'NAN', 'A', 'C'],
'3': ['NAN', 'A', 'B', 'C', 'NAN', 'B', 'A', 'B', 'C', 'A'],
'4': ['C',…

Economist_Ayahuasca
- 1,648
- 24
- 33
0
votes
0 answers
Bibliometrix : Three Fields Plot (Sankey Diagram) Exports
Could you please advise me using Bibliometrix, how can I export the connected elements to each item in Three Fields Plot (Sankey Diagram) to a CSV file (I need an R code)?
Example: for the first item in middle (bibliographic coupling) I want to…

Shadow
- 1
- 1
0
votes
2 answers
How to add two separated (not connected) flows in sankey diagram with python/matplotlib?
I would like to create sankey diagram showing two seprated flows? Flow named L and P. Like one image below (It's only example image for tests).
How to do it with matplotlib sankey? My test code below
sankey = Sankey()
…

s.paszko
- 633
- 1
- 7
- 21
0
votes
0 answers
python/plotly: sankey graph label connection string
I would like to label the connecting string in a sankey label.
I have generated a sample figure with the code below, and I'd like to add automatically the labels I added by hand.
I tried to set "label" as in documentation, but it seems it made no…

Marco Di Gennaro
- 395
- 1
- 3
- 15
0
votes
2 answers
Plotly Sankey diagram animated frame same for different steps
I have an issue when trying to use the animation of Sankeys through different frames. I get for both steps the same Sankey, despite having different values in the data frame.
[![Frame 2020][1]][1]
[![Frame 2021][2]][2]
The code to reproduce the…

Jonas Schnidrig
- 149
- 6
0
votes
1 answer
Google Visualization.Sankey -- GoogleScript Dropping Node Label
So I am able to make a Sankey plot from my Google Sheet data using Google Chart. The issue is that the plot seems to drop off the label for one of the nodes.
My data looks as follow:
Source Type Count
External A 12
External B …

Ellie
- 5
- 1
- 8