A thin wrapper for ggmap::mutate_geocode. Takes a dataframe, adds lon/lat columns based on an existing address column using Google's geocoding API (https://developers.google.com/maps/documentation/geocoding/start).

GPE_geocode(data, address, key)

Arguments

data

a dataframe containing an address column

address

the name of a column in the geocode dataframe containing addresses

key

an API key obtained at https://cloud.google.com/maps-platform/

Examples

if (FALSE) { GPE_geocode(data = schools, addres = address, key = mykey) }