Learn R Programming

sgapi (version 1.0.3)

get_boundaries_areaname: Get Boundaries Using Area Names

Description

Extract a geojson shapefile of the chosen areas at the user-selected resolution.

Usage

get_boundaries_areaname(boundary,col_name_var,chosen_constituency_list)

Value

An sf object of the constituencies submitted to the function. If there are no constituencies, return is NULL.

Arguments

boundary

The resolution of constituencies, e.g. Census Output Areas or Westminster Constituencies. Available boundaries can be found here: https://geoportal.statistics.gov.uk/

col_name_var

The name of the datafield where the constituency name is held, e.g. PCON22NM for 2022 Parliamentary Constituencies.

chosen_constituency_list

List of chosen constituencies.

Examples

Run this code
get_boundaries_areaname(boundary="Local_Authority_Districts_December_2022_UK_BGC_V2",
col_name_var="LAD22NM",chosen_constituency_list=c("Westminster","Tower Hamlets","County Durham"))

Run the code above in your browser using DataLab