get_boundaries {sgapi}R Documentation

Get Boundaries Using Geospatial Filter

Description

Retrieve boundaries from the Office for National Statistics (ONS) 'ONS Geography Portal' given a valid boundary name and layer name. If the submitted geometry is outwith the ONS Boundary, e.g. the geometry is in France, the function will return an empty shape file.

Usage

get_boundaries(boundary, geometry_filter = NULL)

Arguments

boundary

A valid ONS boundary name given as a string.

geometry_filter

geospatial shape or point (using latitude and longitude). Currently limited to a rectangular box or dropped pin.

Value

An sf object for all constituencies in the geospatial area submitted through the geometry_filter, at the chosen ONS Boundary.

Examples

## Not run: 
get_boundaries(boundary="MSOA_Dec_2011_Boundaries_Generalised_Clipped_BGC_EW_V3_2022",
geometry_filter="-1.282825,52.354169,0.206626,52.7106")

## End(Not run)


[Package sgapi version 1.0.2 Index]