wdsAPI: API WDS

Description Usage Arguments Details Value Author(s) Examples

Description

Information retrieval from WDS webservices

Usage

1
2
3
4
5
6
wdsAPI(dataset = stop("'dataset' must be provided"), query = FALSE,
  curl = NULL, ...)

wdsDFtoXTS(data = stop("'data' must be provided"))

wdsChangeDates(str)

Arguments

data

a data frame created with wdsAPI

str

a character string with WDS dates, e.g. "2001"

Details

Retrieve information from WDS data API in csv format.

Value

The wdsAPI function creates an URL with with the specified parameters, retrieves the zip file, extracts a csv file that is read into R and returned as data frame. wdsDFtoXTS converts the returned data frame to an xts object.

Author(s)

Bo Werth <bo.werth@gmail.com>

Examples

1
2
3
4
5
6
7
## Not run: 
data.df <- wdsAPI(dataset = "2810027")

## convert to xts object, e.g. for use in \code{dygraphs} package
data.xts <- wdsDFtoXTS(data = data.df)

## End(Not run)

bowerth/nsoApi documentation built on June 17, 2019, 4:55 a.m.