tidy_geocode | R Documentation |
Returns geographical information as a tibble through the use of a geocoding API
tidy_geocode(df, location, info = c("lat", "lng"), method = "opencage")
df |
a tibble |
location |
the variable to geocode |
info |
the variables to inform
Information can be many other variables depending on the method you are using.
Type |
method |
the API to send the request to. Can be "opencage" (default) or "google". |
tibble with additional columns corresponding to the info required
mydf <-tibble::tibble(location=c("Lyon, France",
"22 place du Général de Gaulle, Paris",
"la Guillotière, Lyon",
NA,
"Europe",
"Tucson, AZ",
"Rio Grande do Sul",
""))
tidy_geocode(mydf,location,method="opencage")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.