Overview

{arcgisplaces} is an R package to interface with ArcGIS Places Service.

The places service is a ready-to-use location service that can search for businesses and geographic locations around the world. It allows you to find, locate, and discover detailed information about each place.

In order to use {arcgisplaces} you will need an ArcGIS Developers account. Get started here.

Installation

{arcgisplaces} can be installed directly from CRAN using

install.packages("arcgisplaces")

Usage

The Places service enables you to find points of interest (POI) based on a location or a bounding box as well as filter your results based on a category or search text.

Finding places:

  • near_point(): search for places near a location.
  • within_extent(): search for places within an extent.
  • place_details(): get detailed information about the places returned from near_point() or within_extent().
    • Note: see fields for the possible attributes to return for place details.

Understanding categories:

  • categories(): find categories by name or ID.

  • category_details(): get detailed information about the categories returned from categories().

  • Find place attributes such as name, address, description, opening hours, price ratings, user ratings, and social links.

Examples

arcgisutils is needed for authentication. The Places API supports either using an API key via auth_key() or one generated via OAuth2 using either auth_client() or auth_code(). See API documentation for more.

library(arcgisutils)
library(arcgisplaces)

# Authenticate with a Developer Account API Key
token <- auth_key()
set_arc_token(token)