Learn R Programming

PostcodesioR (version 0.3.1)

bulk_reverse_geocoding: Bulk reverse geocoding

Description

Returns nearest postcodes for a given longitude and latitude. Accepts up to 100 geolocations.

Usage

bulk_reverse_geocoding(geolocations)

Arguments

geolocations

A list containing an array of objects to geolocate. At least two elements needed.

Value

A list with the geocoded data.

Details

This method requires a JSON object containing an array of geolocation objects to be POSTed. Each geolocation object accepts an optional radius (meters) and limit argument. Both default to 100m and 10 respectively. It also accepts a wideSearch argument.

See Also

postcode_lookup for documentation.

Examples

Run this code
# NOT RUN {
# }
# NOT RUN {
geolocations_list <- structure(
list(
geolocations = structure(
list(
longitude = c(-3.15807731271522, -1.12935802905177),
latitude = c(51.4799900627036, 50.7186356978817),
limit = c(NA, 100L),
radius = c(NA, 500L)),
.Names = c("longitude", "latitude", "limit", "radius"),
class = "data.frame",
row.names = 1:2)),
.Names = "geolocations")

bulk_reverse_geocoding(geolocations_list)
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab