geo_get_bounds: Return boundary geometries for supplied list of area codes

View source: R/geo_get_bounds.R

geo_get_boundsR Documentation

Return boundary geometries for supplied list of area codes

Description

Return boundary geometries for supplied list of area codes

Usage

geo_get_bounds(
  bounds_query_level,
  area_codes,
  return_centroids = FALSE,
  centroid_fields = FALSE,
  shape_fields = FALSE,
  spatial_ref = 4326,
  quiet_read = TRUE
)

Arguments

bounds_query_level

area level to query for, e.g. "lsoa11cd". Needs to be the full code not an abbreviation such as "lsoa"

area_codes

a vector of codes that match the level of bounds_query_level. Probably to be supplied from a column pulled from a lookup df or similar.

return_centroids

whether to retrieve area centroids instead of boundaries. Default FALSE. If set to TRUE then it will override return_boundaries whether that was set TRUE or otherwise. If return_boundaries and return_centroids are both FALSE, a plain summary data frame without geometry will be returned.

centroid_fields

Boolean, default FALSE. Whether to include BNG eastings, northings, lat and long fields in the return. NB this doesn't apply to direct (population-weighted) centroid queries.

shape_fields

Boolean, default FALSE. Whether to include Shape__Area and Shape__Length fields in the return when returning boundaries.

spatial_ref

The (EPSG) spatial reference of any returned geometry. Default value: 4326 ("WGS 84"). This parameter is ignored peacefully if no geometry is returned/returnable, eg lookup queries

quiet_read

Controls quiet parameter to sf::st_read

Value

an sf object


francisbarton/jogger documentation built on Aug. 6, 2022, 2:34 a.m.