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
2
votes
1 answer

Sankey Diagram Input and Losses

I need to create a Sankey Diagram (code here: https://gist.github.com/aaronberdanier/1423501 ) where my input labels are ingredients and output is a finished product. For example, my input is "Policy Analysis", "Policy Process", "Policy Evaluation"…
user3641630
  • 311
  • 1
  • 3
  • 11
2
votes
1 answer

R - Riverplot package uses - Sankey diagram

I try to draw a sankey chart using riverplot package by January. However my cases is quite complex and I haven't found way to fix my chart so I post this questions, hope this help either find some answer to my questions or way to improve the…
sinhnhn
  • 65
  • 1
  • 7
2
votes
0 answers

Google Sankey Diagram selection event

I have a Sankey diagram. jsFiddle It seems, when I add a handler for the select event, it's not working. In the documentation there is the Event section.
István
  • 5,057
  • 10
  • 38
  • 67
2
votes
1 answer

How to add a second value to the links of a Sankey diagram in d3.jS :

The Sankey diagram in D3.JS takes a dataset of nodes and links to plot (see an fiddle example at http://jsfiddle.net/mF27g/ by VividD). The dataset would look like : { "nodes": [{"node": 0, "name": "node0"}, {"node": 1, "name":…
mfroese
  • 309
  • 1
  • 5
  • 18
2
votes
0 answers

How to add mouseover tooltip in google charts sankey diagram

and have been using Google Charts to visualize my data. I have tried to search for the answer to this question but couldn't not find anyone having the same problem as mine, or maybe my problem is really basic. Appreciate if someone can give me a…
2
votes
1 answer

Incorrect output sankey diagram when using shiny

When I create a sankey diagram in a regular R session the output looks ok. The tooltip shows an arrow between the connections: require(rCharts) require(rjson) links <- matrix(unlist( rjson::fromJSON( file =…
Jonas Tundo
  • 6,137
  • 2
  • 35
  • 45
2
votes
1 answer

JavaScript - Interactive diagrams in Backbone.js application

Background: I'm currently developing the client side for a web application, using JavaScript, with jQuery and Backbone.js (these are required by the proponent). This is an application to visualize and edit data, in a graphical mode (through…
afsantos
  • 5,178
  • 4
  • 30
  • 54
1
vote
1 answer

Move labels to the outside of the Sankey Diagram and order from biggest to smallest in both sides

it's the first time I'm using R so sorry for stupid mistakes. I need to do a Sankey Chart to display flows between cities in a Metropolitan Area, but I am not satisfyied with the how the graph looks. I would like the labels to be outside the Sankey…
1
vote
1 answer

Sankey diagram in R (highcharter) customisation - how to change node order, labels, and colors

I want to get a Sankey diagram in R with highcharter, with 3 different columns showing how people go from low to high measurements through 3 different years. This is a mock table showing how I organised my table, as well as the code for the…
Lynne
  • 13
  • 3
1
vote
1 answer

Creating Sankey or Alluvial plot and stopping the flow where the "next_node" and "next_x" value is "NA" in R

I am trying to create a Sankey or Alluvial plot using the ggplot2 library in R to visualize the flow of nodes based on the provided CSV data. The data includes columns for 'x', 'node', 'next_x', and 'next_node'. I want to create a plot where the…
Rohan Nath
  • 11
  • 2
1
vote
0 answers

Rearrange the order of nodes in a sankey diagram using ggsankey

I did a sankey diagram in R using the ggsankey package and everything is fine, only detail is I want to rearrenge the order of the nodes in the second level (right now it is arranged SD, PR, DP, and CR from top to bottom and i want them to appear…
vaquera
  • 11
  • 1
1
vote
0 answers

difficulty to keep color of ribbon same from source till end node in sankey diagram with flipplot in R

i am trying to create sankey diagram using below data set my.data = data.frame(Married = c("Yes","Yes", "Yes", "No", "No"), Pet = c("Yes", "Yes", "No", "Yes", "No"), Happy = c("Yes", "Yes", "Yes", "Yes", "No"), freq = 5:1) I created the sankey plot…
Aisha Ali
  • 11
  • 1
1
vote
1 answer

Editing Node Labels - NetworkD3 Sankey Diagram

When hovering a node, the label and the value attached to it appears with no spacing. For example, in the screenshot here, you will see that at 6 months, there are 64 participants who are in Stage 3. But hovering over the node it looks like "Stage…
1
vote
0 answers

Change the color of an Highcharter Sankey-Diagram within R

I have data from a panel study. I present these in a Sankey diagram. Unfortunately, I can't manage to adjust the color so that the flow runs uniformly from one field to the next. I have posted the data to reproduce: # load…
alex
  • 89
  • 7
1
vote
1 answer

How to colour skankey node with all colours of first node that it is related to in ggplot?

I have a sankey graph that I created in ggplot, but I want the nodes on the right to relate to the left node... so if there are 4 colours from the left node entering the right node, the right node should have all 4 colours. Here is my dataset df2 =…
Kristen Cyr
  • 629
  • 5
  • 16