Usually, as the hcmap() function explains, the representation of the map gets downloaded on each Shiny session, unless we change the download_map_data
parameter.
If we set it to FALSE
, then it tries to fetch it locally.
In order to download the maps, we have the download_map_data() function.
But while trying to merge it all together, I can not make it work as expected.
Example:
require(dplyr)
data("USArrests", package = "datasets")
USArrests <- mutate(USArrests, "woe-name" = rownames(USArrests))
usa_map <- download_map_data(url = "countries/us/us-all", showinfo = F)
hcmap(map = usa_map, data = USArrests,
joinBy = "woe-name", value = "UrbanPop",
name = "Urban Population", download_map_data = F)
It throws an error. How is the preferred manner to load the map locally?