geocode: geocode

Description Usage Arguments Details Value

Description

Geocode an address or postcode with Google Geocode API Require an API key which can be obtained from: https://developers.google.com/maps/documentation/geocoding/get-api-key

Usage

1
geocode(address, key, output_format = "json")

Arguments

address

A human-readable address or postcode. Should not contain special characters like spaces.

key

Either a character string containing your API key or the location of a .txt file containing the string on the first line only

output_format

json or xml (currently only json is supported and is the default)

Details

Geocoding converts an address or postcode to latitude/longitude coordinates

Address should not contain special characters like spaces (which should be replaced with '+'). See https://developers.google.com/maps/documentation/geocoding/web-service-best-practices#BuildingURLs

Value

A data frame with two columns, lat and long


philmikejones/thesis documentation built on May 31, 2019, 2:50 p.m.