clean_neighbourhood_names: Clean neighbourhood names

Description Usage Arguments Details Examples

View source: R/clean_neighbourhood_names.R

Description

Clean up City of Toronto neighbourhood names to a standardized format and remove neighbourhood numbers, matching what's in the neighbourhoods data set.

Usage

1

Arguments

neighbourhood

Name of neighbourhood column to be cleaned

Details

If there are any cleaning errors and the names cannot all be matched to that format (meaning additional cleaning is required), the function produces a warning with the mismatched neighbourhood names, and returns the matching names cleaned, and the mismatching names in their original form.

Examples

1
2
3
4
5
6
{
  library(dplyr)

  tibble(neighbourhood = c("Casa Loma (96)", "Milliken (130)")) %>%
    mutate(neighbourhood = clean_neighbourhood_names(neighbourhood))
}

purposeanalytics/lemur documentation built on Dec. 22, 2021, 10:52 a.m.