find_place: Geolocate an address

Description Usage Arguments Details Value Examples

Description

Lookup the latitude and longitude of a location using the place's name or address.

Usage

1
2
3
4
5
6
7
find_place(location = NULL, name = NULL, line1 = NULL, line2 = NULL,
  line3 = NULL, house = NULL, street = NULL, unittype = NULL,
  unit = NULL, xstreet = NULL, postal = NULL, neighborhood = NULL,
  city = NULL, county = NULL, state = NULL, country = NULL,
  woeid = NULL, reverse = FALSE, locale = "en_US", flags = "",
  gflags = "", commercial = FALSE, key = getOption("RYDN_KEY"),
  secret = getOption("RYDN_SECRET"))

Arguments

location

The location name or address you want to lookup

name

The name of a place or area of interest. See https://developer.yahoo.com/boss/geo/docs/address-formats.html#poi-aoi-names

line1

First line of address (street address or intersection).

line2

Second line of address (city-state-zip in US).

line3

Third line of address (postal code in UK).

house

House number.

street

Street name.

unittype

Unit type, such as apartment (Apt) or suite Ste.

unit

Unit/suite/apartment/box number.

xstreet

Cross street name.

postal

Postal code.

neighborhood

Yahoo's "Level 4 Administrative name." If used, city, county, state, and country should also be specified.

city

Yahoo's "Level 3 Administrative name." If used, county, state, and country should also be specified.

county

Yahoo's "Level 2 Administrative name." If used, state, and country should also be specified.

state

Yahoo's "Level 1 Administrative name." If used, country should also be specified.

country

Yahoo's "Level 0 Administrative name" or country code.

woeid

An integer representing a "Where on Earth ID." See https://developer.yahoo.com/geo/geoplanet/guide/concepts.html#woeids

reverse

TRUE if reverse geocoding (looking up a location by its latitude and longitude).

locale

The language and country. A two-letter ISO-639 major language code and a two-letter ISO-3166-1 alpha-2 country code, separated by either a hyphen or underscore. Default is en_US (English/US).

flags

The flags parameter to pass through to the YDN query. See https://developer.yahoo.com/boss/geo/docs/control-parameters.html.

gflags

The gflags parameter to pass through to the YDN query. See https://developer.yahoo.com/boss/geo/docs/control-parameters.html. R will be added if reverse=TRUE. "J" is always added.

commercial

If FALSE (the default), will use the YQL interface to Yahoo's geo.placefinder table to do the geocoding. This API is currently restricted to 2,000 queries per day per app and is intended for non-commercial usage. If TRUE, it will use the proper BOSS APIs directly. The commercial API is better documented and appears to occasionally return better results.

key

The Yahoo! Developer Network BOSS application key. Register for an API key at https://developer.yahoo.com/boss/

secret

The Yahoo! Developer Network BOSS application secret

Details

For details about the various parameters that can be sent and, see https://developer.yahoo.com/boss/geo/docs/address-formats.html#fully-parsed-format. Information about formats can be found here: https://developer.yahoo.com/boss/geo/docs/address-formats.html#fully-parsed-format.

There are charges associated with the use of this function set by your Yahoo! BOSS application. See https://info.yahoo.com/legal/us/yahoo/boss/pricing/ for pricing details.

Value

A dataframe with all results. See https://developer.yahoo.com/boss/geo/docs/supported_responses.html for a description of what each field means.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## Not run: 
find_place("151 3rd St., San Francisco, CA", commercial=TRUE)
find_place("151 3rd St., San Francisco, CA", commercial=FALSE)
find_place(name="Yosimete National Park")
find_place(line1="Franklin St at Broadway St, San Francisco, CA, USA 94109")
find_place(house="151", street="3rd St.", postal=94103, city="San Francisco",
  state="CA", country="USA")
find_place(location="37.787082+-122.400929", reverse=TRUE)

## End(Not run)

trestletech/rydn documentation built on May 31, 2019, 7:49 p.m.