I am trying to create a sankey diagram using the following data frame and code:
UKvisits <- data.frame(origin=as.character(c(
"France", "Germany", "USA",
"Irish Republic", "Netherlands",
"Spain", "Italy", "Poland",
"Belgium", "Australia",
"Other countries", rep("UK", 5))),
visit=as.character(c(
rep("UK", 11), "Scotland",
"Wales", "Northern Ireland",
"England", "London")),
weights=c(
c(12,10,9,8,6,6,5,4,4,3,33)/100*31.8,
c(2.2,0.9,0.4,12.8,15.5)))
Highcharter line:
hchart(UKvisits, "sankey", hcaes(from = origin, to = visit, weight = weights))
This example has been copied from here: https://github.com/jbkunst/highcharter/blob/master/dev/highcharts-v6.R
For some reason whenever I run this, the plot screen remains white and nothing is being plotted.
I am trying this on R Studio version 1.1.423 (R Version: 4.3)
Does anybody have any idea why this is happening?