Reproducibility

Steffi LaZerte

2021-06-04

When using data from external sources it’s a good idea to take note of when data was downloaded, which version (if possible) and with what.

Reproducibility with weathercan can be achieved by taking note (or better yet, compiling reports) with the following information:

  1. Your computer information (and date)
  2. Specific information on packages you’re using
  3. The stations list version

For example:

# Work
library(weathercan)
s <- stations_search("Winnipeg", normals_years = "current")
w <- weather_dl(s, interval = "month", start = "2021-01-01")

# Reproducibility
stations_meta()
citation('weathercan')
devtools::session_info() # Install devtools if you don't have it
## $ECCC_modified
## [1] "2021-05-02 23:31:00 UTC"
## 
## $weathercan_modified
## [1] "2021-06-03"
## 
## To cite 'weathercan' in publications, please use:
## 
##   LaZerte, Stefanie E and Sam Albers (2018). weathercan: Download and
##   format weather data from Environment and Climate Change Canada. The
##   Journal of Open Source Software 3(22):571. doi:10.21105/joss.00571.
## 
## A BibTeX entry for LaTeX users is
## 
##   @Article{,
##     title = {{weathercan}: {D}ownload and format weather data from Environment and Climate Change Canada},
##     author = {Stefanie E LaZerte and Sam Albers},
##     journal = {The Journal of Open Source Software},
##     volume = {3},
##     number = {22},
##     pages = {571},
##     year = {2018},
##     url = {https://joss.theoj.org/papers/10.21105/joss.00571},
##   }
## ─ Session info ───────────────────────────────────────────────────────────────
##  setting  value                       
##  version  R version 4.1.0 (2021-05-18)
##  os       Ubuntu 20.04.2 LTS          
##  system   x86_64, linux-gnu           
##  ui       X11                         
##  language en_CA:en                    
##  collate  C                           
##  ctype    en_CA.UTF-8                 
##  tz       America/Winnipeg            
##  date     2021-06-04                  
## 
## ─ Packages ───────────────────────────────────────────────────────────────────
##  package     * version date       lib source        
##  assertthat    0.2.1   2019-03-21 [3] CRAN (R 4.1.0)
##  bslib         0.2.5.1 2021-05-18 [3] CRAN (R 4.1.0)
##  cachem        1.0.5   2021-05-15 [3] CRAN (R 4.1.0)
##  callr         3.7.0   2021-04-20 [3] CRAN (R 4.1.0)
##  cli           2.5.0   2021-04-26 [3] CRAN (R 4.1.0)
##  colorspace    2.0-1   2021-05-04 [3] CRAN (R 4.1.0)
##  crayon        1.4.1   2021-02-08 [3] CRAN (R 4.1.0)
##  curl          4.3.1   2021-04-30 [3] CRAN (R 4.1.0)
##  DBI           1.1.1   2021-01-15 [3] CRAN (R 4.1.0)
##  desc          1.3.0   2021-03-05 [3] CRAN (R 4.1.0)
##  devtools      2.4.1   2021-05-05 [3] CRAN (R 4.1.0)
##  digest        0.6.27  2020-10-24 [3] CRAN (R 4.1.0)
##  dplyr       * 1.0.6   2021-05-05 [3] CRAN (R 4.1.0)
##  ellipsis      0.3.2   2021-04-29 [3] CRAN (R 4.1.0)
##  evaluate      0.14    2019-05-28 [3] CRAN (R 4.1.0)
##  fansi         0.5.0   2021-05-25 [3] CRAN (R 4.1.0)
##  farver        2.1.0   2021-02-28 [3] CRAN (R 4.1.0)
##  fastmap       1.1.0   2021-01-25 [3] CRAN (R 4.1.0)
##  fs            1.5.0   2020-07-31 [3] CRAN (R 4.1.0)
##  generics      0.1.0   2020-10-31 [3] CRAN (R 4.1.0)
##  ggplot2     * 3.3.3   2020-12-30 [3] CRAN (R 4.1.0)
##  glue          1.4.2   2020-08-27 [3] CRAN (R 4.1.0)
##  gtable        0.3.0   2019-03-25 [3] CRAN (R 4.1.0)
##  highr         0.9     2021-04-16 [3] CRAN (R 4.1.0)
##  hms           1.1.0   2021-05-17 [3] CRAN (R 4.1.0)
##  htmltools     0.5.1.1 2021-01-22 [3] CRAN (R 4.1.0)
##  httr          1.4.2   2020-07-20 [3] CRAN (R 4.1.0)
##  jquerylib     0.1.4   2021-04-26 [3] CRAN (R 4.1.0)
##  jsonlite      1.7.2   2020-12-09 [3] CRAN (R 4.1.0)
##  knitr         1.33    2021-04-24 [3] CRAN (R 4.1.0)
##  labeling      0.4.2   2020-10-20 [3] CRAN (R 4.1.0)
##  lifecycle     1.0.0   2021-02-15 [3] CRAN (R 4.1.0)
##  lubridate     1.7.10  2021-02-26 [3] CRAN (R 4.1.0)
##  magrittr      2.0.1   2020-11-17 [3] CRAN (R 4.1.0)
##  memoise       2.0.0   2021-01-26 [3] CRAN (R 4.1.0)
##  munsell       0.5.0   2018-06-12 [3] CRAN (R 4.1.0)
##  naniar      * 0.6.1   2021-05-14 [3] CRAN (R 4.1.0)
##  pillar        1.6.1   2021-05-16 [3] CRAN (R 4.1.0)
##  pkgbuild      1.2.0   2020-12-15 [3] CRAN (R 4.1.0)
##  pkgconfig     2.0.3   2019-09-22 [3] CRAN (R 4.1.0)
##  pkgload       1.2.1   2021-04-06 [3] CRAN (R 4.1.0)
##  prettyunits   1.1.1   2020-01-24 [3] CRAN (R 4.1.0)
##  processx      3.5.2   2021-04-30 [3] CRAN (R 4.1.0)
##  ps            1.6.0   2021-02-28 [3] CRAN (R 4.1.0)
##  purrr         0.3.4   2020-04-17 [3] CRAN (R 4.1.0)
##  R6            2.5.0   2020-10-28 [3] CRAN (R 4.1.0)
##  rappdirs      0.3.3   2021-01-31 [3] CRAN (R 4.1.0)
##  Rcpp          1.0.6   2021-01-15 [3] CRAN (R 4.1.0)
##  readr         1.4.0   2020-10-05 [3] CRAN (R 4.1.0)
##  remotes       2.4.0   2021-06-02 [3] CRAN (R 4.1.0)
##  rlang         0.4.11  2021-04-30 [3] CRAN (R 4.1.0)
##  rmarkdown     2.8     2021-05-07 [3] CRAN (R 4.1.0)
##  rprojroot     2.0.2   2020-11-15 [3] CRAN (R 4.1.0)
##  rstudioapi    0.13    2020-11-12 [3] CRAN (R 4.1.0)
##  sass          0.4.0   2021-05-12 [3] CRAN (R 4.1.0)
##  scales        1.1.1   2020-05-11 [3] CRAN (R 4.1.0)
##  sessioninfo   1.1.1   2018-11-05 [3] CRAN (R 4.1.0)
##  stringi       1.6.2   2021-05-17 [3] CRAN (R 4.1.0)
##  stringr     * 1.4.0   2019-02-10 [3] CRAN (R 4.1.0)
##  testthat      3.0.2   2021-02-14 [3] CRAN (R 4.1.0)
##  tibble        3.1.2   2021-05-16 [3] CRAN (R 4.1.0)
##  tidyr       * 1.1.3   2021-03-03 [3] CRAN (R 4.1.0)
##  tidyselect    1.1.1   2021-04-30 [3] CRAN (R 4.1.0)
##  usethis       2.0.1   2021-02-10 [3] CRAN (R 4.1.0)
##  utf8          1.2.1   2021-03-12 [3] CRAN (R 4.1.0)
##  vctrs         0.3.8   2021-04-29 [3] CRAN (R 4.1.0)
##  visdat        0.5.3   2019-02-15 [3] CRAN (R 4.1.0)
##  weathercan  * 0.6.1   2021-06-05 [1] local         
##  withr         2.4.2   2021-04-18 [3] CRAN (R 4.1.0)
##  xfun          0.23    2021-05-15 [3] CRAN (R 4.1.0)
##  yaml          2.2.1   2020-02-01 [3] CRAN (R 4.1.0)
## 
## [1] /tmp/RtmptDX018/Rinst1c4f343219ee6
## [2] /tmp/RtmpCuTdRj/temp_libpath1745e358df3f
## [3] /home/steffi/R/x86_64-pc-linux-gnu-library/4.1
## [4] /usr/local/lib/R/site-library
## [5] /usr/lib/R/site-library
## [6] /usr/lib/R/library