convertPostcode {openairmaps} | R Documentation |
Convert a UK postcode to a latitude/longitude pair
Description
This is a much simpler implementation of the tools found in the
PostcodesioR
R package, intended for use with the searchNetwork()
function.
Usage
convertPostcode(postcode)
Arguments
postcode |
A valid UK postcode. required A string containing a single valid UK postcode, e.g., |
Value
A list containing the latitude, longitude, and input postcode.
Source
See Also
The PostcodesioR
package at
https://github.com/ropensci/PostcodesioR/
Examples
# convert a UK postcode
convertPostcode("SW1A1AA")
## Not run:
# use with `searchNetwork()`
palace <- convertPostcode("SW1A1AA")
searchNetwork(lat = palace$lat, lng = palace$lng, max_dist = 10)
## End(Not run)
[Package openairmaps version 0.9.0 Index]