Skip to contents

Returns a list containing

  1. full path to Access database,

  2. table name,

  3. name of timestamp field,

  4. name of parameter field

for the table that contains data of parameter parName, measured at monitoring point moniPoint in data quality level qua.level.

Usage

hsDataSource(
  qua.level = NULL,
  moniPoint = NULL,
  parName,
  kind = "q",
  owner = "KWB",
  dbg = FALSE
)

Arguments

qua.level

data quality level ("r" = raw, "v" = validated, "c" = calibrated)

moniPoint

name of monitoring point, e.g. "STA", "TEG", "MUE"

parName

name of parameter, e.g. "AFS", "CSB", "CSBf"

kind

kind of data: "q" = water quality, "h" = hydraulic data, "r" = rain

owner

owner of the data, one of "KWB", "SEN", "BWB"

dbg

whether to show debug messages or not

Value

Returns a list with the following named elements:

  1. mdb: full path to Access database,

  2. tbl: table name,

  3. tsField: name of timestamp field,

  4. parField: name of parameter field

Examples

# Get source information of validated data of parameter AFS from Stallstr. 
si <- hsDataSource("v", "STA", "AFS")
si 
#> $mdb
#> [1] "/miacso$/Daten/ACCESS/KwbMonitoring/2VAL/KWB_STA_VAL.mdb"
#> 
#> $tbl
#> [1] "KWB_STA_ScanPar_AFS_VAL"
#> 
#> $tsField
#> [1] "myDateTime"
#> 
#> $parField
#> [1] "AFS_A"
#> 
# ouput:
#  $db
#  [1] "//moby/miacso$/Daten/ACCESS/KwbMonitoring/2VAL/KWB_STA_VAL.mdb"
# 
#  $tbl
#  [1] "KWB_STA_ScanPar_AFS_VAL"
# 
#  $tsfield
#  [1] "myDateTime"
# 
#  $parfield
#  [1] "AFS_A"

# Access the pieces of information with the $ operator:
si$mdb # [1] "//moby/miacso$/Daten/ACCESS/KwbMonitoring/2VAL/KWB_STA_VAL.mdb"
#> [1] "/miacso$/Daten/ACCESS/KwbMonitoring/2VAL/KWB_STA_VAL.mdb"
si$tbl # [1] "KWB_STA_ScanPar_AFS_VAL"
#> [1] "KWB_STA_ScanPar_AFS_VAL"