Passes address inputs in character vector form to the geocode_combine function for geocoding.
Note that address inputs must be specified for queries either with the queries
parameter (for each query)
or the global_params
parameter (for all queries). For example global_params = list(address = 'address')
passes addresses provided in the address
parameter to all queries.
geo_combine( queries, global_params = list(), address = NULL, street = NULL, city = NULL, county = NULL, state = NULL, postalcode = NULL, country = NULL, lat = lat, long = long, ... )
queries | a list of queries, each provided as a list of parameters. The queries are
executed by the geocode function in the order provided.
(ex. |
---|---|
global_params | a list of parameters to be used for all queries
(ex. |
address | single line address (ie. '1600 Pennsylvania Ave NW, Washington, DC').
Do not combine with the address component arguments below
( |
street | street address (ie. '1600 Pennsylvania Ave NW') |
city | city (ie. 'Tokyo') |
county | county (ie. 'Jefferson') |
state | state (ie. 'Kentucky') |
postalcode | postalcode (ie. zip code if in the United States) |
country | country (ie. 'Japan') |
lat | latitude column name. Can be quoted or unquoted (ie. |
long | longitude column name. Can be quoted or unquoted (ie. |
... | arguments passed to the geocode_combine function |
tibble (dataframe)
# \donttest{ options(tidygeocoder.progress_bar = FALSE) example_addresses <- c("100 Main St New York, NY", "Paris", "Not a Real Address") geo_combine( queries = list( list(method = 'census'), list(method = 'osm') ), address = example_addresses, global_params = list(address = 'address') )#>#>#>#>#>#>#> # A tibble: 3 × 4 #> address lat long query #> <chr> <dbl> <dbl> <chr> #> 1 100 Main St New York, NY 40.7 -74.0 "census" #> 2 Paris 48.9 2.32 "osm" #> 3 Not a Real Address NA NA ""geo_combine( queries = list( list(method = 'arcgis'), list(method = 'census', mode = 'single'), list(method = 'census', mode = 'batch') ), global_params = list(address = 'address'), address = example_addresses, cascade = FALSE, return_list = TRUE )#>#>#>#>#>#>#>#>#>#> $arcgis #> # A tibble: 3 × 3 #> address lat long #> <chr> <dbl> <dbl> #> 1 100 Main St New York, NY 40.5 -74.3 #> 2 Paris 48.9 2.34 #> 3 Not a Real Address NA NA #> #> $census1 #> # A tibble: 3 × 3 #> address lat long #> <chr> <dbl> <dbl> #> 1 100 Main St New York, NY 40.7 -74.0 #> 2 Paris NA NA #> 3 Not a Real Address NA NA #> #> $census2 #> # A tibble: 3 × 3 #> address lat long #> <chr> <dbl> <dbl> #> 1 100 Main St New York, NY 40.7 -74.0 #> 2 Paris NA NA #> 3 Not a Real Address NA NA #>geo_combine( queries = list( list(method = 'arcgis', address = 'city'), list(method = 'osm', city = 'city', country = 'country') ), city = c('Tokyo', 'New York'), country = c('Japan', 'United States'), cascade = FALSE )#>#>#>#>#>#>#> # A tibble: 4 × 5 #> city country lat long query #> <chr> <chr> <dbl> <dbl> <chr> #> 1 Tokyo Japan 35.7 140. arcgis #> 2 Tokyo Japan 35.7 140. osm #> 3 New York United States 40.7 -74.0 arcgis #> 4 New York United States 40.7 -74.0 osm# }