business_match: Match a business

Description Usage Arguments Value References Examples

View source: R/business-match.R

Description

Find a business, when you have precise info like name and address.

Usage

1
2
3
4
5
business_match(name, city, state, country, address1 = NULL,
  address2 = NULL, address3 = NULL, latitude = NULL,
  longitude = NULL, phone = NULL, zip_code = NULL,
  yelp_business_id = NULL, match_threshold = c("default", "none"),
  access_token = Sys.getenv("YELP_ACCESS_TOKEN", NA))

Arguments

name

A string giving the name of the business.

city

A string giving the city where the business is located.

state

A string giving the ISO 3166-2 state code where the business is located. See ISO_3166_2_CODES.

country

A string giving the ISO 3166-2 country code where the business is located. See ISO_3166_2_CODES.

address1

A string giving the address where the business is located. Optional, but strongly recommended, especially when using match_threshold = "default".

address2

A string giving the address where the business is located.

address3

A string giving the address where the business is located.

latitude

A number representing the latitude to search close to.

longitude

A number representing the longitude to search close to.

phone

A string representing a phone number. This should include the country code and consist of a plus sign followed by only digits, for example "+1234567890".

zip_code

A string giving the zip or postal code where the business is located.

yelp_business_id

A string describing the Yelp ID of a business, as returned by business_search.

match_threshold

By default, matches are filtered rather strictly. If you don't get any results, try setting this to "none".

access_token

A string giving an access token to authenticate the API call. See get_access_token.

Value

A data frame with 13 columns. Each row corresponds to one business.

References

https://www.yelp.com/developers/documentation/v3/business_match

Examples

1
2
3
## Marked as don't test because an access token is needed
walmart <- business_match("Walmart", "Albany", "NY", "US", "Washington Ave")
if(interactive()) View(walmart) else str(walmart)

richierocks/yelp documentation built on May 3, 2019, 4:08 p.m.