mz_geocode_structured {rmapzen}R Documentation

Geocode a structured address

Description

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.

Usage

mz_geocode_structured(
  address = NULL,
  neighbourhood = NULL,
  borough = NULL,
  locality = NULL,
  county = NULL,
  region = NULL,
  postalcode = NULL,
  country = NULL,
  ...
)

Arguments

address

Can be a numbered street address or just the name of the street

neighbourhood

Neighborhood name (eg "Notting Hill" in London)

borough

eg "Manhattan"

locality

The city (eg "Oakland")

county

The county

region

States in the case of US/Canada, or state-like administrative division in other countries

postalcode

AKA the zip code. Can not be used alone, must have at least one other argument

country

The country - Can be the full name or the abbreviation from mz_countries

...

Arguments passed on to mz_structured_search

Value

A tibble, with the parsed address used to retrieve the geocode, lat/lon, and the confidence (between 0 and 1)

See Also

mz_geocode, mz_structured_search


[Package rmapzen version 0.5.1 Index]