geocode_address: Batch Geocoding of Physical Addresses using the Google Maps...

View source: R/geocode_address.R

geocode_addressR Documentation

Batch Geocoding of Physical Addresses using the Google Maps API

Description

Geocodes a location (determines latitude and longitude from physical address) using the Google Maps API. Note that the Google Maps API requires registered credentials (Google Cloud Platform), see the ggmap package for more details at https://github.com/dkahle/ggmap. Note that when using this function you are agreeing to the Google Maps API Terms of Service at https://cloud.google.com/maps-platform/terms/.

Usage

geocode_address(location)

Arguments

location

a character vector of physical addresses (e.g. 1600 University Ave., Morgantown, WV)

Value

Returns a two column matrix with the latitude and longitude of each location queried.

Author(s)

Jamie Spaulding, Keith Morris

Examples



library(ggmap) #needed to register Google Cloud Credentials
register_google("**Google Cloud Credentials Here**")
addresses <- c("Milan Puskar Stadium, Morgantown, WV","Woodburn Hall, Morgantown, WV")
geocode_address(addresses)


rcrimeanalysis documentation built on May 31, 2023, 8:54 p.m.