od_cache: Cache management for Open Data

od_cacheR Documentation

Cache management for Open Data

Description

Functions to inspect the contents of the current cache.

Usage

od_cache_summary(server = "ext")

od_downloads(server = "ext")

Arguments

server

the OGD-Server to use. "ext" for the external server (the default) or "red" for the editing server

Value

  • od_cache_summary() provides an overview of all contents of the cache through a data.frame. It has one row for each dataset and returns a data.frame with# the following columns in which all file sizes are given in bytes.

    • id the dataset id

    • updated the last modified time for ⁠${id}.json⁠

    • json the file size of ⁠${id}.json⁠

    • data the file size of ⁠${id}.csv⁠

    • header the file size of ⁠${id}_HEADER.csv⁠

    • fields the total file size of all files belonging to fields (⁠{id}_C*.csv⁠).

    • n_fields the number of field files

  • od_downloads() shows a download history for the current cache and returns a data.frame with the following columns:

    • time a timestamp for the download

    • file the filename

    • downloaded the download time in milliseconds

Examples

## make sure the cache is not empty
od_table("OGD_krebs_ext_KREBS_1")
od_table("OGD_veste309_Veste309_1")

## inspect
od_cache_summary()
od_downloads()

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