Description Usage Arguments Value Examples
View source: R/geocode_address.R
Geocode an address using the Bing geocoding API, to get a cleaned address, municipality, postal code, latitude, and longitude. This function adds an additional 0.25 seconds at the end of the call to comply with the Bing API license, which only allows 5 calls per second.
1 2 3 4 5 6 | geocode_address(
address,
base = "http://dev.virtualearth.net/REST/v1/Locations/CA/",
token = Sys.getenv("BING_TOKEN"),
quiet = FALSE
)
|
address |
Address to geocode |
base |
Base URL of Bing Geocoder: http://dev.virtualearth.net/REST/v1/Locations/CA/ |
token |
BING Geocoder token, defaults to |
quiet |
Whether to silence message that address is being geocoded, with its status - defaults to |
A tibble containing status code, address, municipality, postal code, method used, method confidence, latitude, and longitude.
1 2 3 4 5 6 | geocode_address("235 Bloor St E Toronto ON")
geocode_address("25 Grandstand Toronto ON")
# Ranges of addresses are geocoded to the first address:
geocode_address("1187-1189 QUEEN ST E Toronto ON")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.