Returns nearest outward codes for a given longitude and latitude. The search is based on the relative distance of the outcode centroid.

nearest_outcode_lonlat(longitude, latitude)

Arguments

longitude

A string or numeric. Needs to have at least three decimal points.

latitude

A string or numeric. Needs to have at least three decimal points.

Value

A list with available data.

See also

postcode_lookup for documentation.

Examples

# \donttest{ nearest_outcode_lonlat(0.127, 51.507)
#> [[1]] #> [[1]]$outcode #> [1] "DA18" #> #> [[1]]$longitude #> [1] 0.1361732 #> #> [[1]]$latitude #> [1] 51.49427 #> #> [[1]]$northings #> [1] 179422 #> #> [[1]]$eastings #> [1] 548389 #> #> [[1]]$admin_district #> [[1]]$admin_district[[1]] #> [1] "Bexley" #> #> #> [[1]]$parish #> [[1]]$parish[[1]] #> [1] "Bexley, unparished area" #> #> #> [[1]]$admin_county #> list() #> #> [[1]]$admin_ward #> [[1]]$admin_ward[[1]] #> [1] "Slade Green & Northend" #> #> [[1]]$admin_ward[[2]] #> [1] "Thamesmead East" #> #> #> [[1]]$country #> [[1]]$country[[1]] #> [1] "England" #> #> #> #> [[2]] #> [[2]]$outcode #> [1] "SE28" #> #> [[2]]$longitude #> [1] 0.1044559 #> #> [[2]]$latitude #> [1] 51.50236 #> #> [[2]]$northings #> [1] 180257 #> #> [[2]]$eastings #> [1] 546162 #> #> [[2]]$admin_district #> [[2]]$admin_district[[1]] #> [1] "Greenwich" #> #> [[2]]$admin_district[[2]] #> [1] "Bexley" #> #> #> [[2]]$parish #> [[2]]$parish[[1]] #> [1] "Greenwich, unparished area" #> #> [[2]]$parish[[2]] #> [1] "Bexley, unparished area" #> #> #> [[2]]$admin_county #> list() #> #> [[2]]$admin_ward #> [[2]]$admin_ward[[1]] #> [1] "Plumstead" #> #> [[2]]$admin_ward[[2]] #> [1] "Glyndon" #> #> [[2]]$admin_ward[[3]] #> [1] "Thamesmead Moorings" #> #> [[2]]$admin_ward[[4]] #> [1] "Thamesmead East" #> #> #> [[2]]$country #> [[2]]$country[[1]] #> [1] "England" #> #> #> #> [[3]] #> [[3]]$outcode #> [1] "SE2" #> #> [[3]]$longitude #> [1] 0.1159018 #> #> [[3]]$latitude #> [1] 51.48975 #> #> [[3]]$northings #> [1] 178879 #> #> [[3]]$eastings #> [1] 546997 #> #> [[3]]$admin_district #> [[3]]$admin_district[[1]] #> [1] "Greenwich" #> #> [[3]]$admin_district[[2]] #> [1] "Bexley" #> #> #> [[3]]$parish #> [[3]]$parish[[1]] #> [1] "Greenwich, unparished area" #> #> [[3]]$parish[[2]] #> [1] "Bexley, unparished area" #> #> #> [[3]]$admin_county #> list() #> #> [[3]]$admin_ward #> [[3]]$admin_ward[[1]] #> [1] "Plumstead" #> #> [[3]]$admin_ward[[2]] #> [1] "West Heath" #> #> [[3]]$admin_ward[[3]] #> [1] "Belvedere" #> #> [[3]]$admin_ward[[4]] #> [1] "Thamesmead Moorings" #> #> [[3]]$admin_ward[[5]] #> [1] "Abbey Wood" #> #> [[3]]$admin_ward[[6]] #> [1] "Thamesmead East" #> #> #> [[3]]$country #> [[3]]$country[[1]] #> [1] "England" #> #> #> #> [[4]] #> [[4]]$outcode #> [1] "DA17" #> #> [[4]]$longitude #> [1] 0.1491299 #> #> [[4]]$latitude #> [1] 51.4862 #> #> [[4]]$northings #> [1] 178550 #> #> [[4]]$eastings #> [1] 549315 #> #> [[4]]$admin_district #> [[4]]$admin_district[[1]] #> [1] "Bexley" #> #> [[4]]$admin_district[[2]] #> [1] "Dartford" #> #> #> [[4]]$parish #> [[4]]$parish[[1]] #> [1] "Dartford, unparished area" #> #> [[4]]$parish[[2]] #> [1] "Bexley, unparished area" #> #> #> [[4]]$admin_county #> [[4]]$admin_county[[1]] #> [1] "Kent" #> #> #> [[4]]$admin_ward #> [[4]]$admin_ward[[1]] #> [1] "West Heath" #> #> [[4]]$admin_ward[[2]] #> [1] "Belvedere" #> #> [[4]]$admin_ward[[3]] #> [1] "Erith" #> #> [[4]]$admin_ward[[4]] #> [1] "Northumberland Heath" #> #> [[4]]$admin_ward[[5]] #> [1] "West Hill" #> #> #> [[4]]$country #> [[4]]$country[[1]] #> [1] "England" #> #> #> #> [[5]] #> [[5]]$outcode #> [1] "RM9" #> #> [[5]]$longitude #> [1] 0.133861 #> #> [[5]]$latitude #> [1] 51.54096 #> #> [[5]]$northings #> [1] 184609 #> #> [[5]]$eastings #> [1] 548077 #> #> [[5]]$admin_district #> [[5]]$admin_district[[1]] #> [1] "Havering" #> #> [[5]]$admin_district[[2]] #> [1] "Barking and Dagenham" #> #> #> [[5]]$parish #> [[5]]$parish[[1]] #> [1] "Barking and Dagenham, unparished area" #> #> [[5]]$parish[[2]] #> [1] "Havering, unparished area" #> #> #> [[5]]$admin_county #> list() #> #> [[5]]$admin_ward #> [[5]]$admin_ward[[1]] #> [1] "Mayesbrook" #> #> [[5]]$admin_ward[[2]] #> [1] "Parsloes" #> #> [[5]]$admin_ward[[3]] #> [1] "Thames" #> #> [[5]]$admin_ward[[4]] #> [1] "Heath" #> #> [[5]]$admin_ward[[5]] #> [1] "Goresbrook" #> #> [[5]]$admin_ward[[6]] #> [1] "South Hornchurch" #> #> [[5]]$admin_ward[[7]] #> [1] "Eastbury" #> #> [[5]]$admin_ward[[8]] #> [1] "Alibon" #> #> [[5]]$admin_ward[[9]] #> [1] "River" #> #> #> [[5]]$country #> [[5]]$country[[1]] #> [1] "England" #> #> #> #> [[6]] #> [[6]]$outcode #> [1] "IG11" #> #> [[6]]$longitude #> [1] 0.09322834 #> #> [[6]]$latitude #> [1] 51.53496 #> #> [[6]]$northings #> [1] 183860 #> #> [[6]]$eastings #> [1] 545279 #> #> [[6]]$admin_district #> [[6]]$admin_district[[1]] #> [1] "Barking and Dagenham" #> #> [[6]]$admin_district[[2]] #> [1] "Newham" #> #> [[6]]$admin_district[[3]] #> [1] "Redbridge" #> #> #> [[6]]$parish #> [[6]]$parish[[1]] #> [1] "Barking and Dagenham, unparished area" #> #> [[6]]$parish[[2]] #> [1] "Redbridge, unparished area" #> #> [[6]]$parish[[3]] #> [1] "Newham, unparished area" #> #> #> [[6]]$admin_county #> list() #> #> [[6]]$admin_ward #> [[6]]$admin_ward[[1]] #> [1] "Longbridge" #> #> [[6]]$admin_ward[[2]] #> [1] "Becontree" #> #> [[6]]$admin_ward[[3]] #> [1] "Thames" #> #> [[6]]$admin_ward[[4]] #> [1] "East Ham South" #> #> [[6]]$admin_ward[[5]] #> [1] "Beckton" #> #> [[6]]$admin_ward[[6]] #> [1] "Mayfield" #> #> [[6]]$admin_ward[[7]] #> [1] "Eastbury" #> #> [[6]]$admin_ward[[8]] #> [1] "Abbey" #> #> [[6]]$admin_ward[[9]] #> [1] "Gascoigne" #> #> #> [[6]]$country #> [[6]]$country[[1]] #> [1] "England" #> #> #> #> [[7]] #> [[7]]$outcode #> [1] "SE18" #> #> [[7]]$longitude #> [1] 0.07273975 #> #> [[7]]$latitude #> [1] 51.48435 #> #> [[7]]$northings #> [1] 178192 #> #> [[7]]$eastings #> [1] 544017 #> #> [[7]]$admin_district #> [[7]]$admin_district[[1]] #> [1] "Greenwich" #> #> #> [[7]]$parish #> [[7]]$parish[[1]] #> [1] "Greenwich, unparished area" #> #> #> [[7]]$admin_county #> list() #> #> [[7]]$admin_ward #> [[7]]$admin_ward[[1]] #> [1] "Plumstead" #> #> [[7]]$admin_ward[[2]] #> [1] "Glyndon" #> #> [[7]]$admin_ward[[3]] #> [1] "Woolwich Riverside" #> #> [[7]]$admin_ward[[4]] #> [1] "Shooters Hill" #> #> [[7]]$admin_ward[[5]] #> [1] "Kidbrooke with Hornfair" #> #> [[7]]$admin_ward[[6]] #> [1] "Woolwich Common" #> #> #> [[7]]$country #> [[7]]$country[[1]] #> [1] "England" #> #> #> #> [[8]] #> [[8]]$outcode #> [1] "RM10" #> #> [[8]]$longitude #> [1] 0.1578643 #> #> [[8]]$latitude #> [1] 51.54491 #> #> [[8]]$northings #> [1] 185097 #> #> [[8]]$eastings #> [1] 549729 #> #> [[8]]$admin_district #> [[8]]$admin_district[[1]] #> [1] "Barking and Dagenham" #> #> #> [[8]]$parish #> [[8]]$parish[[1]] #> [1] "Barking and Dagenham, unparished area" #> #> #> [[8]]$admin_county #> list() #> #> [[8]]$admin_ward #> [[8]]$admin_ward[[1]] #> [1] "Heath" #> #> [[8]]$admin_ward[[2]] #> [1] "Village" #> #> [[8]]$admin_ward[[3]] #> [1] "Alibon" #> #> [[8]]$admin_ward[[4]] #> [1] "River" #> #> [[8]]$admin_ward[[5]] #> [1] "Eastbrook" #> #> #> [[8]]$country #> [[8]]$country[[1]] #> [1] "England" #> #> #> #> [[9]] #> [[9]]$outcode #> [1] "DA7" #> #> [[9]]$longitude #> [1] 0.1459445 #> #> [[9]]$latitude #> [1] 51.4656 #> #> [[9]]$northings #> [1] 176254 #> #> [[9]]$eastings #> [1] 549161 #> #> [[9]]$admin_district #> [[9]]$admin_district[[1]] #> [1] "Bexley" #> #> #> [[9]]$parish #> [[9]]$parish[[1]] #> [1] "Bexley, unparished area" #> #> #> [[9]]$admin_county #> list() #> #> [[9]]$admin_ward #> [[9]]$admin_ward[[1]] #> [1] "Bexleyheath" #> #> [[9]]$admin_ward[[2]] #> [1] "Crook Log" #> #> [[9]]$admin_ward[[3]] #> [1] "West Heath" #> #> [[9]]$admin_ward[[4]] #> [1] "Northumberland Heath" #> #> [[9]]$admin_ward[[5]] #> [1] "Crayford" #> #> [[9]]$admin_ward[[6]] #> [1] "Barnehurst" #> #> #> [[9]]$country #> [[9]]$country[[1]] #> [1] "England" #> #> #> #> [[10]] #> [[10]]$outcode #> [1] "DA8" #> #> [[10]]$longitude #> [1] 0.1757381 #> #> [[10]]$latitude #> [1] 51.47576 #> #> [[10]]$northings #> [1] 177445 #> #> [[10]]$eastings #> [1] 551197 #> #> [[10]]$admin_district #> [[10]]$admin_district[[1]] #> [1] "Bexley" #> #> #> [[10]]$parish #> [[10]]$parish[[1]] #> [1] "Bexley, unparished area" #> #> #> [[10]]$admin_county #> list() #> #> [[10]]$admin_ward #> [[10]]$admin_ward[[1]] #> [1] "Belvedere" #> #> [[10]]$admin_ward[[2]] #> [1] "Erith" #> #> [[10]]$admin_ward[[3]] #> [1] "Northumberland Heath" #> #> [[10]]$admin_ward[[4]] #> [1] "Slade Green & Northend" #> #> [[10]]$admin_ward[[5]] #> [1] "Barnehurst" #> #> #> [[10]]$country #> [[10]]$country[[1]] #> [1] "England" #> #> #>
# }