Define options of the map.

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,
  ...
)

Arguments

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.

Examples

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")