Skip to contents

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

Details

od_cache_summary() provides an overview of all contents of the cache through a data.frame. It hasone row for each dataset and the following columns. 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

  • 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")
#> 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 <95>, Reporting year <37>, Province
#>   of residence <9>, Sex <2>
#> 
#> Request: [2022-12-20 11:34:37]
#> STATcubeR: 0.5.0.1
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: [2022-12-20 11:34:38]
#> STATcubeR: 0.5.0.1

## inspect
od_cache_summary()
#> # A data frame: 315 × 7
#>    id           updated              json   data header fields n_fie…¹
#>    <chr>        <dttm>              <dbl>  <dbl>  <dbl>  <dbl>   <int>
#>  1 OGD_1531kn2… 2022-09-26 12:08:54  3116 1.14e5    277   9403       2
#>  2 OGD_1905fue… 2022-09-26 12:08:54  3569 7.63e2    509    446       2
#>  3 OGD__steuer… 2022-09-26 12:08:54  9540 1.67e6  10936   1698       4
#>  4 OGD__steuer… 2022-09-26 12:08:54  9622 3.48e6  10949   2194       4
#>  5 OGD__steuer… 2022-09-26 12:08:54  9586 1.69e6  10952   1585       4
#>  6 OGD__steuer… 2022-09-26 12:08:54  5009 2.06e5   1396   1823       4
#>  7 OGD__steuer… 2022-09-26 12:08:54  5017 3.26e5   1419   2961       4
#>  8 OGD__steuer… 2022-09-26 12:08:54  7037 4.47e5   5307   2725       4
#>  9 OGD__steuer… 2022-09-26 12:08:54  6943 6.19e2   5305   1476       4
#> 10 OGD__steuer… 2022-09-26 12:08:54  6528 8.37e4   4259   1695       5
#> # … with 305 more rows, and abbreviated variable name ¹​n_fields
od_downloads()
#> # A data frame: 4,778 × 3
#>    time                file                                    downl…¹
#>  * <dttm>              <chr>                                     <dbl>
#>  1 2022-12-20 11:27:15 OGD_veste303_Veste203_1.json               6.67
#>  2 2022-12-20 11:27:15 OGD_f1741_HH_Proj_1.json                   9.96
#>  3 2022-12-20 11:27:15 OGD_krankenbewegungen_ex_LEISTUNGEN_1.…   11.7 
#>  4 2022-12-20 11:27:15 OGD_konjunkturmonitor_KonMon_1.json       10.4 
#>  5 2022-12-20 11:27:14 OGD_fhsstud_ext_FHS_S_1.json               7.77
#>  6 2022-12-20 11:27:13 OGD_veste309_Veste309_1.json               5.29
#>  7 2022-12-20 11:27:12 OGD_krebs_ext_KREBS_1.json                71.7 
#>  8 2022-12-20 10:09:33 OGD_vgrrgr104_RGR104_1.json               12.4 
#>  9 2022-12-20 10:09:32 OGD_f1741_HH_Proj_2_C-N74-0.csv            4.99
#> 10 2022-12-20 10:09:32 OGD_f1741_HH_Proj_2_C-B52-0.csv            4.89
#> # … with 4,768 more rows, and abbreviated variable name ¹​downloaded