normalise_geo_names: Normalise ABS geography names

View source: R/normalise_geo_names.R View source: R/mapping.r

normalise_geo_namesR Documentation

Normalise ABS geography names

Description

This function renames and reclassifies the columns of a data.frame to make them easier to work with. It will always reclassify any column with code in the name or with some sort of year identifier (e.g. lga_name_2018) to character. Optionally, it can remove these year identifiers from the column names and/or rename the columns to lower case.

This function renames and reclassifies the columns of a data.frame to make them easier to work with. It will always reclassify any column with code in the name or with some sort of year identifier (e.g. lga_name_2018) to character. Optionally, it can remove these year identifiers from the column names and/or rename the columns to lower case.

Usage

normalise_geo_names(.data, remove_year = TRUE, make_lower = TRUE)

standardise_geo_names(.data, remove_year = TRUE, make_lower = TRUE)

normalise_geo_names(.data, remove_year = TRUE, make_lower = TRUE)

Arguments

.data

(data.frame) A data.frame with columns you want renamed

remove_year

(logical; default = TRUE) Do you want to remove year identifies in the column names?

make_lower

(logical; default = TRUE) Do you want to set all column names to lower case?

Value

returns the original tibble with the geographic column names standardised.

returns the original tibble with the geographic column names standardised.

Examples

## Not run: 
absmapsdata::lga2018 %>% normalise_geo_names()

## End(Not run)
## Not run: 
absmapsdata::lga2018 %>% normalise_geo_names()

## End(Not run)

baslat/sak documentation built on April 14, 2025, 4:14 p.m.