geoCode: Georeference a set of coordinates

Description Usage Arguments Details Value Warning Author(s) See Also Examples

View source: R/geoCode.R

Description

geoCode is a helper function for georefPoints and quries the Google Map API server to return the street address for a set of coordinates.

Usage

1
geoCode(address, print = F, type = 1)

Arguments

address

The latitude and longitude coordinates for a point of interest seperated by a comma, as class 'character'

print

Logical argument whether to print the results to the consol

type

The type of address to return. See Details for arguments.

Details

The function geoCode returns various annotations for a set of coordinates:

type = 1 : returns the full street address

type = 2 : returns the suburb with no street identifier

type = 3 : returns the state and postcode (zipcode)

type = 4 : return the state and country

Value

A list of georeferenced locations

Warning

The Google Map API has a maximum threshold limit on the number of points that can be georeferenced at any one time. Preliminary testing has found >1000 points in one request can result in the code stopping and returning an error message. There is also a threshold on the number of requests to the API server in a single day, and may result in the code stopping with an error message. If this occurs the threshold is reset in 24 hours. See https://developers.google.com/maps/ for more details.

Author(s)

P. A. Harrison

See Also

georefPoints

Examples

1
2
3
4
5
# Load libraries
library(RJSONIO)

# Create data frame
tmp <- data.frame(id = "test", longitude = 147.4686, latitude = -42.008)

peteraharrison/PUCA documentation built on Sept. 16, 2019, 7:56 a.m.