Learn R Programming

timeseriesdb (version 1.0.0-1.1.2)

db_dataset_read_ts: Read all Time Series in a Dataset

Description

Read all Time Series in a Dataset

Usage

db_dataset_read_ts(
  con,
  datasets,
  valid_on = NULL,
  respect_release_date = FALSE,
  schema = "timeseries",
  chunksize = 10000
)

Arguments

con

RPostgres connection object.

datasets

character vector of the datasets. Dataset is a group of time series.

valid_on

character representation of a date in the form of 'YYYY-MM-DD'. valid_on selects the version of a time series that is valid at the specified time.

respect_release_date

boolean indicating if it should the release embargo of a time series be respected. Defaults to FALSE. This option makes sense when the function is used in an API. In that sense, users do not have direct access to this function and therefore cannot simply switch parameters.

schema

character name of the database schema. Defaults to 'timeseries'

chunksize

set a limit of the number of time series requested in the function.

See Also

Other time series functions: db_collection_read_ts(), db_ts_delete_latest_version(), db_ts_delete(), db_ts_get_last_update(), db_ts_read_history(), db_ts_read(), db_ts_store(), db_ts_trim_history()

Examples

Run this code
# NOT RUN {
# }
# NOT RUN {
db_dataset_create(con = connection,
                  set_name = "zrh_airport_data",
                  set_description = "Zurich airport arrivals and departures ",
                  schema = "schema")

db_ts_assign_dataset(con = connection,
                     ts_keys = c("ch.zrh_airport.departure.total",
                                 "ch.zrh_airport.arrival.total"),
                     set_name = "zrh_airport_data",
                     schema = "schema")

db_dataset_read_ts(con = connection,
                   datasets = "zrh_airport_data",
                   schema = "schema")
# }

Run the code above in your browser using DataLab