getMvbData: Retrieve MVB-data from the LifeWatch project

View source: R/lwdataFunctions.R

getMvbDataR Documentation

Retrieve MVB-data from the LifeWatch project

Description

Retrieves the Meetnet Vlaams Banken (MVB) data from the LifeWatch project. Without valid credentials you are only allowed to view the "Tide TAW" parameter for the last 30 days, grouped by day/hour. To get an account, register via the Lifewatch RShiny registration webpage.

Usage

getMvbData(
  startdate,
  stopdate,
  parameters,
  stations = NULL,
  by,
  calc,
  usr = NULL,
  pwd = NULL,
  params = FALSE,
  ...
)

Arguments

startdate

Starting date for the query. Without a login, this is restricted to the last month

stopdate

Stopping date for the query. Without a login, this is restricted to the last month

parameters

One (or list) of the $parameter in listMvbStations.

stations

List of stations to be included in the query. See listMvbStations. Use stations="All" or stations=NULL to get all stations.

by

Time grouping for calculation, one of ('day','hour', '10min' ,'none')

calc

Calculation to perform given time grouping, one of ('avg', 'max', 'min', 'none').

usr

Username to connect to database

pwd

Password to connect to database

params

If TRUE, returns a list with the dataset and the query parameters applied in the server side. IF FALSE returns only the data.

...

Reserved for internal use.

Value

Dataframe with the specified MVB data.

Examples

getMvbData(Sys.Date() - 30, Sys.Date() + 1, parameters = 'Tide TAW',
stations = "Nieuwpoort", by = "day", calc = "avg")
getMvbData(Sys.Date() - 30, Sys.Date() + 1, parameters = 'Tide TAW',
stations = "Blankenberge", by = "hour", calc = "max", params = TRUE)

lifewatch/lwdataexplorer documentation built on Aug. 24, 2024, 12:35 a.m.