hcmap {highcharter} | R Documentation |
Shorcut for create map Shorcut for create map from https://code.highcharts.com/mapdata/ collection.
hcmap(map = "custom/world", download_map_data = getOption("highcharter.download_map_data"), data = NULL, value = NULL, joinBy = NULL, ...)
map |
String indicating what map to chart. |
download_map_data |
A logical value whether to download
(add as a depedeny) the map. Default |
data |
Optional data to make a choropleth, in case of use the joinBy and value are needed. |
value |
A string value with the name of the column to chart. |
joinBy |
What property to join the |
... |
Aditional shared arguments for the data series (http://api.highcharts.com/highcharts#series). |
require(dplyr) hcmap(nullColor = "#DADADA") hcmap(nullColor = "#DADADA", download_map_data = TRUE) data("USArrests", package = "datasets") USArrests <- mutate(USArrests, "woe-name" = rownames(USArrests)) hcmap(map = "countries/us/us-all", data = USArrests, joinBy = "woe-name", value = "UrbanPop", name = "Urban Population") hcmap(map = "countries/us/us-all", data = USArrests, joinBy = "woe-name", value = "UrbanPop", name = "Urban Population", download_map_data = TRUE)