| Title: | Tools for Reading SDMX Data and Metadata |
|---|---|
| Description: | Set of classes and methods to read data and metadata documents exchanged through the Statistical Data and Metadata Exchange (SDMX) framework, currently focusing on the SDMX XML standard format (SDMX-ML). |
| Authors: | Emmanuel Blondel [aut, cre] (ORCID: <https://orcid.org/0000-0002-5870-5762>), Matthieu Stigler [ctb] (ORCID: <https://orcid.org/0000-0002-6802-4290>), Eric Persson [ctb] |
| Maintainer: | Emmanuel Blondel <[email protected]> |
| License: | GPL (>= 2) |
| Version: | 0.6-6 |
| Built: | 2026-05-28 10:04:38 UTC |
| Source: | https://github.com/eblondel/rsdmx |
function that allows configuring a new SDMXServiceProvider as part of the list of providers known by rsdmx, hence by readSDMX
addSDMXServiceProvider(provider)addSDMXServiceProvider(provider)
provider |
an object of class "SDMXServiceProvider" |
Emmanuel Blondel, [email protected]
getSDMXServiceProviders findSDMXServiceProvider readSDMX
#create a provider myBuilder <- SDMXREST20RequestBuilder(regUrl = "http://www.myorg.org/registry", repoUrl = "http://www.myorg.org/repository", compliant = TRUE) myProvider <- SDMXServiceProvider( agencyId = "MYORG", name = "My Organization", builder = myBuilder ) #add it addSDMXServiceProvider(myProvider) #check out the list of existing provider (only list the agency Ids) sapply(slot(getSDMXServiceProviders(), "providers"), function(x){slot(x, "agencyId")})#create a provider myBuilder <- SDMXREST20RequestBuilder(regUrl = "http://www.myorg.org/registry", repoUrl = "http://www.myorg.org/repository", compliant = TRUE) myProvider <- SDMXServiceProvider( agencyId = "MYORG", name = "My Organization", builder = myBuilder ) #add it addSDMXServiceProvider(myProvider) #check out the list of existing provider (only list the agency Ids) sapply(slot(getSDMXServiceProviders(), "providers"), function(x){slot(x, "agencyId")})
function used to find a specific namespace within the available namespaces of an SDMX-ML object
findNamespace(namespaces, messageType)findNamespace(namespaces, messageType)
namespaces |
object of class |
messageType |
object of class |
an object of class "character" giving the namespace uri if found in the available namespaces
findNamespace is a function used internally as utility function in
SDMX-ML object parsers.
Emmanuel Blondel, [email protected]
function that allows searching by provider id in the list of known SDMXServiceProvider. This function can be used for interrogating the list of default providers known by rsdmx, and is used internally by readSDMX
findSDMXServiceProvider(agencyId)findSDMXServiceProvider(agencyId)
agencyId |
an object of class "character" representing a provider identifier |
an object of class "SDMXServiceProvider" (or NULL if no matching)
Emmanuel Blondel, [email protected]
getSDMXServiceProviders addSDMXServiceProvider readSDMX
#find OECD provider oecd.provider <- findSDMXServiceProvider("OECD")#find OECD provider oecd.provider <- findSDMXServiceProvider("OECD")
Access the namespaces of the SDMX-ML object
getNamespaces(obj) ## S4 method for signature 'SDMX' getNamespaces(obj)getNamespaces(obj) ## S4 method for signature 'SDMX' getNamespaces(obj)
obj |
An object deriving from class "SDMX" |
an object of class data.frame giving the id and uri for each
of the namespaces handled in the SDMX-ML document.
Emmanuel Blondel, [email protected]
function used to extract the SDMX-ML message from a registry interface query
getRegistryInterfaceResult(xmlObj)getRegistryInterfaceResult(xmlObj)
xmlObj |
object of class "XMLInternalDocument derived from XML package |
an object of class "XMLInternalDocument derived from XML package
getRegistryInterfaceResult is a function used internally by readSDMX
Emmanuel Blondel, [email protected]
function used to get the list of SDMXServiceProvider known by rsdmx (hence known by readSDMX to query data or metadata in an easier way). This function can be easily used to interrogate the list of known providers, and eventually consider adding one at runtime with addSDMXServiceProvider
getSDMXServiceProviders()getSDMXServiceProviders()
an object of class "list" (of SDMXServiceProvider)
Emmanuel Blondel, [email protected]
addSDMXServiceProvider findSDMXServiceProvider readSDMX
function used to extract the SDMX-ML message from a SOAP request response
getSoapRequestResult(xmlObj)getSoapRequestResult(xmlObj)
xmlObj |
object of class "XMLInternalDocument derived from XML package |
an object of class "XMLInternalDocument derived from XML package
getSoapRequestResult is a function used internally by readSDMX
Emmanuel Blondel, [email protected]
getStructureType
getStructureType(obj) ## S4 method for signature 'SDMXStructureType' getStructureType(obj)getStructureType(obj) ## S4 method for signature 'SDMXStructureType' getStructureType(obj)
obj |
object of class "SDMX" |
function used to detect if the XML document corresponds to a registry interface query
isRegistryInterfaceEnvelope(xmlObj, nativeRoot)isRegistryInterfaceEnvelope(xmlObj, nativeRoot)
xmlObj |
object of class "XMLInternalDocument derived from XML package |
nativeRoot |
object of class "logical" indicating if it is the native document |
an object of class "logical"
isRegistryInterfaceEnvelope is a function used internally by readSDMX
Emmanuel Blondel, [email protected]
function used to detect if the XML document corresponds to a SOAP request response
isSoapRequestEnvelope(xmlObj, namespaces)isSoapRequestEnvelope(xmlObj, namespaces)
xmlObj |
object of class "XMLInternalDocument derived from XML package |
namespaces |
object of class "data.frame" given the list of namespace URIs |
an object of class "logical"
isSoapRequestEnvelope is a function used internally by readSDMX
Emmanuel Blondel, [email protected]
readSDMX is the main function to use to read SDMX data
readSDMX(file = NULL, isURL = TRUE, isRData = FALSE, provider = NULL, providerId = NULL, providerKey = NULL, agencyId = NULL, resource = NULL, resourceId = NULL, version = NULL, flowRef = NULL, key = NULL, key.mode = "R", start = NULL, end = NULL, dsd = FALSE, headers = list(), validate = FALSE, references = NULL, verbose = !is.null(logger), logger = "INFO", ...)readSDMX(file = NULL, isURL = TRUE, isRData = FALSE, provider = NULL, providerId = NULL, providerKey = NULL, agencyId = NULL, resource = NULL, resourceId = NULL, version = NULL, flowRef = NULL, key = NULL, key.mode = "R", start = NULL, end = NULL, dsd = FALSE, headers = list(), validate = FALSE, references = NULL, verbose = !is.null(logger), logger = "INFO", ...)
file |
path to SDMX-ML document that needs to be parsed |
isURL |
a value of class "logical" either the path is an url, and data
has to be downloaded from a SDMXweb-repository. Default value is TRUE.
Ignored in case |
isRData |
a value of class "logical" either the path is local RData file
handling an object of class "SDMX", previously saved with |
provider |
an object of class "SDMXServiceProvider". If specified,
|
providerId |
an object of class "character" representing a provider id.
It has to be match a default provider as listed in |
providerKey |
an object of class "character" giving a key to authenticate for the given provider endpoint. Some providers may require an authentication or subscription key to perform SDMX requests. |
agencyId |
an object of class "character representing an agency id, for which data should be requested (from a particular service provider) |
resource |
an object of class "character" giving the SDMX service request resource to query e.g. "data". Recognized if a valid provider or provide id has been specified as argument. |
resourceId |
an object of class "character" giving a SDMX service resource Id, e.g. the id of a data structure |
version |
an object of class "character" giving a SDMX resource version, e.g. the version of a dataflow. |
flowRef |
an object of class "character" giving the SDMX flow ref id. Recognized if valid provider or provide id has been specified as argument. |
key |
an object of class "character" or "list" giving the SDMX data key/filter
to apply. Recognized if a valid provider or provide id has been specified as argument.
If |
key.mode |
an object of class "character" indicating if the |
start |
an object of class "integer" or "character" giving the SDMX start time to apply. Recognized if a valid provider or provide id has been specified as argument. |
end |
an object of class "integer" or "character" giving the SDMX end time to apply. Recognized if a valid provider or provide id has been specified as argument. |
dsd |
an Object of class "logical" if an attempt to inherit the DSD should be performed.
Active only if |
headers |
an object of class "list" that contains any additional headers for the request. |
validate |
an object of class "logical" indicating if a validation check has to be performed on the SDMX-ML document to check its SDMX compliance when reading it. Default is FALSE. |
references |
an object of class "character" giving the instructions to return (or not) the artefacts referenced by the artefact to be returned. |
verbose |
an Object of class "logical" that indicates if rsdmx logs should
appear to user. Default is set to |
logger |
reports if a logger has to be used to print log messages. Default is |
... |
(any other parameter to pass to httr::GET request) |
an object of class "SDMX"
Emmanuel Blondel, [email protected]
# SDMX datasets #-------------- ## Not run: # Not run # (local dataset examples) #with SDMX 2.0 tmp <- system.file("extdata","Example_Eurostat_2.0.xml", package="rsdmx") sdmx <- readSDMX(tmp, isURL = FALSE) stats <- as.data.frame(sdmx) head(stats) #with SDMX 2.1 tmpnew <- system.file("extdata","Example_Eurostat_2.1.xml", package="rsdmx") sdmx <- readSDMX(tmpnew, isURL = FALSE) stats <- as.data.frame(sdmx) head(stats) ## End(**Not run**) ## End(Not run) ## Not run: # Not run by 'R CMD check' # (reliable remote datasource but with possible occasional unavailability) #examples using embedded providers sdmx <- readSDMX(providerId = "OECD", resource = "data", flowRef = "MIG", key = list("TOT", NULL, NULL), start = 2011, end = 2011) stats <- as.data.frame(sdmx) head(stats) #examples using 'file' argument #using url (Eurostat REST SDMX 2.1) url <- paste("http://ec.europa.eu/eurostat/SDMX/diss-web/rest/data/", "cdh_e_fos/all/?startperiod=2000&endPeriod=2010", sep = "") sdmx <- readSDMX(url) stats <- as.data.frame(sdmx) head(stats) ## End(**Not run**) ## End(Not run) # SDMX DataStructureDefinition (DSD) #----------------------------------- ## Not run: # Not run by 'R CMD check' # (reliable remote datasource but with possible occasional unavailability) #using embedded providers dsd <- readSDMX(providerId = "OECD", resource = "datastructure", resourceId = "WATER_ABSTRACT") #get codelists from DSD cls <- slot(dsd, "codelists") codelists <- sapply(slot(cls,"codelists"), slot, "id") #get list of codelists #get a codelist codelist <- as.data.frame(cls, codelistId = "CL_WATER_ABSTRACT_SOURCE") #get concepts from DSD concepts <- as.data.frame(slot(dsd, "concepts")) ## End(**Not run**) ## End(Not run)# SDMX datasets #-------------- ## Not run: # Not run # (local dataset examples) #with SDMX 2.0 tmp <- system.file("extdata","Example_Eurostat_2.0.xml", package="rsdmx") sdmx <- readSDMX(tmp, isURL = FALSE) stats <- as.data.frame(sdmx) head(stats) #with SDMX 2.1 tmpnew <- system.file("extdata","Example_Eurostat_2.1.xml", package="rsdmx") sdmx <- readSDMX(tmpnew, isURL = FALSE) stats <- as.data.frame(sdmx) head(stats) ## End(**Not run**) ## End(Not run) ## Not run: # Not run by 'R CMD check' # (reliable remote datasource but with possible occasional unavailability) #examples using embedded providers sdmx <- readSDMX(providerId = "OECD", resource = "data", flowRef = "MIG", key = list("TOT", NULL, NULL), start = 2011, end = 2011) stats <- as.data.frame(sdmx) head(stats) #examples using 'file' argument #using url (Eurostat REST SDMX 2.1) url <- paste("http://ec.europa.eu/eurostat/SDMX/diss-web/rest/data/", "cdh_e_fos/all/?startperiod=2000&endPeriod=2010", sep = "") sdmx <- readSDMX(url) stats <- as.data.frame(sdmx) head(stats) ## End(**Not run**) ## End(Not run) # SDMX DataStructureDefinition (DSD) #----------------------------------- ## Not run: # Not run by 'R CMD check' # (reliable remote datasource but with possible occasional unavailability) #using embedded providers dsd <- readSDMX(providerId = "OECD", resource = "datastructure", resourceId = "WATER_ABSTRACT") #get codelists from DSD cls <- slot(dsd, "codelists") codelists <- sapply(slot(cls,"codelists"), slot, "id") #get list of codelists #get a codelist codelist <- as.data.frame(cls, codelistId = "CL_WATER_ABSTRACT_SOURCE") #get concepts from DSD concepts <- as.data.frame(slot(dsd, "concepts")) ## End(**Not run**) ## End(Not run)
RSDMX is a package to parse/read SDMX documents in R. It provides: - a set of classes and methods to read data and metadata documents exchanged through theStatistical Data and Metadata Exchange (SDMX) framework. The package currently focuses on the SDMX XML standard format (SDMX-ML). - an web-service interface to well-known SDMX data providers
Emmanuel Blondel [email protected]
Useful links:
Report bugs at https://github.com/eblondel/rsdmx/issues
rsdmxLogger
Object for modelling a simple logger
INFO(text)Logger to report information. Used internally
WARN(text)Logger to report warnings. Used internally
ERROR(text)Logger to report errors. Used internally
Logger class used internally by rsdmx
saveSDMX is the function to save R SDMX object
saveSDMX(sdmxObj, file)saveSDMX(sdmxObj, file)
sdmxObj |
an object of class |
file |
a connection or the name of the file where the R object is saved to |
Emmanuel Blondel, [email protected]
sdmx <- system.file("extdata","Example_Eurostat_2.0.xml", package="rsdmx") sf <- tempfile(fileext = ".rda") saveSDMX(sdmx, sf)sdmx <- system.file("extdata","Example_Eurostat_2.0.xml", package="rsdmx") sf <- tempfile(fileext = ".rda") saveSDMX(sdmx, sf)
An abstract class from which SDMX classes are derived
SDMX(xmlObj, namespaces)SDMX(xmlObj, namespaces)
xmlObj |
object of class "XMLInternalDocument derived from XML package |
namespaces |
object of class "data.frame" given the list of namespace URIs |
an object of class "SDMX"
xmlObjObject of class "XMLInternalDocument" derived from XML package
schemaObject of class "SDMXSchema", handles the version of SDMX-ML format
headerObject of class "SDMXHeader", handles the SDMX-ML document header
footerObject of class "SDMXFooter", handles the SDMX-ML document footer
This class is not useful in itself, but all SDMX classes in this package derive from it.
Currently, the approach drafted in rsdmx package was to rely on XML package, read the xml object and store it as part of the SDMX R object. Another approach being investigated is to use XML handlers throughthe Simple API for XML (SAX) that could avoid to load the full XML tree in the SDMX R object (xmlObj). Indeed, SDMX data could be huge and causes issues of memory if the complete XML tree is loaded in the R user session.
@author Emmanuel Blondel, [email protected]
A basic class to handle a SDMX Concept
SDMXAgency(xmlObj, namespaces)SDMXAgency(xmlObj, namespaces)
xmlObj |
object of class "XMLInternalDocument derived from XML package |
namespaces |
object of class "data.frame" given the list of namespace URIs |
an object of class "SDMXAgency"
Emmanuel Blondel, [email protected]
A basic abstract class to handle a SDMXAgencyScheme
SDMXAgencyScheme(xmlObj, namespaces)SDMXAgencyScheme(xmlObj, namespaces)
xmlObj |
object of class "XMLInternalDocument derived from XML package |
namespaces |
object of class "data.frame" given the list of namespace URIs |
an object of class "SDMXAgencyScheme"
idObject of class "character" giving the ID of the concept scheme (required)
agencyIDObject of class "character" giving the AgencyID
versionObject of class "character" giving the version
uriObject of class "character" giving the concept uri
urnObject of class "character" giving the concept urn
isExternalReferenceObject of class "logical" indicating if the concept scheme is an external reference
isFinalObject of class "logical" indicating if the concept scheme is final
validFromObject of class "character" indicating the start validity period
validToObject of class "character" indicating the end validity period
NameObject of class "list" giving the agency scheme name (by language) - required
DescriptionObject of class "list" giving the agency scheme description (by language)
agenciesobject of class "list" giving the list of SDMXAgency
Emmanuel Blondel, [email protected]
A basic class to handle a SDMX Attribute
SDMXAttribute(xmlObj, namespaces)SDMXAttribute(xmlObj, namespaces)
xmlObj |
object of class "XMLInternalDocument derived from XML package |
namespaces |
object of class "data.frame" given the list of namespace URIs |
an object of class "SDMXAttribute"
conceptRefObject of class "character" giving the attribute conceptRef (required)
conceptVersionObject of class "character" giving the attribute concept version
conceptAgencyObject of class "character" giving the attribute concept agency
conceptSchemeRefObject of class "character" giving the attribute conceptScheme ref
conceptSchemeAgencyObject of class "character" giving the attribute conceptScheme agency
codelistObject of class "character" giving the codelist ref name
codelistVersionObject of class "character" giving the codelist ref version
codelistAgencyObject of class "character" giving the codelist ref agency
attachmentLevelObject of class "character" giving the attachment level (e.g. DataSet)
assignmentStatusObject of class "character" giving the assignment status (e.g. Mandatory)
isTimeFormatObject of class "logical"
crossSectionalAttachDatasetObject of class "logical"
crossSectionalAttachGroupObject of class "logical"
crossSectionalAttachSectionObject of class "logical"
crossSectionalAttachObservationObject of class "logical"
isEntityAttributeObject of class "logical" indicating if the Attribute is an entity Attribute. Default value is FALSE
isNonObservationTimeAttributeObject of class "logical" indicating if the Attribute is a non-observation Attribute. Default value is FALSE
isCountAttributeObject of class "logical" indicating if the Attribute is a count Attribute. Default value is FALSE
isFrequencyAttributeObject of class "logical" indicating if the Attribute is a frequency Attribute. Default value is FALSE
isIdentityAttributeObject of class "logical" indicating if the Attribute is an identity Attribute. Default value is FALSE
This class is not useful in itself, but all SDMX non-abstract classes will encapsulate it as slot, when parsing an SDMX-ML document (DataStructures, or DataStructureDefinitions)
Emmanuel Blondel, [email protected]
A basic class to handle a SDMX Code
SDMXCode(xmlObj, namespaces)SDMXCode(xmlObj, namespaces)
xmlObj |
object of class "XMLInternalDocument derived from XML package |
namespaces |
object of class "data.frame" given the list of namespace URIs |
an object of class "SDMXCode"
idObject of class "character" giving the ID of the code (required). In SDMX 2.0 documents, this slot will handle the 'value' attribute
urnObject of class "character" giving the code urn
parentCodeObject of class "character" giving the parent code
labelObject of class "list" giving the code label (by language). In SDMX 2.0, it takes the code 'Description' element vs. 'Name' element in SDMX 2.1. This property deprecated and kept now for backward compatibility.
nameObject of class "list" giving the code name (by language).
descriptionObject of class "list" giving the code description (by language).
This class is not useful in itself, but all SDMX non-abstract classes will encapsulate it as slot, when parsing an SDMX-ML document (Codelists, or DataStructureDefinition)
Emmanuel Blondel, [email protected]
A basic class to handle a SDMX Codelist
SDMXCodelist(xmlObj, namespaces)SDMXCodelist(xmlObj, namespaces)
xmlObj |
object of class "XMLInternalDocument derived from XML package |
namespaces |
object of class "data.frame" given the list of namespace URIs |
an object of class "SDMXCodelist"
idObject of class "character" giving the ID of the codelist (required)
agencyIDObject of class "character" giving the AgencyID
versionObject of class "character" giving the version
uriObject of class "character" giving the codelist uri
urnObject of class "character" giving the codelist urn
isExternalReferenceObject of class "logical" indicating if the codelist is an external reference
isFinalObject of class "logical" indicating if the codelist is final
validFromObject of class "character" indicating the start validity period
validToObject of class "character" indicating the end validity period
NameObject of class "list" giving the codelist (by language) - required
DescriptionObject of class "list" giving the codelist description (by language)
CodeObject of class "list" giving the list of "SDMXCode" objects included in the codelist (see SDMXCode)
This class is not useful in itself, but all SDMX non-abstract classes will encapsulate it as slot, when parsing an SDMX-ML document (Codelists, or DataStructureDefinition)
Emmanuel Blondel, [email protected]
A basic class to handle SDMX Codelists
SDMXCodelists(xmlObj, namespaces)SDMXCodelists(xmlObj, namespaces)
xmlObj |
object of class "XMLInternalDocument derived from XML package |
namespaces |
object of class "data.frame" given the list of namespace URIs |
an object of class "SDMXCodelists"
codelistsObject of class "list" giving the list of "SDMXCodelist"
This class is not useful in itself, but SDMXDataStructureDefinition objects will encapsulate it as slot, when parsing an SDMX-ML document.
Emmanuel Blondel, [email protected]
A basic class to handle a SDMX-ML compact data set
SDMXCompactData(xmlObj, namespaces)SDMXCompactData(xmlObj, namespaces)
xmlObj |
object of class "XMLInternalDocument derived from XML package |
namespaces |
object of class "data.frame" given the list of namespace URIs |
an object of class "SDMXCompactData"
Emmanuel Blondel, [email protected]
A basic class to handle SDMX Components
SDMXComponents(xmlObj, namespaces)SDMXComponents(xmlObj, namespaces)
xmlObj |
object of class "XMLInternalDocument derived from XML package |
namespaces |
object of class "data.frame" given the list of namespace URIs |
an object of class "SDMXComponents"
DimensionsObject of class "list" giving the list of dimensions (see SDMXDimension)
TimeDimensionObject of class "SDMXTimeDimension"
PrimaryMeasureObject of class "SDMXPrimaryMeasure"
AttributesObject of class "list" giving the list of attributes (see SDMXAttribute)
This class is not useful in itself, but all SDMX non-abstract classes will encapsulate it as slot, when parsing an SDMX-ML document (DataStructures, or DataStructureDefinitions)
Emmanuel Blondel, [email protected]
A basic class to handle a SDMX Concept
SDMXConcept(xmlObj, namespaces)SDMXConcept(xmlObj, namespaces)
xmlObj |
object of class "XMLInternalDocument derived from XML package |
namespaces |
object of class "data.frame" given the list of namespace URIs |
an object of class "SDMXConcept"
idObject of class "character" giving the ID of the concept (required)
agencyIDObject of class "character" giving the AgencyID
versionObject of class "character" giving the concept version
uriObject of class "character" giving the concept uri
urnObject of class "character" giving the concept urn
isExternalReferenceObject of class "logical" indicating if the concept is an external reference
coreRepresentationObject of class "character" giving the core representation
coreRepresentationAgencyObject of class "character" giving the core representation agency
parentObject of class "character" giving the concept parent
parentAgencyObject of class "character" giving the parentAgency
NameObject of class "list" giving the concept name (by language) - required
DescriptionObject of class "list" giving the concept description (by language)
This class is not useful in itself, but all SDMX non-abstract classes will encapsulate it as slot, when parsing an SDMX-ML document (Concepts, or DataStructureDefinition)
Emmanuel Blondel, [email protected]
A basic class to handle SDMX Concepts
SDMXConcepts(xmlObj, namespaces)SDMXConcepts(xmlObj, namespaces)
xmlObj |
object of class "XMLInternalDocument derived from XML package |
namespaces |
object of class "data.frame" given the list of namespace URIs |
an object of class "SDMXConcepts"
conceptsObject of class "list" giving the list of "SDMXConcept". This slot is available to ensure backward compatibility with SDMX 1.0 in SDMX 2.0 or 2.1 documents
conceptSchemesObject of class "list" giving the list of "SDMXConceptScheme", which will encapsulate the list of "SDMXConcept" (defined from SDMX 2.0)
This class is not useful in itself, but all SDMX non-abstract classes will encapsulate it as slot, when parsing an SDMX-ML document (Concepts, or DataStructureDefinition)
Emmanuel Blondel, [email protected]
A basic class to handle a SDMX Concept scheme
SDMXConceptScheme(xmlObj, namespaces)SDMXConceptScheme(xmlObj, namespaces)
xmlObj |
object of class "XMLInternalDocument derived from XML package |
namespaces |
object of class "data.frame" given the list of namespace URIs |
an object of class "SDMXConceptScheme"
idObject of class "character" giving the ID of the concept scheme (required)
agencyIDObject of class "character" giving the AgencyID
versionObject of class "character" giving the version
uriObject of class "character" giving the concept uri
urnObject of class "character" giving the concept urn
isExternalReferenceObject of class "logical" indicating if the concept scheme is an external reference
isFinalObject of class "logical" indicating if the concept scheme is final
validFromObject of class "character" indicating the start validity period
validToObject of class "character" indicating the end validity period
NameObject of class "list" giving the concept scheme name (by language) - required
DescriptionObject of class "list" giving the concept scheme description (by language)
ConceptObject of class "list" giving the list of "SDMXConcept" objects (see SDMXConcept)
This class is not useful in itself, but all SDMX non-abstract classes will encapsulate it as slot, when parsing an SDMX-ML document (Concepts, or DataStructureDefinition)
Emmanuel Blondel, [email protected]
A basic class to handle a SDMX-ML cross sectional data set
SDMXCrossSectionalData(xmlObj, namespaces)SDMXCrossSectionalData(xmlObj, namespaces)
xmlObj |
object of class "XMLInternalDocument derived from XML package |
namespaces |
object of class "data.frame" given the list of namespace URIs |
an object of class "SDMXCrossSectionalData"
Emmanuel Blondel, [email protected]
An abstract class from which SDMX Data classes are derived
SDMXData(xmlObj, namespaces)SDMXData(xmlObj, namespaces)
xmlObj |
object of class "XMLInternalDocument derived from XML package |
namespaces |
object of class "data.frame" given the list of namespace URIs |
an object of class "SDMXData"
dsdRefObject of class "character" giving the DSD Reference
dsdObject of class "SDMXDataStructureDefinition"
This class is not useful in itself, but all SDMX Data classes in this package derive from it.
@author Emmanuel Blondel, [email protected]
A basic class to handle a SDMX DataFlow
SDMXDataFlow(xmlObj, namespaces)SDMXDataFlow(xmlObj, namespaces)
xmlObj |
object of class "XMLInternalDocument derived from XML package |
namespaces |
object of class "data.frame" given the list of namespace URIs |
an object of class "SDMXDataFlow"
idObject of class "character" giving the ID (required)
agencyIDObject of class "character" giving the AgencyID
versionObject of class "character" giving the version
uriObject of class "character" giving the uri
urnObject of class "character" giving the urn
isExternalReferenceObject of class "logical" indicating if the dataflow is an external reference
isFinalObject of class "logical" indicating if the dataflow is final
validFromObject of class "character" indicating the start validity period
validToObject of class "character" indicating the end validity period
NameObject of class "list" giving the dataflow (by available language) - required
DescriptionObject of class "list" giving the dataflow description (by available language)
dsdRefObject of class "character" giving the reference datastructure Id
dsdObject of class "SDMXDataStructureDefinition"
This class is not useful in itself, but all SDMX non-abstract classes will encapsulate it as slot, when parsing an SDMX-ML document (Concepts, or DataStructureDefinition)
Emmanuel Blondel, [email protected]
A basic class to handle a SDMX DataFlows
SDMXDataFlows(xmlObj, namespaces)SDMXDataFlows(xmlObj, namespaces)
xmlObj |
object of class "XMLInternalDocument derived from XML package |
namespaces |
object of class "data.frame" given the list of namespace URIs |
an object of class "SDMXDataFlows"
dataflowsObject of class "list" giving the list of DataFlows (datasets), (see SDMXDataFlow)
This class is not useful in itself, but all SDMX non-abstract classes will encapsulate it as slot, when parsing an SDMX-ML document (Concepts, or DataStructureDefinition)
Emmanuel Blondel, [email protected]
A basic class to handle a SDMX DataStructure (or KeyFamily)
SDMXDataStructure(xmlObj, namespaces)SDMXDataStructure(xmlObj, namespaces)
xmlObj |
object of class "XMLInternalDocument derived from XML package |
namespaces |
object of class "data.frame" given the list of namespace URIs |
an object of class "SDMXDataStructure"
idObject of class "character" giving the ID (required)
agencyIDObject of class "character" giving the AgencyID
versionObject of class "character" giving the version
uriObject of class "character" giving the uri
urnObject of class "character" giving the urn
isExternalReferenceObject of class "logical" indicating if the datastructure / keyfamily is an external reference
isFinalObject of class "logical" indicating if the datastructure / keyfamily is final
validFromObject of class "character" indicating the start validity period
validToObject of class "character" indicating the end validity period
NameObject of class "list" giving the codelist (by language) - required
DescriptionObject of class "list" giving the codelist description (by language)
ComponentsObject of class "SDMXComponents" (see SDMXComponents)
This class is not useful in itself, but all SDMX non-abstract classes will encapsulate it as slot, when parsing an SDMX-ML document (Concepts, or DataStructureDefinition)
Emmanuel Blondel, [email protected]
A basic class to handle a SDMX DataStructureDefinition (DSD)
SDMXDataStructureDefinition(xmlObj, namespaces)SDMXDataStructureDefinition(xmlObj, namespaces)
xmlObj |
object of class "XMLInternalDocument derived from XML package |
namespaces |
object of class "data.frame" given the list of namespace URIs |
an object of class "SDMXDataStructureDefinition"
organisationSchemesObject of class "SDMXOrganisationSchemes" giving the list of agencies (see SDMXAgencyScheme and SDMXAgency)
conceptsObject of class "SDMXConcepts" giving the list of concepts or conceptSchemes (see SDMXConcepts)
codelistsObject of class "SDMXCodelists" giving the list of codelists (see SDMXCodelists)
datastructuresObject of class "SDMXDataStructures" giving the list of datastructures /key families (see SDMXDataStructures)
This class is not useful in itself, but all SDMX non-abstract classes will encapsulate it as slot, when parsing an SDMX-ML document (Concepts, or DataStructureDefinition)
Emmanuel Blondel, [email protected]
A basic class to handle a SDMX DataStructures (or KeyFamilies)
SDMXDataStructures(xmlObj, namespaces)SDMXDataStructures(xmlObj, namespaces)
xmlObj |
object of class "XMLInternalDocument derived from XML package |
namespaces |
object of class "data.frame" given the list of namespace URIs |
an object of class "SDMXDataStructures"
datastructuresObject of class "list" giving the list of DataStructures, (see SDMXDataStructure)
This class is not useful in itself, but all SDMX non-abstract classes will encapsulate it as slot, when parsing an SDMX-ML document (Concepts, or DataStructureDefinition)
Emmanuel Blondel, [email protected]
A basic class to handle a SDMX Dimension
SDMXDimension(xmlObj, namespaces)SDMXDimension(xmlObj, namespaces)
xmlObj |
object of class "XMLInternalDocument derived from XML package |
namespaces |
object of class "data.frame" given the list of namespace URIs |
an object of class "SDMXDimension"
conceptRefObject of class "character" giving the dimension conceptRef (required)
conceptVersionObject of class "character" giving the dimension concept version
conceptAgencyObject of class "character" giving the dimension concept agency
conceptSchemeRefObject of class "character" giving the dimension conceptScheme ref
conceptSchemeAgencyObject of class "character" giving the dimension conceptScheme agency
codelistObject of class "character" giving the codelist ref name
codelistVersionObject of class "character" giving the codelist ref version
codelistAgencyObject of class "character" giving the codelist ref agency
isMeasureDimensionObject of class "logical" indicating if the dimension is a measure dimension. Default value is FALSE
isFrequencyDimensionObject of class "logical" indicating if the dimension is a frequency dimension. Default value is FALSE
isEntityDimensionObject of class "logical" indicating if the dimension is an entity dimension. Default value is FALSE
isCountDimensionObject of class "logical" indicating if the dimension is a count dimension. Default value is FALSE
isNonObservationTimeDimensionObject of class "logical" indicating if the dimension is a non-observation dimension. Default value is FALSE
isIdentityDimensionObject of class "logical" indicating if the dimension is an identity dimension. Default value is FALSE
crossSectionalAttachDatasetObject of class "logical"
crossSectionalAttachGroupObject of class "logical"
crossSectionalAttachSectionObject of class "logical"
crossSectionalAttachObservationObject of class "logical"
This class is not useful in itself, but all SDMX non-abstract classes will encapsulate it as slot, when parsing an SDMX-ML document (Concepts, or DataStructureDefinition)
Emmanuel Blondel, [email protected]
A experimental class to handle a SDMX DotStat (*.Stat) service request builder
SDMXDotStatRequestBuilder(regUrl, repoUrl, accessKey = NULL, formatter = NULL, unsupportedResources = list(), skipProviderId = FALSE, forceProviderId = FALSE, headers = list())SDMXDotStatRequestBuilder(regUrl, repoUrl, accessKey = NULL, formatter = NULL, unsupportedResources = list(), skipProviderId = FALSE, forceProviderId = FALSE, headers = list())
regUrl |
an object of class "character" giving the base Url of the SDMX service registry |
repoUrl |
an object of class "character" giving the base Url of the SDMX service repository |
accessKey |
an object of class "character" indicating the name of request parameter for which an authentication or subscription user key (token) has to be provided to perform requests |
formatter |
an object of class "list" giving a formatting function (for each resource) that takes an object of class "SDMXRequestParams" as single argument. Such parameter allows to customize eventual params (e.g. specific data provider rules) |
unsupportedResources |
an object of class "list" giving eventual unsupported REST resources. Default is an empty list object |
skipProviderId |
an object of class "logical" indicating that the provider agencyId should be skipped. Used to control lack of strong SDMX REST compliance from data providers. For now, it applies only for the "data" resource. |
forceProviderId |
an object of class "logical" indicating if the provider
agencyId has to be added at the end of the request. Default value is
|
headers |
an object of class "list" that contains any additional headers for the request. |
regUrlan object of class "character" giving the base Url of the SDMX service registry
repoUrlan object of class "character" giving the base Url of the SDMX service repository
accessKeyan object of class "character" indicating the name of request parameter for which an authentication or subscription user key/token has to be provided to perform requests
compliantan object of class "logical" indicating if the request builder is somehow compliant with a service specification
This class is not useful in itself, but all SDMX non-abstract classes will encapsulate it as slot, when parsing an SDMX-ML document.
Internal class
Emmanuel Blondel, [email protected]
A basic class to handle a SDMX-ML Generic data set
SDMXGenericData(xmlObj, namespaces)SDMXGenericData(xmlObj, namespaces)
xmlObj |
object of class "XMLInternalDocument derived from XML package |
namespaces |
object of class "data.frame" given the list of namespace URIs |
an object of class "SDMXGenericData"
This class is not useful in itself, but all SDMX non-abstract classes will encapsulate it as slot, when parsing an SDMX-ML document.
Emmanuel Blondel, [email protected]
A basic class to handle the header of a SDMX-ML document
SDMXHeader(xmlObj, namespaces)SDMXHeader(xmlObj, namespaces)
xmlObj |
object of class "XMLInternalDocument derived from XML package |
namespaces |
object of class "data.frame" given the list of namespace URIs |
an object of class "SDMXHeader"
IDObject of class "character" giving the ID of the SDMX-ML document
TestObject of class "logical" indicating if the SDMX-ML document is disseminated for test purpose
TruncatedObject of class "logical" indicating if the SDMX-ML document is truncated
NameObject of class "character" giving the name of SDMX-ML document
SenderObject of class "list" giving the id of the sender and eventually its in name, possibly in multi-languages
ReceiverObject of class "list" giving the id of the receiver and eventually its in name, possibly in multi-languages
PreparedObject of class "POSIXlt" giving the preparation date of the SDMX-ML document
ExtractedObject of class "POSIXlt" giving the extraction date of the SDMX-ML document
ReportingBeginObject of class "POSIXlt" giving the reporting begin date for the data retrieved in the SDMX-ML document
ReportingEndObject of class "POSIXlt" giving the reporting end date for the data retrieved in the SDMX-ML document
SourceObject of class "character" giving the source of the SDMX-ML document
This class is not useful in itself, but all SDMX non-abstract classes will encapsulate it as slot, when parsing an SDMX-ML document
Some SDMXHeader properties are not yet supported and thus not available as "slots". These are "KeyFamilyRef", "KeyFamilyAgency", "DataSetAgency", "DataSetID", "DataSetAction".
Emmanuel Blondel, [email protected]
A basic abstract class to handle a SDMXItemScheme
This class is not useful in itself, but all SDMX non-abstract "scheme" classes should implement it. Added for the sake of complying with the SDMX information structure model
Emmanuel Blondel, [email protected]
A basic class to handle a SDMX-ML MessageGroup data set
SDMXMessageGroup(xmlObj, namespaces)SDMXMessageGroup(xmlObj, namespaces)
xmlObj |
object of class "XMLInternalDocument derived from XML package |
namespaces |
object of class "data.frame" given the list of namespace URIs |
an object of class "SDMXMessageGroup"
This class is not useful in itself, but all SDMX non-abstract classes will encapsulate it as slot, when parsing an SDMX-ML document.
Emmanuel Blondel, [email protected]
A basic class to handle a SDMX Concept
SDMXOrganisation(xmlObj, namespaces)SDMXOrganisation(xmlObj, namespaces)
xmlObj |
object of class "XMLInternalDocument derived from XML package |
namespaces |
object of class "data.frame" given the list of namespace URIs |
an object of class "SDMXOrganisation"
idObject of class "character" giving the ID of the concept (required)
uriObject of class "character" giving the concept uri
urnObject of class "character" giving the concept urn
NameObject of class "list" giving the organisation name (by language) - required
DescriptionObject of class "list" giving the organisation description (by language)
This class is not useful in itself, but other classes such as SDMXAgency will implement it.
Emmanuel Blondel, [email protected]
A basic abstract class to handle a SDMXOrganisationScheme
This class is implemented in both SDMX 2.0 and 2.1. In the latter, it is extended by other specific classes such as AgencyScheme, DataConsumerScheme, DataProviderScheme and OrganisationUnitScheme. rsdmx covers the support in SDMX 2.1
Emmanuel Blondel, [email protected]
A basic class to handle a SDMX OrganisationSchemes
SDMXOrganisationSchemes(xmlObj, namespaces)SDMXOrganisationSchemes(xmlObj, namespaces)
xmlObj |
object of class "XMLInternalDocument derived from XML package |
namespaces |
object of class "data.frame" given the list of namespace URIs |
an object of class "OrganisationSchemes"
organisationSchemesObject of class "list" giving the list of SDMXAgencyScheme
This class is not useful in itself, but all SDMX non-abstract classes will encapsulate it as slot, when parsing an SDMX-ML document
Emmanuel Blondel, [email protected]
A basic class to handle a SDMX PrimaryMeasure
SDMXPrimaryMeasure(xmlObj, namespaces)SDMXPrimaryMeasure(xmlObj, namespaces)
xmlObj |
object of class "XMLInternalDocument derived from XML package |
namespaces |
object of class "data.frame" given the list of namespace URIs |
an object of class "SDMXPrimaryMeasure"
conceptRefObject of class "character" giving the dimension conceptRef (required)
conceptVersionObject of class "character" giving the dimension concept version
conceptAgencyObject of class "character" giving the dimension concept agency
conceptSchemeRefObject of class "character" giving the dimension conceptScheme ref
conceptSchemeAgencyObject of class "character" giving the dimension conceptScheme agency
codelistObject of class "character" giving the codelist ref name
codelistVersionObject of class "character" giving the codelist ref version
codelistAgencyObject of class "character" giving the codelist ref agency
This class is not useful in itself, but all SDMX non-abstract classes will encapsulate it as slot, when parsing an SDMX-ML document.
Emmanuel Blondel, [email protected]
A basic class to handle a SDMX service request builder
SDMXRequestBuilder(regUrl, repoUrl, accessKey = NULL, formatter, handler, compliant, unsupportedResources = list(), headers = list())SDMXRequestBuilder(regUrl, repoUrl, accessKey = NULL, formatter, handler, compliant, unsupportedResources = list(), headers = list())
regUrl |
an object of class "character" giving the base Url of the SDMX service registry |
repoUrl |
an object of class "character" giving the base Url of the SDMX service repository |
accessKey |
an object of class "character" indicating the name of request parameter for which an authentication or subscription user key/token has to be provided to perform requests |
formatter |
an object of class "list" giving a formatting function (for each resource) that takes an object of class "SDMXRequestParams" as single argument. Such parameter allows to customize eventual params (e.g. specific data provider rules) |
handler |
an object of class "list" that will be in charge of build a web request. |
compliant |
an object of class "logical" indicating if the request builder is somehow compliant with a service specification |
unsupportedResources |
an object of class "list" giving one or more resources not supported by the Request builder for a given provider |
headers |
an object of class "list" that contains any additional headers for the request. |
The handler function will list the resource methods. Each method will accept a
single object of class SDMXRequestParams as argument. This object will
give the different request params as slots (baseUrl, agencyId, resource, resourceId,
version, flowRef, key, start, end, compliant) to build the output (a string representing
the web request to build).
The rsdmx package will as much as possible try to handler generic handlers. At now, the available embedded builders are: SDMXREST20RequestBuilder (connector for SDMX 2.0 web-services), SDMXREST21RequestBuilder (connector for SDMX 2.1 web-services), SDMXDotStatRequestBuilder (connector for SDMX .Stat web-services implementations)
regUrlan object of class "character" giving the base Url of the SDMX service registry
repoUrlan object of class "character" giving the base Url of the SDMX service repository
accessKeyan object of class "character" indicating the name of request parameter for which an authentication or subscription user key/token has to be provided to perform requests
formatteran object of class "list" giving a formatting function (for each resource) that takes an object of class "SDMXRequestParams" as single argument. Such parameter allows to customize eventual params (e.g. specific data provider rules)
handleran object of class "list" that will be in charge of build a web request.
compliantan object of class "logical" indicating if the request builder is somehow compliant with a service specification
unsupportedResourcesan object of class "character" giving one or more resources not supported by the Request builder for a given provider
headersan object of class "list" that contains any additional headers for the request.
This class is not useful in itself, but all SDMX non-abstract classes will encapsulate it as slot, when parsing an SDMX-ML document (Concepts, or DataStructureDefinition)
Emmanuel Blondel, [email protected]
#default formatter myFormatter = list( dataflow = function(obj){ #format some obj slots here return(obj) }, datastructure = function(obj){ #format some obj slots here return(obj) }, data = function(obj){ #format some obj slots here return(obj) } ) #an handler #where each element of the list is a function taking as argument an object #of class "SDMXRequestParams" myHandler <- list( "dataflow" = function(obj){return(obj@regUrl)}, "datastructure" = function(obj){return(obj@regUrl)}, "data" = function(obj){return(obj@repoUrl)} ) #how to create a SDMXRequestBuilder requestBuilder <- SDMXRequestBuilder( regUrl = "http://www.myorg.org/registry", repoUrl = "http://www.myorg.org/repository", accessKey = NULL, formatter = myFormatter, handler = myHandler, compliant = FALSE)#default formatter myFormatter = list( dataflow = function(obj){ #format some obj slots here return(obj) }, datastructure = function(obj){ #format some obj slots here return(obj) }, data = function(obj){ #format some obj slots here return(obj) } ) #an handler #where each element of the list is a function taking as argument an object #of class "SDMXRequestParams" myHandler <- list( "dataflow" = function(obj){return(obj@regUrl)}, "datastructure" = function(obj){return(obj@regUrl)}, "data" = function(obj){return(obj@repoUrl)} ) #how to create a SDMXRequestBuilder requestBuilder <- SDMXRequestBuilder( regUrl = "http://www.myorg.org/registry", repoUrl = "http://www.myorg.org/repository", accessKey = NULL, formatter = myFormatter, handler = myHandler, compliant = FALSE)
A class to handle a SDMX service request params
SDMXRequestParams(regUrl, repoUrl, accessKey, providerId, agencyId, resource, resourceId, version, flowRef, key, start, end, references = NULL, compliant)SDMXRequestParams(regUrl, repoUrl, accessKey, providerId, agencyId, resource, resourceId, version, flowRef, key, start, end, references = NULL, compliant)
regUrl |
an object of class "character" giving the base Url of the SDMX service registry |
repoUrl |
an object of class "character" giving the base Url of the SDMX service repository |
accessKey |
an oject of class "character" giving the eventual authentication or subscription user key (or token) to provide in order to perform the SDMX request. This key may be mandatory for some service providers. |
providerId |
an object of class "character" giving the provider agency id |
agencyId |
an object of class "character" giving an agency id |
resource |
an object of class "character" giving the type of resource to be queried |
resourceId |
an object of class "character" giving the resource to be queried |
version |
an object of class "character" giving the resource version |
flowRef |
an object of class "character" giving the flowRef to be queried |
key |
an object of class "character" giving the key (SDMX url formatted) to be used for the query |
start |
an object of class "character" giving the start time |
end |
an object of class "character" giving the end time |
references |
an object of class "character" giving the instructions to return (or not) the artefacts referenced by the artefact to be returned |
compliant |
an object of class "logical" indicating if the web-service is compliant with the SDMX REST web-service specifications |
regUrlan object of class "character" giving the base Url of the SDMX service registry
repoUrlan object of class "character" giving the base Url of the SDMX service repository
accessKeyan object of class "character" indicating the name of request parameter for which an authentication or subscription user key/token has to be provided to perform requests
providerIdan object of class "character" giving the provider agency Id
agencyIdan object of class "character" giving an agency Id
resourcean object of class "character" giving the type of resource to be queried
resourceIdan object of class "character" giving the resource to be queried
versionan object of class "character" giving the resource version
flowRefan object of class "character" giving the flowRef to be queried
keyan object of class "character" giving the key (SDMX url formatted) to be used for the query
startan object of class "character" giving the start time
endan object of class "character" giving the end time
referencesan object of class "character" giving the instructions to return (or not) the artefacts referenced by the artefact to be returned
compliantan object of class "logical" indicating if the web-service is compliant with the SDMX REST web-service specifications
This class is not useful in itself, but all SDMX non-abstract classes will encapsulate it as slot, when parsing an SDMX-ML document.
Emmanuel Blondel, [email protected]
#how to create a SDMXRequestParams object params <- SDMXRequestParams( regUrl = "", repoUrl ="", accessKey = NULL, providerId = "", agencyId ="", resource = "data", resourceId = "", version = "", flowRef = "", key = NULL, start = NULL, end = NULL, references = NULL, compliant = FALSE )#how to create a SDMXRequestParams object params <- SDMXRequestParams( regUrl = "", repoUrl ="", accessKey = NULL, providerId = "", agencyId ="", resource = "data", resourceId = "", version = "", flowRef = "", key = NULL, start = NULL, end = NULL, references = NULL, compliant = FALSE )
A experimental class to handle a SDMX 2.0 service request builder
SDMXREST20RequestBuilder(regUrl, repoUrl, accessKey = NULL, formatter, compliant, unsupportedResources = list(), skipProviderId = FALSE, forceProviderId = FALSE, headers = list())SDMXREST20RequestBuilder(regUrl, repoUrl, accessKey = NULL, formatter, compliant, unsupportedResources = list(), skipProviderId = FALSE, forceProviderId = FALSE, headers = list())
regUrl |
an object of class "character" giving the base Url of the SDMX service registry |
repoUrl |
an object of class "character" giving the base Url of the SDMX service repository |
accessKey |
an object of class "character" indicating the name of request parameter for which an authentication or subscription user key/token has to be provided to perform requests |
formatter |
an object of class "list" giving a formatting function (for each resource) that takes an object of class "SDMXRequestParams" as single argument. Such parameter allows to customize eventual params (e.g. specific data provider rules) |
compliant |
an object of class "logical" indicating if the web-service is compliant with the SDMX REST web-service specifications |
unsupportedResources |
an object of class "list" giving eventual unsupported REST resources. Default is an empty list object |
skipProviderId |
an object of class "logical" indicating that the provider agencyIdshould be skipped. Used to control lack of strong SDMX REST compliance from data providers. For now, it applies only for the "data" resource. |
forceProviderId |
an object of class "logical" indicating if the provider
agencyId has to be added at the end of the request. Default value is
|
headers |
an object of class "list" that contains any additional headers for the request. |
regUrlan object of class "character" giving the base Url of the SDMX service registry
repoUrlan object of class "character" giving the base Url of the SDMX service repository
accessKeyan object of class "character" indicating the name of request parameter for which an authentication or subscription user key/token has to be provided to perform requests
compliantan object of class "logical" indicating if the web-service is compliant with the SDMX REST web-service specifications
This class is not useful in itself, but all SDMX non-abstract classes will encapsulate it as slot, when parsing an SDMX-ML document.
Emmanuel Blondel, [email protected]
#how to create a SDMXREST20RequestBuilder requestBuilder <- SDMXREST20RequestBuilder( regUrl = "http://www.myorg/registry", repoUrl = "http://www.myorg/repository", compliant = FALSE)#how to create a SDMXREST20RequestBuilder requestBuilder <- SDMXREST20RequestBuilder( regUrl = "http://www.myorg/registry", repoUrl = "http://www.myorg/repository", compliant = FALSE)
A experimental class to handle a SDMX 2.1 service request builder
SDMXREST21RequestBuilder(regUrl, repoUrl, accessKey = NULL, formatter = NULL, compliant, unsupportedResources = list(), skipProviderId = FALSE, forceProviderId = FALSE, skipTrailingSlash = FALSE, headers = list())SDMXREST21RequestBuilder(regUrl, repoUrl, accessKey = NULL, formatter = NULL, compliant, unsupportedResources = list(), skipProviderId = FALSE, forceProviderId = FALSE, skipTrailingSlash = FALSE, headers = list())
regUrl |
an object of class "character" giving the base Url of the SDMX service registry |
repoUrl |
an object of class "character" giving the base Url of the SDMX service repository |
accessKey |
an object of class "character" indicating the name of request parameter for which an authentication or subscription user key/token has to be provided to perform requests |
formatter |
an object of class "list" giving a formatting function (for each resource) that takes an object of class "SDMXRequestParams" as single argument. Such parameter allows to customize eventual params (e.g. specific data provider rules) |
compliant |
an object of class "logical" indicating if the web-service is compliant with the SDMX REST web-service specifications |
unsupportedResources |
an object of class "list" giving eventual unsupported REST resources. Default is an empty list object |
skipProviderId |
an object of class "logical" indicating that the provider agencyIdshould be skipped. Used to control lack of strong SDMX REST compliance from data providers. For now, it applies only for the "data" resource. |
forceProviderId |
an object of class "logical" indicating if the provider
agencyId has to be added at the end of the request. Default value is
|
skipTrailingSlash |
Avoid to use a trailing slash at the end of the requests.
Default is |
headers |
an object of class "list" that contains any additional headers for the request. |
regUrlan object of class "character" giving the base Url of the SDMX service registry
repoUrlan object of class "character" giving the base Url of the SDMX service repository
accessKeyan object of class "character" indicating the name of request parameter for which an authentication or subscription user key/token has to be provided to perform requests
compliantan object of class "logical" indicating if the web-service is compliant with the SDMX REST web-service specifications
This class is not useful in itself, but all SDMX non-abstract classes will encapsulate it as slot, when parsing an SDMX-ML document.
Emmanuel Blondel, [email protected]
#how to create a SDMXREST21RequestBuilder requestBuilder <- SDMXREST21RequestBuilder( regUrl = "http://www.myorg/registry", repoUrl = "http://www.myorg/repository", compliant = TRUE)#how to create a SDMXREST21RequestBuilder requestBuilder <- SDMXREST21RequestBuilder( regUrl = "http://www.myorg/registry", repoUrl = "http://www.myorg/repository", compliant = TRUE)
A basic class to handle the version of the SDMX-ML Schema
SDMXSchema(xmlObj, namespaces)SDMXSchema(xmlObj, namespaces)
xmlObj |
object of class "XMLInternalDocument derived from XML package |
namespaces |
object of class "data.frame" given the list of namespace URIs |
an object of class "SDMXSchema"
versionObject of class "character" giving the SDMX-ML schema version
this class is not useful in itself, but all SDMX non-abstract classes will encapsulate it as slot, when parsing an SDMX-ML document.
Emmanuel Blondel, [email protected]
A basic class to handle a SDMX service provider
SDMXServiceProvider(agencyId, name, scale, country, builder)SDMXServiceProvider(agencyId, name, scale, country, builder)
agencyId |
an object of class "character" giving the a provider identifier |
name |
an object of class "character" giving the name of the provider |
scale |
an object of class "character" giving the scale of the datasource, either "international" or "national". Default value is "international". |
country |
an object of class "character" giving the ISO 3-alpha code of
the country (if scale is "national"). Default value is |
builder |
an object of class "SDMXRequestBuilder" that will performs the web request building for this specific provider |
an object of class "SDMXServiceProvider"
agencyIdan object of class "character" giving the a provider identifier
namean object of class "character" giving the name of the provider
scalean object of class "character" giving the scale of the datasource, either "international" or "national"
countryan object of class "character" giving the ISO 3-alpha code of the country (if scale is "national")
builderan object of class "SDMXRequestBuilder" that will performs the web request building
Emmanuel Blondel, [email protected]
#let's create a SDMXRESTRequestBuilder #(assuming that "My Organization" implements SDMX REST web-services) myBuilder <- SDMXREST20RequestBuilder(regUrl = "http://www.myorg.org/registry", repoUrl = "http://www.myorg.org/repository", compliant = TRUE) #create a SDMXServiceProvider provider <- SDMXServiceProvider(agencyId = "MYORG", name = "My Organization", builder = myBuilder)#let's create a SDMXRESTRequestBuilder #(assuming that "My Organization" implements SDMX REST web-services) myBuilder <- SDMXREST20RequestBuilder(regUrl = "http://www.myorg.org/registry", repoUrl = "http://www.myorg.org/repository", compliant = TRUE) #create a SDMXServiceProvider provider <- SDMXServiceProvider(agencyId = "MYORG", name = "My Organization", builder = myBuilder)
A class to wrap a list of SDMX service providers
SDMXServiceProviders(providers)SDMXServiceProviders(providers)
providers |
an object of class "list" (of SDMXServiceProvider) configured by default and/or at runtime in rsdmx |
an object of class "SDMXServiceProviders"
providersan object of class "list" (of SDMXServiceProvider) configured by default and/or at runtime in rsdmx
this class is not useful in itself, but all SDMX non-abstract classes will encapsulate it as slot, when parsing an SDMX-ML document.
Emmanuel Blondel, [email protected]
A basic class to handle a SDMX-ML StructureSpecificData data set
SDMXStructureSpecificData(xmlObj, namespaces)SDMXStructureSpecificData(xmlObj, namespaces)
xmlObj |
object of class "XMLInternalDocument derived from XML package |
namespaces |
object of class "data.frame" given the list of namespace URIs |
an object of class "SDMXStructureSpecificData"
This class is not useful in itself, but all SDMX non-abstract classes will encapsulate it as slot, when parsing an SDMX-ML document.
Emmanuel Blondel, [email protected]
A basic class to handle a SDMX-ML StructureSpecificTimeSeriesData data set
SDMXStructureSpecificTimeSeriesData(xmlObj, namespaces)SDMXStructureSpecificTimeSeriesData(xmlObj, namespaces)
xmlObj |
object of class "XMLInternalDocument derived from XML package |
namespaces |
object of class "data.frame" given the list of namespace URIs |
an object of class "SDMXStructureSpecificTimeSeriesData"
This class is not useful in itself, but all SDMX non-abstract classes will encapsulate it as slot, when parsing an SDMX-ML document.
Emmanuel Blondel, [email protected]
A basic class to handle the type of a SDMX-ML Structure document
SDMXStructureType(xmlObj, namespaces, resource)SDMXStructureType(xmlObj, namespaces, resource)
xmlObj |
object of class "XMLInternalDocument derived from XML package |
namespaces |
object of class "data.frame" given the list of namespace URIs |
resource |
object of class "character" giving the REST resource to be queried (required to distinguish between dataflows and datastructures in SDMX 2.0) |
an object of class "SDMXStructureType"
This class is not useful in itself, but it will be used by readSDMX to deal with SDMX-ML Structure documents.
Emmanuel Blondel, [email protected]
A basic class to handle a SDMX TimeDimension
SDMXTimeDimension(xmlObj, namespaces)SDMXTimeDimension(xmlObj, namespaces)
xmlObj |
object of class "XMLInternalDocument derived from XML package |
namespaces |
object of class "data.frame" given the list of namespace URIs |
an object of class "SDMXTimeDimension"
conceptRefObject of class "character" giving the dimension conceptRef (required)
conceptVersionObject of class "character" giving the dimension concept version
conceptAgencyObject of class "character" giving the dimension concept agency
conceptSchemeRefObject of class "character" giving the dimension conceptScheme ref
conceptSchemeAgencyObject of class "character" giving the dimension conceptScheme agency
codelistObject of class "character" giving the codelist ref name
codelistVersionObject of class "character" giving the codelist ref version
codelistAgencyObject of class "character" giving the codelist ref agency
crossSectionalAttachDatasetObject of class "logical"
crossSectionalAttachGroupObject of class "logical"
crossSectionalAttachSectionObject of class "logical"
crossSectionalAttachObservationObject of class "logical"
This class is not useful in itself, but non-abstract classes willencapsulate it as slot, when parsing an SDMX-ML document (Concepts, or DataStructureDefinition)
Emmanuel Blondel, [email protected]
A basic class to handle the type of a SDMX-ML document
SDMXType(xmlObj)SDMXType(xmlObj)
xmlObj |
object of class "XMLInternalDocument derived from XML package |
an object of class "SDMXType"
typeObject of class "character" giving the type of the SDMX-ML document
this class is not useful in itself, but all SDMX non-abstract classes will encapsulate it as slot, when parsing an SDMX-ML document.
At now, the following types have been implemented and successfully tested:
- StructureType,
- GenericDataType,
- CompactDataType,
- StructureSpecificDataType,
- CrossSectionalDataType,
- UtilityDataType,
- MessageGroupType
Emmanuel Blondel, [email protected]
A basic class to handle a SDMX-ML UtilityData data set
SDMXUtilityData(xmlObj, namespaces)SDMXUtilityData(xmlObj, namespaces)
xmlObj |
object of class "XMLInternalDocument derived from XML package |
namespaces |
object of class "data.frame" given the list of namespace URIs |
an object of class "SDMXUtilityData"
This class is not useful in itself, but all SDMX non-abstract classes will encapsulate it as slot, when parsing an SDMX-ML document.
Emmanuel Blondel, [email protected]
set the dsd slot of a SDMXData object
setDSD(obj, dsd) ## S4 method for signature 'SDMXData,SDMXDataStructureDefinition' setDSD(obj, dsd)setDSD(obj, dsd) ## S4 method for signature 'SDMXData,SDMXDataStructureDefinition' setDSD(obj, dsd)
obj |
An object deriving from class "SDMXData" |
dsd |
An object of class "SDMXDataStructureDefinition" |
the 'obj' object of class "SDMXData" enriched with the dsd
Emmanuel Blondel, [email protected]
function used internally by rsdmx, when loading the package, to set the list of SDMXServiceProvider known by rsdmx (hence known by readSDMX to query data/metadata in an easier way). For internal use only (this function does not provide any value for the end user, but it is here documented for transparency, and to explain how the package works.)
setSDMXServiceProviders()setSDMXServiceProviders()
Emmanuel Blondel, [email protected]
getSDMXServiceProviders addSDMXServiceProvider findSDMXServiceProvider readSDMX