View source: R/cartociudad_geocode.R
| cartociudad_geocode | R Documentation |
Geolocation of Spanish addresses via Cartociudad API calls, providing the
full address in a single text string via full_address. It is
advisable to add the street type (calle, etc.) and to omit the country
name.
cartociudad_geocode(full_address, on.error = "fail", ...)
full_address |
Character string providing the full address to be geolocated; e.g., "calle miguel servet 5, zaragoza". Adding the country may cause problems. |
on.error |
Defaults to |
... |
Other parameters for the API. See Details section below. |
The entity geolocation API admits more parameters beyond the address field such as id or type.
You can use these extra arguments (see the References or the Examples sections below for further information)
at your own risk.
A data frame consisting of a single row per guess. See the reference below for an explanation of the data frame columns.
Carlos J. Gil Bellosta
http://www.cartociudad.es/recursos/Documentacion_tecnica/CARTOCIUDAD_ServiciosWeb.pdf
# standard usage
res <- cartociudad_geocode(full_address = "plaza de cascorro 11, 28005 madrid")
#' # km 41 of A-23 motorway
res <- cartociudad_geocode("A-23 41")
# specific usage (see References for details)
res <- cartociudad_geocode("A-23 41", type = "portal", id = "600000000045", portal = 41)
# vectorized call
## Not run:
addresses <- paste("A-23", 1:10)
res <- lapply(addresses, cartociudad_geocode, on.error = "warn")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.