knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>"
)
library(addrsheff)

Add postcode variables

# Create a data frame with some example records
df <- tibble::tribble(
  ~name,    ~postcode,
  "SCC",    "S1 2HH",
  "Blades", "S2 4SU",
  "Owls",   "S6 1SW"
)

add_postcode_vars(
  df,
  pcd_name = "postcode",
  .admin_district = FALSE,
  .lat_long = TRUE,
  other_vars = c("admin_ward", "msoa_code")
)


scc-pi/addrsheff documentation built on April 1, 2022, 10:56 p.m.