mw: Retrieve Data from mesowest

Description Usage Arguments Details Value Examples

View source: R/functions.R

Description

Retrieve Data from mesowest

Usage

1
mw(service, jsonsimplify = TRUE, ...)

Arguments

service

character representing api service (e.g. 'metadata', 'timeseries')

jsonsimplify

Should json results be compacted to a data.frame if possible (default = TRUE)

...

parameters in the mesowest api corresponding to service (https://synopticlabs.org/api/explore/)

Details

If a request with nested lists (eg. climate variables per station) is made, the station metadata will be an awkward dataframe. It is suggested in this case to use jsonsimplify=FALSE.

Value

List of data from JSON response

Examples

1
2
3
4
# Station metadata is a data.frame
mw( 'metadata', complete=1, stid=c('COOPTEEA3','mtmet'))
# Station metadata is a list
mw( 'metadata', complete=1,sensorvars=1, stid=c('COOPTEEA3','mtmet'))

fickse/mesowest documentation built on Sept. 3, 2019, 8:36 p.m.