nationalparkservice / DRR_Template

Data Release Reports (DRRs) are descriptions of data packages including data collection methods and quality control analyses.
https://nationalparkservice.github.io/DRR_Template/
8 stars 4 forks source link

Code: Need to add package version #s to setup section and need to improve package descriptions #9

Closed llnelson closed 7 months ago

llnelson commented 3 years ago

This is an example of the standard approach we use in standalone scripts and notebooks. I'm not asking for these specific packages, just the fleshing out of their details in this way when they are loaded.

"markdown", # version: 1.1 # links to Sundown rendering library "rmarkdown", # version: 2.7 # newer rendering via pandoc "pander", # version: 0.6.3 # alternative renderer for markdown "knitr", # version: 1.31 # output to HTML, PDF "kableExtra", # version: 1.3.4 # for tables with grouped rows "RODBC", # version: 1.3-17 # connect to ODBC data sources "readxl", # reading xlsx files # version: '1.3.1' "reshape2", # version: '1.4.4' # data re-configuration "maptools", # version 1.1-1 # spatial data handling "httr", # version: 1.4.2 # dealing with HTTP/S connections "vcdExtra", # version 0.7-5 # categorical data viz "gdata", # version: 2.18.0 # data viz "lubridate", # version: '1.7.10' # date handling "plyr", # version: 1.8.6 # split, apply, combine data "dplyr", # data manipulation # version: '1.4.4' "tidyverse", # version: 1.3.0 #data manipulation "ggplot2", # version: '3.2.0' "ggspatial", # version 1.1.5 # spatial awareness for ggplot "RColorBrewer", # version: 1.1-2 # palettes "colorRamps", # version: 2.3 # color ramp tables "htmlwidgets", # version: 1.5.3 # HTML widgets "htmltools", # version: 0.5.1.1 # # HTML utilities "jsonlite", # handling JSON content # version: '1.7.0' "sf", #spatial functions # version: '0.9-5' "sp", #spatial item details# version: '1.4-2' "rgdal", # spatial conversions and interrogation # version: '1.5-16' "raster", # raster handling # version: '3.3-13' "spatialEco", # point in polygon operations # version: '1.2.0' "leaflet", # spatial rendering # version: '2.0.3' "rgbif" # Get gBIF data # version: 3.5.2

RobLBaker commented 2 years ago

The actual versions used can be output in the session-info code chunk with sessionInfo().

My concern with specifying the version of packages loaded (rather than just the more recent) is that they may quickly get out of date or become non-compatible with an updated version of R. But perhaps I'm misunderstanding something here - happy to change it up if so!

llnelson commented 2 years ago

@RobLBaker Hi Rob - apologies for not being clear! I meant to note that inclusion as comments simply documents those versions used when last running the RMD rather than 'enforcing' a version. And, agreed about sessionInfo() - I include it as the last chunk in every notebook. Of course, since package versions are noted there, the version comment is replicative. I do think noting what the package is used for is helpful however (especially given the spectrum of knowledge depth across our program).

RobLBaker commented 7 months ago

Great idea! I've deprecated this repo in favor of the DRR template that now comes packages along with the QCkit package.