mc_read_tubedb {myClim}R Documentation

Reading data from TubeDB

Description

Function is reading data from TubeDB (https://environmentalinformatics-marburg.github.io/tubedb/) into myClim object.

Usage

mc_read_tubedb(
  tubedb,
  region = NULL,
  plot = NULL,
  sensor_ids = NULL,
  clean = TRUE,
  silent = FALSE,
  aggregation = "raw",
  quality = "no",
  ...
)

Arguments

tubedb

object for connection to server see rTubeDB::TubeDB

region

vector of TubeDB region ids - see rTubeDB::query_regions (default NULL)

Regions are used mainly for loading metadata from TubeDB localities.

plot

vector of localities ids see rTubeDB::query_region_plots rTubeDB::query_timeseries (default NULL)

If plot is NULL, then all localities are loaded from whole region.

sensor_ids

list in format list(tubedb_sensor_name=myClim_sensor_name) (default NULL) If sensor names in TubeDB match the default sensor names in myClim, then the value is detected automatically.

clean

if TRUE, then mc_prep_clean is called automatically while reading (default TRUE)

silent

if TRUE, then any information is not printed in console (default FALSE)

aggregation

parameter used in function rTubeDB::query_timeseries (default raw)

quality

parameter used in function rTubeDB::query_timeseries (default no)

...

other parameters from function rTubeDB::query_timeseries

Details

In case you store your microclimatic time-series in TubeDB, you can read data with TubeDB API into myClim object. You need to know database URL, username and password.

Value

myClim object in Raw-format

Examples

# Not run: To retrieve data from TubeDB, a running TubeDB server with a user account
#          and a secret password is required.
## Not run: 
tubedb <- TubeDB(url="server", user="user", password="password")
data <- mc_read_tubedb(tubedb, region="ckras", plot=c("TP_KAR_19", "TP_KODA_61"))

## End(Not run)

[Package myClim version 1.1.0 Index]