eurostat
eurostat copied to clipboard
Introduce time stamps of last time updated -improvement suggestion
It would be great to have time stamps in the data, when they were last updated.
I am working with "prc_ppp_ind"-data and this is updated 4 times after first publishing. It would be great to see at one glance if we use the newest numbers.
Very good point. This could be done also outside of the eurostat package, by checking the time stamp in a reproducible workflow but that is an indirect way.
Any chance to propose an exact solution with a subsequent PR?
If you save a data citation to yourself when downloading data it includes information on the data download date and last update of data date. For example:
> get_bibentry("migr_asyappctzm")
@Misc{migr-asyappctzm-2023-9-28,
title = {Asylum applicants by type of applicant, citizenship, age and sex - monthly data (migr\_asyappctzm)},
url = {https://ec.europa.eu/eurostat/web/products-datasets/product?code=migr_asyappctzm},
language = {english},
year = {2023},
author = {{Eurostat}},
urldate = {2023-09-29},
type = {Dataset},
note = {Accessed 2023-09-29, dataset last updated 2023-09-28},
}
and
> get_bibentry("migr_asyappctzm", format = "bibentry")
[1] Eurostat. _Asylum applicants by type of applicant, citizenship, age and sex -
monthly data (migr_asyappctzm)_. Dataset. Accessed 2023-09-29, dataset last updated
2023-09-28. 2023.
<https://ec.europa.eu/eurostat/web/products-datasets/product?code=migr_asyappctzm>
(visited on 09/29/2023).
If you meant this data should somehow be included in the data object in R, this is unfortunately not yet possible. Another possibility for comparing datasets over time would be to calculate a fixity for them.
Session info
``` > sessionInfo() R version 4.3.1 Patched (2023-08-16 r84998) Platform: aarch64-apple-darwin20 (64-bit) Running under: macOS Sonoma 14.0Matrix products: default BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib LAPACK: /Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/lib/libRlapack.dylib; LAPACK version 3.11.0
locale: [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
time zone: Europe/Helsinki tzcode source: internal
attached base packages: [1] stats graphics grDevices utils datasets methods base
other attached packages: [1] eurostat_4.0.0.9004 data.table_1.14.8 testthat_3.1.10
loaded via a namespace (and not attached):
[1] tidyselect_1.2.0 dplyr_1.1.3 fastmap_1.1.1 promises_1.2.1
[5] digest_0.6.33 timechange_0.2.0 mime_0.12 lifecycle_1.0.3
[9] ellipsis_0.3.2 processx_3.8.2 magrittr_2.0.3 compiler_4.3.1
[13] rlang_1.1.1 tools_4.3.1 utf8_1.2.3 knitr_1.44
[17] prettyunits_1.2.0 htmlwidgets_1.6.2 bit_4.0.5 pkgbuild_1.4.2
[21] classInt_0.4-10 curl_5.0.2 here_1.0.1 plyr_1.8.8
[25] xml2_1.3.5 pkgload_1.3.3 KernSmooth_2.23-22 miniUI_0.1.1.1
[29] withr_2.5.1 purrr_1.0.2 desc_1.4.2 fansi_1.0.4
[33] roxygen2_7.2.3 urlchecker_1.0.1 profvis_0.3.8 ISOweek_0.6-2
[37] xtable_1.8-4 e1071_1.7-13 cli_3.6.1 giscoR_0.3.5
[41] crayon_1.5.2 generics_0.1.3 remotes_2.4.2.1 rstudioapi_0.15.0
[45] httr_1.4.7 tzdb_0.4.0 commonmark_1.9.0 sessioninfo_1.2.2
[49] readxl_1.4.3 cachem_1.0.8 proxy_0.4-27 stringr_1.5.0
[53] regions_0.1.8 parallel_4.3.1 assertthat_0.2.1 cellranger_1.1.0
[57] vctrs_0.6.3 devtools_2.4.5 jsonlite_1.8.7 callr_3.7.3
[61] hms_1.1.3 bit64_4.0.5 tidyr_1.3.0 bibtex_0.5.1
[65] glue_1.6.2 RefManageR_1.4.0 ps_1.7.5 lubridate_1.9.3
[69] stringi_1.7.12 countrycode_1.5.0 later_1.3.1 tibble_3.2.1
[73] pillar_1.9.0 rappdirs_0.3.3 htmltools_0.5.6 brio_1.1.3
[77] R6_2.5.1 httr2_0.2.3 rprojroot_2.0.3 vroom_1.6.3
[81] shiny_1.7.5 evaluate_0.22 readr_2.1.4 backports_1.4.1
[85] memoise_2.0.1 httpuv_1.6.11 class_7.3-22 Rcpp_1.0.11
[89] xfun_0.40 fs_1.6.3 usethis_2.2.2 pkgconfig_2.0.3
</details>
Closed with the CRAN release of package version 4.0.0.