mz_geocode
allows you to search using an unstructured string of
text, but if your address data has more structure (eg separate columns for
address, city, state, zip), then using the structured search service may
provide more precision. For more information, see
https://github.com/pelias/documentation/. Note that
all of the arguments are optional, but at least one of them must be non-NULL.
Furthermore, postalcode
can not be used by itself.
mz_geocode_structured(
address = NULL,
neighbourhood = NULL,
borough = NULL,
locality = NULL,
county = NULL,
region = NULL,
postalcode = NULL,
country = NULL,
...
)
A tibble, with the parsed address used to retrieve the geocode, lat/lon, and the confidence (between 0 and 1)
Can be a numbered street address or just the name of the street
Neighborhood name (eg "Notting Hill" in London)
eg "Manhattan"
The city (eg "Oakland")
The county
States in the case of US/Canada, or state-like administrative division in other countries
AKA the zip code. Can not be used alone, must have at least one other argument
The country - Can be the full name or the abbreviation from
mz_countries
Arguments passed on to mz_structured_search
mz_geocode
, mz_structured_search