Open Pablo-Sar opened 2 months ago
I pasted the screenshot in R 4.3.3 since I change the version to plot the diagram.
In R 4.3.3 works just fine.
can you copy-paste the reproducible code here?
can you copy-paste the reproducible code here?
Sorry I put another example in my description.
Load package library(networkD3)
Load energy projection data URL <- "https://cdn.rawgit.com/christophergandrud/networkD3/master/JSONdata/energy.json" Energy <- jsonlite::fromJSON(URL)
Now we have 2 data frames: a 'links' data frame with 3 columns (from, to, value), and a 'nodes' data frame that gives the name of each node. head( Energy$links ) head( Energy$nodes )
Thus we can plot it sankeyNetwork(Links = Energy$links, Nodes = Energy$nodes, Source = "source", Target = "target", Value = "value", NodeID = "name", units = "TWh", fontSize = 12, nodeWidth = 30)
I followed the example in https://r-charts.com/flow/sankey-diagram-ggplot2/ to plot the sankey diagram but in the viewer just appeared in blank without any error in the console.![Captura de pantalla (1589)](https://github.com/christophergandrud/networkD3/assets/156846765/8d843844-a116-40c6-b32b-aa82e26448de)