Skip to contents

Return areas of a selected type within a set distance of another area.

Usage

get_nearby_areas(
  area,
  type = c("neighborhood", "council district", "legislative district",
    "congressional district", "planning district", "police district", "csa",
    "park district"),
  dist = 1,
  exclude_area = TRUE,
  residential = FALSE
)

Arguments

area

sf object. Must have a name column for exclude_area to work.

type

Required. Supported values include "neighborhood", "council district", "legislative district", "congressional district", "planning district", "police district", "csa", and "park district". The type may be different than the type of the area provided.

dist

Distance in meters for matching nearby areas. Default is 1 meter.

exclude_area

Logical. Default TRUE. If FALSE, include the same areas provided to area (assuming the areas provide are the same type as the parameter provided to get_nearby_areas).

residential

Logical. Default FALSE. If the type is neighborhood, set TRUE to only return residential neighborhoods (excluding industrial areas, business parks, and parks/reservoirs).