View source: R/get_pts_neighbourhood.R
get_pts_neighbourhood | R Documentation |
Take an sf geometry object of points and match them with ONS neighbourhoods. This function is really just a convenience wrapper around a spatial join with useful defaults input validation. As such, it can also be used with arbitrary polygons.
get_pts_neighbourhood(pts, pgon = onsr::ons_shp)
pts |
A simple feature collection class sf containing point data that you would like to locate within polygons (by default, ONS neighbourhoods). |
pgon |
A simple feature collection of class sf containing polygons (by default, ONS neighbourhoods). |
A simple feature collection of class sf with all columns in pts plus additional columns for each point's corresponding polygon (if applicable).
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.