sdmx_table: Import data from SDMX

View source: R/sdmx_table.R

sdmx_tableR Documentation

Import data from SDMX

Description

Function that reads STATcube data from an sdmx archive - a zip file consisting of structure.xml with metadata and dataset.xml for the values.

Usage

sdmx_table(file)

Arguments

file

a "sdmx archive" file that was downloaded from STATcube.

Value

An object of class sc_data

Note

sdmx_table() should be treated as experimental for now.

Examples

x <- sdmx_table(system.file("sdmx/dedemo.zip", package = "STATcubeR"))
# print and tabulate
x
x$tabulate()
# explore hierarchies
nuts2 <- x$field("C-B00-0")
data.frame(label = nuts2$label,
  parent = nuts2$label[match(nuts2$parent, nuts2$code)])
# extract more data from the raw xml
xml2::xml_find_first(x$xml$meta, ".//Name")

STATcubeR documentation built on April 3, 2025, 7:31 p.m.