powered by
Takes an object produced by choropleth_sf(), and creates the correspoding choropleth map.
choropleth_sf()
choropleth_tmap(sf_object, value = "output", id_name = "id", mode = "plot", legend_title = "Clustering", bgcolor = "gray")
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')
title of legend
background color (default is "gray")
ggplot map
# NOT RUN { test <- choropleth_sf(nl_provincie, insurance, sum(amount, na.rm = TRUE)) choropleth_tmap(test) choropleth_tmap(test, id_name = "province_name", mode = "view") # }
Run the code above in your browser using DataLab