Skip to contents

Lookup a Scottish postcode.

Usage

scottish_postcode_lookup(postcode)

Arguments

postcode

A string. One valid Scottish postcode. This function is case- and space-insensitive. For non-Scottish postcodes use postcode_lookup. For more than one non-Scottish postcode use bulk_postcode_lookup.

Value

A data frame. Returns all available data if found. Returns NAs if postcode does not exist (404).

  • postcode Postcode. Royal Mail postcode.

  • scottish_parliamentary_constituency Scottish Parliamentary Constituency 2014 Scottish Parliamentary Constituency.

  • scottish_parliamentary_constituency Scottish Parliamentary Constituency GSS Code. A code that identifies a 2014 Scottish Parliamentary Constituency.

See https://postcodes.io/docs for more details.

Examples

# \donttest{
scottish_postcode_lookup("EH12NG")
#>   postcode scottish_parliamentary_constituency
#> 1  EH1 2NG                   Edinburgh Central
#>   scottish_parliamentary_constituency_code
#> 1                                S16000104
# }