normalise_postcodes: Normalise postal codes

View source: R/utils.R

normalise_postcodesR Documentation

Normalise postal codes

Description

Some special postcodes are used in addresses, such as codes for post office boxes. This helper converts those to the postcode for the closest normal suburb if there is a reasonable clear match. If there is no good match, the postcodes are left unchanged.

Usage

normalise_postcodes(codes)

Arguments

codes

Character vector of postcodes (or coercible to one).

Details

Note that this goes a little further than the aliases that are registered with cartographer (which only account for postcodes with no geospatial data in the ABS dataset).

Value

Character vector of the same size as the input, but with the normalised postcodes.

Examples

normalise_postcodes(c(1685, 2000, 1010, 2129, 2145))

nswgeo documentation built on May 31, 2023, 6:46 p.m.