Description Usage Arguments Value Author(s) Examples
Takes an object produced by choropleth_sf()
, and creates the correspoding choropleth map.
1 2 | choropleth_tmap(sf_object, value = "output", id_name = "id",
mode = "plot", legend_title = "Clustering", bgcolor = "gray")
|
sf_object |
Simple features object. Note that shapefiles consist of more than one file, all with identical basename, which should reside in the same directory. |
value |
Column to shade the polygons. |
id_name |
Column of ids to plot. |
mode |
There are two options: 'plot' or 'view'. Mode 'view' gives an interactive map. |
legend_title |
Title of legend. |
bgcolor |
Background color. Default is "gray". |
ggplot map
Martin Haringa
1 2 3 | test <- choropleth_sf(nl_provincie, insurance, sum(amount, na.rm = TRUE))
choropleth_tmap(test)
choropleth_tmap(test, id_name = "province_name", mode = "view")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.