Skip to content

Instantly share code, notes, and snippets.

@cpsievert
Created May 30, 2017 19:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cpsievert/08a21b22904b96a6a2b5e7cf24d4fdd0 to your computer and use it in GitHub Desktop.
Save cpsievert/08a21b22904b96a6a2b5e7cf24d4fdd0 to your computer and use it in GitHub Desktop.
library(plotly)
plot_ly(
type = 'sankey',
node = list(
label = c("a","b", "c", "d", "e", "f", "g", "h"),
color = c("black","black","black","black","black","black",
"black","black"),
pad = 15,
thickness = 15,
line = list(
color = "black",
width = 0.5
)
),
link = list(
source = c(0,1,1,3,3,5,5),
target = c(1,2,3,4,5,6,7),
value = c(1,0.64,0.36,.33,.67,.16,.84))
)
@cpsievert
Copy link
Author

sankey

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment