Create a tuimap htmlwidget

tuimap(
  shape = NULL,
  code = NULL,
  label = NULL,
  data = NULL,
  options = NULL,
  width = NULL,
  height = NULL,
  elementId = NULL
)

Arguments

shape

An sf object.

code

Variable to use as unique identifier for the polygons.

label

Variable to use as label for the polygons.

data

A list of parameters for the data used in the chart.

options

A list of options for the chart.

width

A numeric input in pixels.

height

A numeric input in pixels.

elementId

Use an explicit element ID for the widget.

Value

A tuichart htmlwidget object.

Examples

library(rnaturalearth) # Retrieve polygons sa <- ne_countries(continent = "south america", returnclass = "sf") # add a random numeric variable sa$random <- sample(1:100, nrow(sa), TRUE) # draw map tuimap() %>% add_map_data(sa, aes(code = adm0_a3, label = name, value = random)) %>% tui_chart(title = "A map")
#> Le chargement a nécessité le package : stringi
#> Registered S3 method overwritten by 'geojsonlint': #> method from #> print.location dplyr