Description Usage Arguments Examples
Define options of the map.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | config_geo(
p,
popup.on.hover = TRUE,
highlight.on.hover = TRUE,
hide.antarctica = TRUE,
hide.hawaii.and.alaska = FALSE,
border.width = 1,
border.opacity = 1,
border.color = "#FDFDFD",
highlight.fill.color = "#FC8D59",
highlight.border.opacity = 1,
highlight.border.color = "rgba(250, 15, 160, 0.2)",
highlight.fill.opacity = 0.85,
highlight.border.width = 2,
data.url = NULL,
...
)
|
p |
a datamaps object. |
popup.on.hover |
whether to show popover. |
highlight.on.hover |
whether to enable popover. |
hide.antarctica |
whether to hide Antarctica. |
hide.hawaii.and.alaska |
whether to hide hide Hawaii and Alaska. |
border.width |
country border width. |
border.opacity |
Opacity of country borders. |
border.color |
color of country borders. |
highlight.fill.color |
bubbles fill color on hover. |
highlight.border.opacity |
bubbles opacity on hover. |
highlight.border.color |
bubble's border opacity on hover. |
highlight.fill.opacity |
bubble's opacity on hover. |
highlight.border.width |
bubble's width on hover. |
data.url |
topo.json data url. |
... |
any other parameter. |
1 2 3 4 5 6 7 8 9 10 11 12 13 | data <- data.frame(name = c("USA", "FRA", "CHN", "RUS", "COG", "DZA"),
values = c("N. America", "EU", "Asia", "EU", "Africa", "Africa"),
letters = LETTERS[1:6])
data %>%
datamaps(default = "lightgray") %>%
add_choropleth(name, values) %>%
config_geo(hide.antarctica = FALSE,
border.width = 2,
border.opacity = 0.6,
border.color = "gray",
highlight.border.color = "green",
highlight.fill.color = "lightgreen")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.