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
1
vote
0 answers

Why aren't exit().remove() calls removing elements from my d3-sankey graphic?

I'm attempting to work up to a smoothly animated Sankey diagram in this codesandbox but right now I'm having trouble even just abruptly redrawing it. I have attempted to remove nodes, links & gradients via the typical .enter() and .exit() methods,…
Roy Pardee
  • 196
  • 2
  • 12
1
vote
0 answers

How to sort nodes in a Sankey Diagram (Plotly)

I want to achieve a visualization that shows the frequency of changes between one state to another, being these states represented as numbers. My data looks like this and is call df_sankey I was thinking on a Sankey Diagram following the example…
1
vote
1 answer

Can I rotate the node labels in a Sankey Plot (networkD3::sankeyNetwork)?

I have long(ish) node labels for my Sankey diagram that I would like to rotate so that they can be read top-to-bottom instead of left-to-right. Ideally, I would be able to place these rotated node labels directly over the nodes (rather than the…
1
vote
0 answers

Python Plotly Sankey Diagram: how to calculate 'value' based on 'source' and 'target so all lines are the same height as nodes

So I realise that this is quite a specific question, but it's been bugging me for ages and I can't seem to find a solution.. I am using Plotly with Python to produce Sankey diagrams. I have the following source, target, and value figures: …
tewerty
  • 367
  • 1
  • 3
  • 9
1
vote
1 answer

Python plotly sankey and determine the order of the nodes

I am drawing a a sankey diagram where values go from 1 start node to 5 notes (A, B, C, D and E). I would like the nodes to be plotted in alphabetical order and I thought this could be achieved by my code but this is not the case as you can see from…
Francesca
  • 63
  • 1
  • 7
1
vote
0 answers

Sankey Networks in R: with Javascript Network D3 or GGforce

Recently, I have been learning about Sankey Diagrams and have been trying to recreate them in R (https://rpubs.com/dmormandy/DV_Sankey). Here is my imaginary problem: I have a list of people with their first name, middle name and last name. They…
stats_noob
  • 5,401
  • 4
  • 27
  • 83
1
vote
1 answer

d3-sankey display by groups and drag doesn't work

In my project I draw a sankey graph with d3.js version 6.2.0 and d3-sankey version 0.12.3. The result is in the following screenshot. In the source file I have some groups { "nodes": [ { "group_nodes": "1st line", "name": "CL", …
Enrico
  • 3,592
  • 6
  • 45
  • 102
1
vote
1 answer

Sankey Diagram in Google Charts: How to Render Cycles

I'm currently trying to create a Sankey Diagram in Google Charts to examine the frequency of certain sequences: LOCATION A -> LOCATION B -> LOCATION C Where each location is a node, and the arrows contain the frequency that this path occurs.…
1
vote
1 answer

Plotly Sankey chart cutting off when loops exists

I am trying to plot Sankey diagrams using Plotly's Sankey functionality. I can get Sankey diagrams to plot properly unless they contain loops (i.e. one state flows back into itself). When a loop occurs the chart sometimes gets cut off in the…
Arthur Putnam
  • 1,026
  • 1
  • 9
  • 26
1
vote
0 answers

Is there an integration between floweaver and matplotlib to plot sankey diagrams onto an ax?

Is there a simple way to generate a Sankey plot using floweaver onto an ax or figure in matplotlib? My only idea so far is saving the floweaver plot as a PNG and then load it into an ax with ax.imshow('...') Are there common workarounds? The…
StonedTensor
  • 610
  • 5
  • 19
1
vote
2 answers

A similar Visulization which is done in Alluvial

I have come across this visualization and I'm trying to make a similar one. Here is the picture! It looks like a sankey (ofcourse there is no flow) so I tried doing a sankey with the similar results of it, but I ended up with nothing similar to…
1
vote
2 answers

sankeyNetwork not recognizing customized colourScale

I am creating a plot using sankeyNetwork in R and am having issues with the colourScale option. I created a custom color scale, and the plot that is produced is so close to being correct, but somewhere within the sankeyNetwork function, it's…
aritger
  • 11
  • 3
1
vote
0 answers

How can I add background colour to node text and total count in d3 sankey

How can I give red color to node text and green color to node total count? I tried a lot but did not get any success. Since I am new to d3 any help will be appreciated. I have tried one solution but it didn't work for me d3 sankey d3.sankey =…
Aniket Tiwari
  • 3,561
  • 4
  • 21
  • 61
1
vote
2 answers

Drilldown in Sankey Diagram

I'm looking for example code on how to implement a drilldown in a sankey diagram. I tried using the drilldown code from the column drilldown demo but it didn't work for sankey. The intended functionality is very similar to a dendogram, i.e- click a…
hrygt12
  • 15
  • 4
1
vote
0 answers

How to show same colors for parent and child in d3 sankey chart

I am trying to add the same color for parent and child. But couldn't figure out how to achieve it. So, far I tried to read the d3 Sankey documentation but haven't got any luck. Same thing I have achieved in Highcharts as attached in the below image.…
john s
  • 21
  • 3