gen_catalogue: Explore Different Objects and Their Structural Embedding in...

View source: R/gen_catalogue.R

gen_catalogueR Documentation

Explore Different Objects and Their Structural Embedding in GENESIS

Description

Function to enable searching for tables, statistics, and cubes from GENESIS. Additionally, it structures the output based on the internal tree structure of GENESIS itself based on the EVAS-numbers. Time-series are represented as cubes with a specified time span.

Usage

gen_catalogue(
  code = NULL,
  category = c("tables", "statistics", "cubes"),
  detailed = FALSE,
  sortcriterion = c("code", "content"),
  error.ignore = FALSE,
  ...
)

Arguments

code

a string with a maximum length of 10 characters. Code from a GENESIS-Object. Only one code per iteration. "*"-Notations are possible.

category

a string. Specific GENESIS-Object-types: 'tables', 'statistics', and 'cubes'. All three together are possible.

detailed

a logical. Indicator if the function should return the detailed output of the iteration including all object-related information or only a shortened output including only code and object title.

sortcriterion

a string. Indicator if the output should be sorted by 'code' or 'content'. This is a parameter of the GENESIS API call itself.

error.ignore

a logical. Indicator if the function should stop if an error occurs or no object for the request is found or if it should produce a token as response.

...

Additional parameter of the GENESIS API call. These parameters are only affecting the GENESIS API call itself, no further processing.

Value

A list with all recalled elements from GENESIS API. Based on the detailed-parameter it contains more or less information, but always includes the code of the object, the title, and the type of the object. This is done to facilitate further processing with the data. Attributes are added to the dataframe describing the search configuration for the returned output.

Examples

## Not run: 
# Scroll through Objects under the topic "12*"
# which is "Bevölkerung" in Destatis from all categories and
# with a detailed output
object <- gen_catalogue(code = "12*", detailed = T)

# Search tables under the topic "12*" which is "Bevölkerung"
# without a detailed output
object <- gen_catalogue(code = "12*", category = "tables")

## End(Not run)


restatis documentation built on July 9, 2023, 5:31 p.m.