Skip to contents

This vignette will illustrate "maplibre":

tmap_mode("maplibre")
#>  tmap modes "plot" -> "view" -> "mapbox" -> "maplibre"
#>  rotate with `tmap::rtm()`switch to "plot" with `tmap::ttm()`

Polygons

For this example we’ll create a choropleth of well being per country. We assign the map to map without showing it.

tm_shape(World) + 
  tm_polygons("well_being")

With a continuous diverging color scale:

tm_shape(World) + 
  tm_polygons("well_being",
    fill.scale = tm_scale_continuous(values = "pu_gn"))

Lines

tm_shape(World_rivers) +
    tm_lines(lwd = "strokelwd", lwd.scale = tm_scale_continuous(values.scale = 5))

Bubbles

tm_shape(metro) +
    tm_bubbles(size = "pop2030", fill = "red")