Functions to inspect the contents of the current cache.
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 adata.frame
with# the following columns in which all file sizes are given in bytes.id
the dataset idupdated
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 adata.frame
with the following columns:time
a timestamp for the downloadfile
the filenamedownloaded
the download time in milliseconds
Examples
## make sure the cache is not empty
od_table("OGD_krebs_ext_KREBS_1")
#> Cancer statistics by reporting year, province of residence and
#> localisation of cancer
#>
#> Dataset: OGD_krebs_ext_KREBS_1 (data.statistik.gv.at)
#> Measures: Number of records F-KRE
#> Fields: Tumore ICD/10 3-Steller <98>, Reporting year <40>, Province
#> of residence <9>, Sex <2>
#>
#> Request: [2024-11-29 09:51:50.595704]
#> STATcubeR: 1.0.0
od_table("OGD_veste309_Veste309_1")
#> Structure of Earnings Survey (SES) 2018 Gross hourly earnings
#> in EUR by citizenship, region (NUTS 2) and form of employment
#>
#> Dataset: OGD_veste309_Veste309_1 (data.statistik.gv.at)
#> Measures: Arithmetic mean, 1st quartile, 2nd quartile (median), 3rd
#> quartile, Number of employees
#> Fields: Sex <3>, Citizenship <9>, Region (NUTS2) <10>, Form of
#> employment <7>
#>
#> Request: [2024-11-29 09:51:59.159953]
#> STATcubeR: 1.0.0
## inspect
od_cache_summary()
#> # A data frame: 2 × 7
#> id updated json data header fields n_fields
#> <chr> <dttm> <dbl> <dbl> <dbl> <dbl> <int>
#> 1 OGD_krebs_ext_KREBS_1 09:51:51 3765 2828045 287 9955 4
#> 2 OGD_veste309_Veste3… 09:51:59 4062 4931 516 2015 4
od_downloads()
#> # A data frame: 14 × 3
#> time file downloaded
#> <dttm> <chr> <dbl>
#> 1 2024-11-29 09:51:51 OGD_krebs_ext_KREBS_1.json 1192.
#> 2 2024-11-29 09:51:58 OGD_krebs_ext_KREBS_1.csv 6361.
#> 3 2024-11-29 09:51:58 OGD_krebs_ext_KREBS_1_HEADER.csv 173.
#> 4 2024-11-29 09:51:58 OGD_krebs_ext_KREBS_1_C-TUM_ICD10_3… 172.
#> 5 2024-11-29 09:51:58 OGD_krebs_ext_KREBS_1_C-BERJ-0.csv 172.
#> 6 2024-11-29 09:51:58 OGD_krebs_ext_KREBS_1_C-BUNDESLAND-… 172.
#> 7 2024-11-29 09:51:59 OGD_krebs_ext_KREBS_1_C-KRE_GESCHLE… 173.
#> 8 2024-11-29 09:51:59 OGD_veste309_Veste309_1.json 174.
#> 9 2024-11-29 09:51:59 OGD_veste309_Veste309_1.csv 173.
#> 10 2024-11-29 09:51:59 OGD_veste309_Veste309_1_HEADER.csv 171.
#> 11 2024-11-29 09:51:59 OGD_veste309_Veste309_1_C-A11-0.csv 172.
#> 12 2024-11-29 09:52:00 OGD_veste309_Veste309_1_C-STAATS-0.… 171.
#> 13 2024-11-29 09:52:00 OGD_veste309_Veste309_1_C-VEBDL-0.c… 172.
#> 14 2024-11-29 09:52:00 OGD_veste309_Veste309_1_C-BESCHV-0.… 172.