osem_box: Get a single senseBox by its ID

Description Usage Arguments Value See Also Examples

Description

Get a single senseBox by its ID

Usage

1
osem_box(boxId, endpoint = osem_endpoint(), cache = NA)

Arguments

boxId

A string containing a senseBox ID

endpoint

The URL of the openSenseMap API instance

cache

Whether to cache the result, defaults to false. If a valid path to a directory is given, the response will be cached there. Subsequent identical requests will return the cached data instead.

Value

A sensebox data.frame containing a box in each row

See Also

openSenseMap API documentation (web)

osem_phenomena

osem_boxes

osem_clear_cache

Examples

1
2
3
4
5
6
7
8
9
  # get a specific box by ID
  b = osem_box('57000b8745fd40c8196ad04c')

  # get a specific box by ID from a custom (selfhosted) openSenseMap API
  b = osem_box('51030b8725fd30c2196277da', 'http://api.my-custom-osem.com')

  # get a specific box by ID and cache the response, in order to provide
  # reproducible results in the future.
  b = osem_box('51030b8725fd30c2196277da', cache = tempdir())

opensensmapr documentation built on May 2, 2019, 2:58 p.m.