od_catalogue: Get a catalogue for OGD datasets

View source: R/od_list.R

od_catalogueR Documentation

Get a catalogue for OGD datasets

Description

EXPERIMENTAL This function parses several json metadata files at once and combines them into a data.frame so the datasets can easily be filtered based on categorizations, tags, number of classifications, etc.

Usage

od_catalogue(server = "ext", local = TRUE)

Arguments

server

the OGD-server to be used. "ext" (the default) for the external server or prod for the production server

local

If TRUE (the default), the catalogue is created based on cached json metadata. Otherwise, the cache is updated prior to creating the catalogue using a "bulk-download" for metadata files.

Details

The naming, ordering and choice of the columns is likely to change.

Value

a data.frame with the following structure

Column Type Description
title chr Title of the dataset
measures int Number of measure variables
fields int Number of classification fields
modified datetime Timestamp when the dataset was last modified
created datetime Timestamp when the dataset was created
database chr ID of the corresponding STATcube database
title_en chr English title
notes chr Description for the dataset
frequency chr How often is the dataset updated?
category chr Category of the dataset
tags ⁠list<chr>⁠ tags assigned to the dataset
json ⁠list<od_json>⁠ Full json metadata

The type datetime refers to the POSIXct format as returned by Sys.time(). The last column "json" contains the full json metadata as returned by od_json().

Examples

catalogue <- od_catalogue()
catalogue
table(catalogue$update_frequency)
table(catalogue$categorization)
catalogue[catalogue$categorization == "Gesundheit", 1:4]
catalogue[catalogue$measures >= 70, 1:3]
catalogue$json[[1]]
head(catalogue$database)

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