Takes an object produced by choropleth_sf()
, and creates the correspoding choropleth map.
choropleth_tmap(
sf_object,
value = "output",
id_name = "areaname",
mode = "plot",
n = 7,
legend_title = "Clustering",
palette = "viridis"
)
tmap
object of class sf
column name to shade the polygons
column name of ids to plot
choose between static ('plot' is default) and interactive map ('view')
number of clusters (default is 7)
title of legend
palette name or a vector of colors. See tmaptools::palette_explorer() for the named palettes. Use a "-" as prefix to reverse the palette. The default palette is "viridis".
Martin Haringa