geocheck: Compare a set of area names to an ONS-maintained list

Description Usage Arguments Value

View source: R/geocheck.R

Description

This function compares a list of geographical area names to an ONS area code list. It takes as an input a list of names, the area type (eg. "Local Authority" or "Region"), and the date of the ONS list you wish to compare to. To obtain a list of valid dates, use the function ONS_geolist()

Usage

1
geocheck(names, area_type, ONS_filedate)

Arguments

names

A vector of names to be checked

area_type

Type of area (eg. "Local Authority", "Region")

ONS_filedate

A date corresponding to the ONS code list you wish to compare to. Run the ONS_geolist() function to obtain a list of valid dates. This should be in the format eg. "31-Dec-19".

Value

A list containing three elements:

matches: A data frame of area names which match with the ONS list (includes Exact and Partial matches)
unmatched_names: A vector of names taken from the "names" input parameter which could not be matched to an ONS name
unmatched_ONS: A vector of names taken from the requested ONS list which could not be matced to a name from the vector specified in the "names" input parameter


moj-analytical-services/geoharmonise documentation built on Jan. 1, 2021, 10:30 a.m.