st_kde | R Documentation |
Note: Taken from https://github.com/r-spatial/sf/issues/1201
st_kde(points, cellsize, bandwith, extent = NULL)
points |
sf object with POINT geometry |
cellsize |
size of cell |
bandwith |
bandwith for 2D kde, larger: smoother, smaller: spikier |
extent |
allows cropping to a specific subregion of the map |
raster
## Not run:
librarry(sf)
libary(here)
library(magrittr)
library(dplyr)
shpBuildings <- SfSpHelpers::get_zipped_remote_shapefile ("https://data.montreal.ca/dataset/4ad6baea-4d2c-460f-a8bf-5d000db498f7/resource/866a3dbc-8b59-48ff-866d-f2f9d3bbee9d/download/uniteevaluationfonciere.geojson.zip")
shpCentroids <- shpBuildings %>% st_centroid
rasterKDECentroids <- st_kde(shpCentroids,0.01,0.01)
plot(rasterKDECentroids)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.