Skip to contents

Convert postcode to sf point

Usage

postcode2point(df, postcode_col)

Arguments

df

input data frame, containing postcode values

postcode_col

the name of the column containing the postcode

Value

an sf data frame, containing a formatted postcodes column alongside the original

Examples

postcodes_df <- data.frame(postcode = c("AB101AB", "AB10 1AF", "ab10 1ag"))
postcodes_sf <- postcode2point(postcodes_df, "postcode")