Description Usage Arguments Value See Also Examples
View source: R/reverse_geocode.R
Takes a dataframe containing coordinates (latitude and longitude) and returns
the reverse geocoding query results from a specified service by using the
reverse_geo function. See example usage in vignette("tidygeocoder")
.
This function passes all additional parameters (...
) to the
reverse_geo function, so you can refer to its documentation for more details
on possible arguments.
1 2 3 4 5 6 7 8 9 10 11 | reverse_geocode(
.tbl,
lat,
long,
address = "address",
return_input = TRUE,
limit = 1,
return_coords = NULL,
unique_only = FALSE,
...
)
|
.tbl |
dataframe containing coordinates |
lat |
latitude column name (input data). Can be quoted or unquoted (ie. lat or 'lat'). |
long |
longitude column name (input data). Can be quoted or unquoted (ie. long or 'long'). |
address |
address column name (output data). Can be quoted or unquoted (ie. addr or 'addr'). |
return_input |
if TRUE then the input dataset will be combined with the geocoder query results and returned. If FALSE only the geocoder results will be returned. |
limit |
maximum number of results to return per input coordinate. For many geocoding services
the maximum value of the limit parameter is 100. Pass |
return_coords |
if TRUE return input coordinates. Defaults to TRUE if |
unique_only |
if TRUE then only unique results will be returned and return_input will be set to FALSE. |
... |
arguments passed to the reverse_geo function |
tibble (dataframe)
reverse_geo
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | library(tibble)
library(dplyr, warn.conflicts = FALSE)
tibble(
latitude = c(38.895865, 43.6534817),
longitude = c(-77.0307713,-79.3839347)
) %>%
reverse_geocode(
lat = latitude,
long = longitude,
method = 'osm',
full_results = TRUE
)
louisville %>% head(3) %>%
reverse_geocode(lat = latitude, long = longitude,
method = 'arcgis')
louisville %>% head(2) %>%
reverse_geocode(lat = latitude, long = longitude,
method = 'osm',
limit = 2, return_input = FALSE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.