clean_pcon_names: Clean British Parliamentary Constituency Names

View source: R/clean_pcon_names.R

clean_pcon_namesR Documentation

Clean British Parliamentary Constituency Names

Description

British parliamentary constituencies are not often coded in a consistent manner. Fixing this can also be very time-consuming. This function uses the constituencies dataset in the package to standardise a vector of constituencies names. Note that where strings are uncertain this function can take a while to run.

Usage

clean_pcon_names(x, year = NULL)

Arguments

x

A vector of constituency names.

year

A specific year to consider names for. Defaults to NULL.

Value

A vector of cleaned constituency names.

Examples

clean_pcon_names(c("Ynys Môn", "Derby North", "North, Derby"), year = 2019)

jackobailey/britpol documentation built on Aug. 6, 2023, 2:30 a.m.