pxwebAPI: API PX-Web

Description Usage Arguments Details Value Author(s) Examples

Description

Information retrieval from PX-Web webservices

Usage

1
2
3
pxwebDFtoXTS(data = stop("'data' must be provided"))

pxwebChangeDates(str)

Arguments

data

a data frame created with get_pxweb_data

str

a character string with PXWEB dates, e.g. "2000", "2000K1", "2000M01"

Details

Retrieve information from PX-Web data APIs.

Value

Convert data frame retrieved by get_pxweb_data into xts object.

Author(s)

Bo Werth <bo.werth@gmail.com>

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
## Not run: 
dims_list <- list(SNI2007 = c('*'),
                  Transaktionspost = c('*'),
                  ContentsCode = c('*'),
                  Tid = c('*'))
req.uri <- "http://api.scb.se/OV0104/v1/doris/en/ssd"
data.df <- pxweb::get_pxweb_data(url = req.uri, dims = dims_list, clean = TRUE)

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

## End(Not run)

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