Information retrieval from PX-Web webservices

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"

Value

Convert data frame retrieved by get_pxweb_data into xts object.

Details

Retrieve information from PX-Web data APIs.

Examples

# 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)
# }