location_recognition: location_recognition

Description Usage Arguments Value

View source: R/location_recognition.R

Description

Returns a list of entities (business entities and natural points of interest) near an inputted coordinate pair using the Bing Maps Locations API For more information, please see https://docs.microsoft.com/en-us/bingmaps/rest-services/locations/location-recognition

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
location_recognition(
  lat,
  long,
  radius = 0.25,
  top = 5,
  dateTime = NULL,
  type = NULL,
  distanceUnit = "mi",
  includeEntityTypes = NULL,
  verboseplacenames = NULL
)

Arguments

lat

Latitude of the location (e.g. '37.7708' )

long

Longitude of the location (e.g. '-122.4195')

radius

Radius (using units specified in distanceUnit) in which to find locations (e.g. '1.5'), default value is 0.25, maximum is 2

top

Number of nearby entities to include (e.g. '10'), default value is 5, maximum is 20

dateTime

Only include entities open at the specified date and time (e.g. '2021-01-01 12:00:00')

type

Only include entities with the specified category types (e.g. 'EatDrink')

distanceUnit

Units used for the radius parameter (e.g. 'km' or 'mi'), default value is 'mi'

includeEntityTypes

Only include the specified entity types (e.g. 'naturalPOI')

verboseplacenames

Whether the returned location names should be represented with their official abbreviations or in expanded form (e.g. 'true' or 'false'), default value is 'false'

Value

S3 object containing the API response. Includes:
"business": Business entities returned, including their name, address, website, phone number, etc.
"naturalPOI": Natural POIs returned, including their name and type
"params": Parameters inputted into the API from the user
"response": Response object returned from httr, including the request URL, status code returned, and time of request


ericphillips99/bingmapr documentation built on March 3, 2021, 3:32 p.m.