d3 sankey charts – manually position node along x axis

This is possible. See this JSFiddle. The computeNodeBreadths function in sankey.js can be modified to look for an explicit x-position that has been assigned to a node (node.xPos): function computeNodeBreadths() { var remainingNodes = nodes, nextNodes, x = 0; while (remainingNodes.length) { nextNodes = []; remainingNodes.forEach(function(node) { if (node.xPos) node.x = node.xPos; else node.x = … Read more

Sankey Diagrams in R?

This plot can be created through the networkD3 package. It allows you to create interactive sankey diagrams. Here you can find an example. I also added a screenshot so you have an idea what it looks like. # Load package library(networkD3) # Load energy projection data # Load energy projection data URL <- paste0( “https://cdn.rawgit.com/christophergandrud/networkD3/”, … Read more