View source: R/get_boundaries.R
get_boundaries | R Documentation |
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.
get_boundaries(boundary, geometry_filter = NULL,
base_url = "https://services1.arcgis.com/ESMARspQHYMw9BZ9/arcgis/rest/services")
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. |
base_url |
Open Geography Portal base url |
An sf object for all constituencies in the geospatial area submitted through the geometry_filter, at the chosen ONS Boundary.
## 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.