library(sankeyD3) URL <- "https://raw.githubusercontent.com/christophergandrud/d3Network/sankey/JSONdata/energy.json" Energy <- jsonlite::fromJSON(URL) sankeyNetwork(Links = Energy$links, Nodes = Energy$nodes, Source = "source", Target = "target", Value = "value", NodeID = "name", fontSize = 12, nodeWidth = 30, width = 300, height = 300)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.