Package 'SpiGesXML'

Title: Extract data from SpiGes XML files
Description: Provide functions to extract data from SpiGes XML files.
Authors: Felix Luginbuhl [aut, cre] , Hedwig Prey [aut], Fachstelle für Statistik Kanton St.Gallen [cph, fnd]
Maintainer: Felix Luginbuhl <[email protected]>
License: GPL (>= 3)
Version: 0.0.6
Built: 2024-11-16 06:06:04 UTC
Source: https://github.com/SwissStatsR/SpiGesXML

Help Index


Get SpiGes node as dataframe

Description

Return a tibble/dataframe of a SpiGes node name. By default, all variables are returned. Variables can be selected using the 'variables' argument.

Usage

spiges_get_df(x, node, variables = NULL, schema_xsd = "latest", force = FALSE)

Arguments

x

A string, a connection, or a raw vector. See xml2::read_xml

node

Name of the node as string, see get_node_names

variables

Name of the variables, by default returns all variables

schema_xsd

URL of an XSD schema version, by default "latest" version.

force

default FALSE. If TRUE, returns data even if validation error.

Value

data.frame/tibble


Get node names available for data extraction of a SpiGes XML

Description

Return main and children node names of an SpiGes XML. The node names "Unternehmen", "Standort", "Fall", "Kantonsdaten" are removed as the function spiges_get_df() doesn't provide support to extract their related data.

Usage

spiges_get_name_nodes(x)

Arguments

x

A string, a connection, or a raw vector. See xml2::read_xml

Value

vector of node names


List of official variable names by node

Description

Return a list containing the list of the variables names for each SpiGes XML. The names of the list are equivalent of the node names returned by

Usage

spiges_get_name_variables(schema_xsd)

Arguments

schema_xsd

XSD schema file

Details

Source file: https://www.bfs.admin.ch/bfs/de/home/statistiken/gesundheit/gesundheitswesen/projekt-spiges.assetdetail.28127962.html

Value

a list of variable names