Description Usage Arguments Value Author(s) Examples
Create choropleth simple feature object from points.
1 | choropleth_sf(sf_map, df, oper, crs = 4326)
|
sf_map |
Simple features object. Note that shapefiles consist of more than one file, all with identical basename, which should reside in the same directory. |
df |
Data.frame of interest. The data.frame should contain the column names 'lon' and 'lat' |
oper |
An operation on the polygon level. |
crs |
Coordinate reference system: integer with the EPSG code, or character with proj4string |
standard feature object
Martin Haringa
1 2 3 4 5 6 | choropleth_sf(nl_postcode2, insurance, sum(amount, na.rm = TRUE))
## Not run:
shp_read <- sf::st_read(~/path/to/file.shp)
choropleth_sf(shp_read, insurance, sum(amount, na.rm = TRUE))
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.