get_hystreet_station_data {hystReet}R Documentation

Get data from a specific location from the Hystreet Project via Hystreet API

Description

Get data from a specific location from the Hystreet Project via Hystreet API

Usage

get_hystreet_station_data(
  hystreetId = NULL,
  query = NULL,
  no_metadata = FALSE,
  API_token = NULL
)

Arguments

hystreetId

integer (required): ID of the requested station. See get_hystreet_locations() for an overview of available IDs.

query

list (optional): A list with queries. Up do date the following queries are supported:

  • from: datetime of earliest measurement (default: today 00:00:00:): e.g. "2018-10-01 12:00:00" or "2018-10-01"

  • to : datetime of latest measurement (default: today 23:59:59): e.g. "2018-01-12 12:00:00" or "2018-12-01"

  • resolution: Resolution for the measurement grouping (default: hour): "day", "hour", "month", "week"

no_metadata

logical (optional): If set to TRUE, the result contains no meta data but only a clean data frame with the measurements of the requested station. Defaults to FALSE.

API_token

character (optional): API key to get access to Hystreet API

Value

data.frame with parsed data from hystreet API

Function version

0.0.3

Author(s)

Johannes Friedrich, Yannik Buhl

Examples

## Not run: 
## request data of the current day of station with hystreetId 71
get_hystreet_station_data(71)

## request data of December 2018 with resolution "day"
get_hystreet_station_data(
   hystreetId = 71, 
   query = list(from = "2018-12-01", to = "2018-12-31", resolution = "day"))
 
## End(Not run)

[Package hystReet version 0.0.3 Index]