categories: Return the name and category ID of all categories, or...

View source: R/core-categories.R

categoriesR Documentation

Return the name and category ID of all categories, or categories which satisfy a filter

Description

A category describes a type of place, such as "movie theater" or "zoo". The places service has over 1,000 categories (or types) of place. The categories fall into ten general groups: Arts and Entertainment, Business and Professional Services, Community and Government, Dining and Drinking, Events, Health and Medicine, Landmarks and Outdoors, Retail, Sports and Recreation, and Travel and Transportation.

Usage

categories(
  search_text = NULL,
  icon = NULL,
  language = NULL,
  token = arc_token()
)

Arguments

search_text

Default NULL. Free search text for places against names, categories etc. Must be a scalar value.

icon

Default NULL. Must be one of "svg", "png" "cim". Determines whether icons are returned and the type of icon to use with a place or category.

language

Optional case-sensitive parameter to specify the preferred language to.

token

an object of class httr2_token as generated by auth_code() or related function

Details

The categories are organized into a hierarchical system where a general category contains many more detailed variations on the parent category. For example: "Travel and Transportation" (Level 1), "Transport Hub" (Level 2), "Airport" (Level 3) and "Airport Terminal" (Level 4). The hierarchy has up to 5 levels of categories.

Value

A data.frame with columns:

  • category_id: the unique identifier for the category

  • full_label: a list of character vectors containing all labels for the category

  • icon_url: a character vector containing the icon URL if present

  • parents: a list of character vectors containing the parent category_id values

References

API Documentation

Examples

## Not run: 
categories("Coffee Shop")

## End(Not run)

arcgisplaces documentation built on May 29, 2024, 12:08 p.m.