Wolfram Research

Function Repository Resource:

UKPostcodeLookup (2.0.0) current version: 2.0.1 »

Source Notebook

Find information associated with a UK postcode

Contributed by: Jon McLoone

ResourceFunction["UKPostcodeLookup"][postcode]

returns information on the given UK postcode.

ResourceFunction["UKPostcodeLookup"][geoposition]

returns information on the UK postcode nearest to geoposition.

ResourceFunction["UKPostcodeLookup"][{location1,location2,}]

returns information on all the given postcodes or geopositions.

ResourceFunction["UKPostcodeLookup"][postcode,property]

returns only the given property for the given postcode.

Examples

Basic Examples (1) 

Look up a postcode:

In[1]:=
ResourceFunction["UKPostcodeLookup"]["OX29 8FD"]
Out[1]=

Scope (2) 

Find a specific property of a given postcode:

In[2]:=
ResourceFunction["UKPostcodeLookup"]["OX29 8FD", "Location"]
Out[2]=
In[3]:=
GeoGraphics[%, GeoRange -> Quantity[100, "Meters"]]
Out[3]=

You can look up information from the GeoPosition:

In[4]:=
ResourceFunction["UKPostcodeLookup"][
 GeoPosition[{51.825508`, -1.366991`}], "Postcode"]
Out[4]=

Providing a list of postcodes is faster than making separate requests:

In[5]:=
ResourceFunction["UKPostcodeLookup", ResourceVersion->"2.0.0"][{"OX29 8FD", "OX29 8SJ", "OX29 8LD", "OX29 8SA", "OX29 8LR"}, "Location"]
Out[5]=

Publisher

Jon McLoone

Requirements

Wolfram Language 11.3 (March 2018) or above

Version History

  • 2.0.1 – 03 April 2023
  • 2.0.0 – 06 February 2020
  • 1.0.0 – 20 December 2018

Related Resources

License Information