readsdmx

Build Status CRAN Status

Read sdmx data into R dataframes from either a local SDMX-ML file or from a SDMX web-service:

u <-
  "https://stats.oecd.org/restsdmx/sdmx.ashx/GetData/HH_DASH/..Q"
d <- readsdmx::read_sdmx(u)

The RapidXML C++ library is used to parse the data.

Install

devtools::install_github("mdequeljoe/readsdmx")

Data messages

The follow data message types are supported:

Benchmark

For the above example (locally):

download.file(u, path <- tempfile(fileext = ".xml"), quiet = TRUE)
microbenchmark::microbenchmark(
  readsdmx = readsdmx::read_sdmx(path),
  rsdmx = as.data.frame(rsdmx::readSDMX(path, FALSE)),
  times = 5L,
  unit = "s"
)

#> Unit: seconds
#>      expr    min     lq   mean median     uq    max neval
#>  readsdmx  0.158  0.164  0.176  0.166  0.176  0.217     5
#>     rsdmx 26.321 26.992 30.762 30.757 34.341 35.397     5

rsdmx