I've been experimenting with the highcharter package in R. One of my favourite features is the map series. I followed the guide elaborated by Joshua Kunst on how to make different types of maps. I preivously was able to load maps using the following code:
Code: Select all
mapdata <- get_data_from_map(download_map_data("custom/world-highres.js"))
Code: Select all
hcmap(
"custom/usa-and-canada",
data = data_fake,
value = "value",
joinBy = c("hc-a2", "code"),
name = "Fake data",
dataLabels = list(enabled = TRUE, format = "{point.name}"),
borderColor = "#FAFAFA",
borderWidth = 0.1,
tooltip = list(
valueDecimals = 2,
valuePrefix = "$",
valueSuffix = "USD"
)
)
When running that code I would simply get a tiled map. Now in both instances of code I get the following error:
Code: Select all
trying URL 'https://code.highcharts.com/mapdata/custom/usa-and-canada.js'
Content type 'text/javascript' length 134466 bytes (131 KB)
downloaded 131 KB
Error: parse error: trailing garbage
[2595,3667],[2589,3668]]]}}]};
(right here) ------^
>