Skip to contents

Function that validates postcodes and links to IMD datasets, returning the score and generated deciles and quintiles.

Usage

get_imd(x, var = "postcode", fix_invalid = TRUE)

Arguments

x

A data frame with a column of postcodes, or a vector of postcodes.

var

String or symbol. The name of the variable in the data frame that comprises the postcodes to be submitted. Should be acceptable as a symbol or as a standard string.

fix_invalid

Boolean, default TRUE. Whether to try to fix any postcodes that are not found (potentially because they are terminated codes, or contain typos).