get_pts_neighbourhood: Locate points within ONS neighbourhoods.

View source: R/get_pts_neighbourhood.R

get_pts_neighbourhoodR Documentation

Locate points within ONS neighbourhoods.

Description

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.

Usage

get_pts_neighbourhood(pts, pgon = onsr::ons_shp)

Arguments

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).

Value

A simple feature collection of class sf with all columns in pts plus additional columns for each point's corresponding polygon (if applicable).


Ottawa-Neighbourhood-Study/onsr documentation built on June 19, 2022, 11:46 a.m.