From 77dbcb37cef57281ab3e4975b5cf2aa37e7d6a65 Mon Sep 17 00:00:00 2001 From: EOGrady21 <38440373+EOGrady21@users.noreply.github.com> Date: Fri, 20 Feb 2026 09:17:22 -0400 Subject: [PATCH 01/11] update package testing workflows migrate from travis ci to github actions update version of pkgdown cache to resolve build error --- .github/workflows/R-CMD-CHECK.yaml | 44 ++++++++++++++++++++ .github/workflows/pkgdown.yaml | 67 +++++++++++++++--------------- .travis.yml | 9 ---- 3 files changed, 78 insertions(+), 42 deletions(-) create mode 100644 .github/workflows/R-CMD-CHECK.yaml delete mode 100644 .travis.yml diff --git a/.github/workflows/R-CMD-CHECK.yaml b/.github/workflows/R-CMD-CHECK.yaml new file mode 100644 index 0000000..2849988 --- /dev/null +++ b/.github/workflows/R-CMD-CHECK.yaml @@ -0,0 +1,44 @@ +# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples +# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help +on: + push: + branches: [main, master] + pull_request: + branches: [main, master] + +name: R-CMD-check + +jobs: + R-CMD-check: + runs-on: windows-latest + env: + GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} + R_KEEP_PKG_SOURCE: yes + PKG_SYSREQS: false + steps: + - uses: actions/checkout@v4 + + - uses: r-lib/actions/setup-r@v2 + with: + use-public-rspm: true + + - uses: r-lib/actions/setup-r-dependencies@v2 + with: + extra-packages: | + any::rcmdcheck + any::testthat + any::devtools + needs: check + + - name: Install package + run: devtools::install() + shell: Rscript {0} + + - name: Test coverage + run: covr::codecov(quiet = FALSE) + shell: Rscript {0} + + - uses: r-lib/actions/check-r-package@v2 + with: + error-on: '"error"' diff --git a/.github/workflows/pkgdown.yaml b/.github/workflows/pkgdown.yaml index 3c908d3..bfc9f4d 100644 --- a/.github/workflows/pkgdown.yaml +++ b/.github/workflows/pkgdown.yaml @@ -1,48 +1,49 @@ +# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples +# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help on: push: - branches: - - main - - master + branches: [main, master] + pull_request: + release: + types: [published] + workflow_dispatch: -name: pkgdown +name: pkgdown.yaml + +permissions: read-all jobs: pkgdown: - runs-on: macOS-latest + runs-on: ubuntu-latest + # Only restrict concurrency for non-PR jobs + concurrency: + group: pkgdown-${{ github.event_name != 'pull_request' || github.run_id }} env: GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} + permissions: + contents: write steps: - - uses: actions/checkout@v2 - - - uses: r-lib/actions/setup-r@v1 + - uses: actions/checkout@v4 - - uses: r-lib/actions/setup-pandoc@v1 + - uses: r-lib/actions/setup-pandoc@v2 - - name: Query dependencies - run: | - install.packages('remotes') - saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2) - writeLines(sprintf("R-%i.%i", getRversion()$major, getRversion()$minor), ".github/R-version") - shell: Rscript {0} + - uses: r-lib/actions/setup-r@v2 + with: + use-public-rspm: true - - name: Cache R packages - uses: actions/cache@v2 + - uses: r-lib/actions/setup-r-dependencies@v2 with: - path: ${{ env.R_LIBS_USER }} - key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }} - restore-keys: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1- - - - name: Install dependencies - run: | - remotes::install_deps(dependencies = TRUE) - install.packages("pkgdown", type = "binary") - shell: Rscript {0} + extra-packages: any::pkgdown, local::. + needs: website - - name: Install package - run: R CMD INSTALL . + - name: Build site + run: pkgdown::build_site_github_pages(new_process = FALSE, install = FALSE) + shell: Rscript {0} - - name: Deploy package - run: | - git config --local user.email "actions@github.com" - git config --local user.name "GitHub Actions" - Rscript -e 'pkgdown::deploy_to_branch(new_process = FALSE)' + - name: Deploy to GitHub pages 🚀 + if: github.event_name != 'pull_request' + uses: JamesIves/github-pages-deploy-action@v4.5.0 + with: + clean: false + branch: gh-pages + folder: docs diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 3d3dd07..0000000 --- a/.travis.yml +++ /dev/null @@ -1,9 +0,0 @@ -# R for travis: see documentation at https://docs.travis-ci.com/user/languages/r - -language: R -cache: packages - -addons: - apt: - packages: - - libgit2-dev From d7714c1b5fd98105bf8432f8459c5c9389f12afc Mon Sep 17 00:00:00 2001 From: EOGrady21 <38440373+EOGrady21@users.noreply.github.com> Date: Fri, 20 Feb 2026 09:54:44 -0400 Subject: [PATCH 02/11] update roxygen version --- DESCRIPTION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DESCRIPTION b/DESCRIPTION index 67d384b..4561ee3 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -29,7 +29,7 @@ Description: A package which allows users to easily access AZMP data. The goal i License: MIT + file LICENSE Encoding: UTF-8 LazyData: true -RoxygenNote: 7.3.2 +RoxygenNote: 7.3.3 Suggests: testthat (>= 2.1.0), knitr, From af45f007bd919d5967992bbb420e6bdfa7c4a76d Mon Sep 17 00:00:00 2001 From: EOGrady21 <38440373+EOGrady21@users.noreply.github.com> Date: Fri, 20 Feb 2026 11:18:44 -0400 Subject: [PATCH 03/11] move unused packages to suggest based on r cmd check note --- DESCRIPTION | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 4561ee3..dea13a8 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -38,8 +38,6 @@ URL: https://casaultb.github.io/azmpdata, https://github.com/casaultb/azmpdata BugReports: https://github.com/casaultb/azmpdata/issues Imports: dplyr, - ggplot2, - grid, leaflet, lubridate, magrittr, @@ -51,9 +49,12 @@ Imports: stringr, tidyr, tibble, - tools, utils, - usethis +Suggests: + ggplot2, + grid, + tools, + usethis Depends: R (>= 3.5) VignetteBuilder: knitr From 0a92ae8caf8877ae09af6c8013086c3aa28d0eda Mon Sep 17 00:00:00 2001 From: EOGrady21 <38440373+EOGrady21@users.noreply.github.com> Date: Fri, 20 Feb 2026 11:19:10 -0400 Subject: [PATCH 04/11] update for best practice - suppresible package start up message per r cmd check note --- R/zzz.R | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/R/zzz.R b/R/zzz.R index f818a7d..822cb1c 100644 --- a/R/zzz.R +++ b/R/zzz.R @@ -2,9 +2,9 @@ utils::globalVariables(c('year', 'value', 'month', 'day', 'year_dec', 'xmin', 'xmax', 'ymin', 'ymax', '.', 'ls_data', 'variable', 'tmp_variable', 'keyword', 'dataframe')) .onAttach <- function(libname, pkgname) { - # check if updates are available + # Check if updates are available update_check(gitPkg = 'casaultb/azmpdata') - message("\tazmpdata:: Indexing all available monthly azmpdata...") - assign("azmpMonthlyParams", area_indexer(doMonths=T, doParameters = T), envir = .GlobalEnv) + packageStartupMessage("\tazmpdata:: Indexing all available monthly azmpdata...") + assign("azmpMonthlyParams", area_indexer(doMonths = TRUE, doParameters = TRUE), envir = .GlobalEnv) } From effe31421e93898db73968509970be494d509b4a Mon Sep 17 00:00:00 2001 From: EOGrady21 <38440373+EOGrady21@users.noreply.github.com> Date: Fri, 20 Feb 2026 11:20:15 -0400 Subject: [PATCH 05/11] fix suggests --- DESCRIPTION | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index dea13a8..2351cb8 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -34,6 +34,10 @@ Suggests: testthat (>= 2.1.0), knitr, rmarkdown, + ggplot2, + grid, + tools, + usethis URL: https://casaultb.github.io/azmpdata, https://github.com/casaultb/azmpdata BugReports: https://github.com/casaultb/azmpdata/issues Imports: @@ -50,11 +54,6 @@ Imports: tidyr, tibble, utils, -Suggests: - ggplot2, - grid, - tools, - usethis Depends: R (>= 3.5) VignetteBuilder: knitr From 0f7be55ab2cae6d1799b3a7e6c0a0ca2ac253f9a Mon Sep 17 00:00:00 2001 From: EOGrady21 <38440373+EOGrady21@users.noreply.github.com> Date: Fri, 20 Feb 2026 11:28:45 -0400 Subject: [PATCH 06/11] update vignettes - failing build --- man/plot_availability.Rd | 2 +- vignettes/plotting_azmpdata.Rmd | 7 ++++--- vignettes/search_azmpdata.Rmd | 6 +++--- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/man/plot_availability.Rd b/man/plot_availability.Rd index 8093e3a..ff368f2 100644 --- a/man/plot_availability.Rd +++ b/man/plot_availability.Rd @@ -2,7 +2,7 @@ % Please edit documentation in R/plot_availability.R \name{plot_availability} \alias{plot_availability} -\title{Frequency plot of parameter(s) from specified locations} +\title{plot_availability} \usage{ plot_availability( areaType = NULL, diff --git a/vignettes/plotting_azmpdata.Rmd b/vignettes/plotting_azmpdata.Rmd index a826384..dc2c3c2 100644 --- a/vignettes/plotting_azmpdata.Rmd +++ b/vignettes/plotting_azmpdata.Rmd @@ -130,20 +130,21 @@ A user may also want to plot a timeseries. This method is also fairly generic an # check for metadata - metanames <- c('year', 'month', 'day', 'area', 'section', 'station' ) + metanames <- c('year', 'month', 'day', 'area', 'section', 'station', 'date' ) meta_df <- names(df_data)[names(df_data) %in% metanames] group <- meta_df[!meta_df %in% c('year', 'month', 'day')] df_data <- df_data %>% - dplyr::select(., all_of(meta_df), all_of(variable) ) %>% + dplyr::select(., any_of(meta_df), all_of(variable) ) %>% dplyr::rename(., 'value' = all_of(variable) ) %>% dplyr::rename(., 'group' = all_of(group)) #TODO some dataframes do not have groups!? # prepare data df_data <- df_data %>% - tidyr::unite(date, year, month, day, sep="-", remove=F) %>% + #tidyr::unite(date, year, month, day, sep="-", remove=F) %>% + dplyr::mutate(year = format(df_data$date, '%Y')) %>% dplyr::mutate(year_dec=lubridate::decimal_date(lubridate::ymd(date))) %>% dplyr::select(year, year_dec, value, group) diff --git a/vignettes/search_azmpdata.Rmd b/vignettes/search_azmpdata.Rmd index ada0a6a..374078b 100644 --- a/vignettes/search_azmpdata.Rmd +++ b/vignettes/search_azmpdata.Rmd @@ -125,10 +125,10 @@ Basically, `area_indexer()` is a good way to filter through the multiple datafra The user now knows what is contained within the package, where data are sampled, and how to properly filter through the data. It is then recommended that the user completed step 4, `plot_availability()` to understand when the data are sampled. This function generates a score card of samples per month based on `areaType`, `areaName`, and `parameters`. -For example, if a user wanted to know the frequency (ie. samples/month) for the nitrate at station P5, they would type in the following: +For example, if a user wanted to know the frequency (ie. samples/month) for the sea surface height at Halifax, they would type in the following: -```{r, message=FALSE, error=FALSE, warning=FALSE, eval=TRUE, fig.cap="Figure 3: Sampling freqency per month for nitrate at station P5"} -plot_availability(areaType = "station", areaName="P5", parameters="nitrate") +```{r, message=TRUE, error=FALSE, warning=FALSE, eval=TRUE, fig.cap="Figure 3: Sampling freqency per month for sea_surface_height at Halifax"} +plot_availability(areaType = "station", areaName="Halifax", parameters="sea_surface_height") ``` ## Conclusion From aeb9847869a88ef0f402c243e4ff28951916ed95 Mon Sep 17 00:00:00 2001 From: EOGrady21 <38440373+EOGrady21@users.noreply.github.com> Date: Fri, 20 Feb 2026 12:55:40 -0400 Subject: [PATCH 07/11] fix vignette building errors --- vignettes/plotting_azmpdata.Rmd | 20 +++----------------- vignettes/search_azmpdata.Rmd | 4 ++-- 2 files changed, 5 insertions(+), 19 deletions(-) diff --git a/vignettes/plotting_azmpdata.Rmd b/vignettes/plotting_azmpdata.Rmd index c413387..78d69c9 100644 --- a/vignettes/plotting_azmpdata.Rmd +++ b/vignettes/plotting_azmpdata.Rmd @@ -130,7 +130,7 @@ A user may also want to plot a timeseries. This method is also fairly generic an metanames <- c('year', 'month', 'day', 'area', 'section', 'station', 'date' ) meta_df <- names(df_data)[names(df_data) %in% metanames] - group <- meta_df[!meta_df %in% c('year', 'month', 'day')] + group <- meta_df[!meta_df %in% c('year', 'month', 'day', 'date')] df_data <- df_data %>% dplyr::select(., any_of(meta_df), all_of(variable) ) %>% @@ -140,28 +140,14 @@ A user may also want to plot a timeseries. This method is also fairly generic an # prepare data df_data <- df_data %>% - #tidyr::unite(date, year, month, day, sep="-", remove=F) %>% + tidyr::unite(date, year, month, day, sep="-", remove=F) %>% dplyr::mutate(year = format(df_data$date, '%Y')) %>% dplyr::mutate(year_dec=lubridate::decimal_date(lubridate::ymd(date))) %>% dplyr::select(year, year_dec, value, group) -group <- meta_df[!meta_df %in% c('year', 'month', 'day')] - -df_data <- df_data %>% - dplyr::select(., all_of(meta_df), all_of(variable) ) %>% - dplyr::rename(., 'value' = all_of(variable) ) %>% - dplyr::rename(., 'group' = all_of(group)) #TODO some dataframes do not have groups!? - - -# prepare data -df_data <- df_data %>% - tidyr::unite(date, year, month, day, sep="-", remove=F) %>% - dplyr::mutate(year_dec=lubridate::decimal_date(lubridate::ymd(date))) %>% - dplyr::select(year, year_dec, value, group) - # set x-axis -x_limits <- c(min(df_data$year), max(df_data$year)+1) +x_limits <- c(min(df_data$year_dec), max(df_data$year_dec)+1) x_breaks <- seq(x_limits[1]+.5, x_limits[2]-.5, by=1) x_labels <- x_breaks-.5 diff --git a/vignettes/search_azmpdata.Rmd b/vignettes/search_azmpdata.Rmd index 1598c6e..b0c03c3 100644 --- a/vignettes/search_azmpdata.Rmd +++ b/vignettes/search_azmpdata.Rmd @@ -1,9 +1,9 @@ --- -title: "azmpdata - Spatially and Temporally searching data within the azmpdata package" +title: "Spatially and Temporally searching data within the azmpdata package" author: Emily Chisholm and Jaimie Harbin output: rmarkdown::html_vignette vignette: > - %\VignetteIndexEntry{azmpdata - searching} + %\VignetteIndexEntry{Spatially and Temporally searching data within the azmpdata package} %\VignetteEngine{knitr::rmarkdown} %\VignetteEncoding{UTF-8} --- From 620d237e031e601b405af6bbc6f0dbf172aa0714 Mon Sep 17 00:00:00 2001 From: EOGrady21 <38440373+EOGrady21@users.noreply.github.com> Date: Fri, 20 Feb 2026 12:56:15 -0400 Subject: [PATCH 08/11] rdocs - package --- man/azmpdata-package.Rd | 1 - man/azmpdata.Rd | 65 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 65 insertions(+), 1 deletion(-) create mode 100644 man/azmpdata.Rd diff --git a/man/azmpdata-package.Rd b/man/azmpdata-package.Rd index b06b2a5..1232224 100644 --- a/man/azmpdata-package.Rd +++ b/man/azmpdata-package.Rd @@ -2,7 +2,6 @@ % Please edit documentation in R/azmpdata-package.R \docType{package} \name{azmpdata-package} -\alias{azmpdata} \alias{azmpdata-package} \title{azmpdata: A data package to share derived metrics from AZMP research documents} \description{ diff --git a/man/azmpdata.Rd b/man/azmpdata.Rd new file mode 100644 index 0000000..930f6d3 --- /dev/null +++ b/man/azmpdata.Rd @@ -0,0 +1,65 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/azmpdata.R +\docType{package} +\name{azmpdata} +\alias{azmpdata} +\title{azmpdata: A package providing data products derived from data collected as part of +The Atlantic Zone Monitoring Program (AZMP).} +\description{ +The azmp package provides three categories of data products: +physical, biological and chemical variables. For a complete list of +variables, use library(help = "azmpdata"). +} +\section{Physical variables}{ + +The physical variables include basic oceanographic variables (temperature, salinity, +density) and additional derived variables such as parameters of the cold intermediate +layer (CIL), sea-ice parameters (area, volume, duration and timing), sea surface height +and seas surface temperature as measured by remote sensing. +} + +\section{Biological variables}{ + +The biological variables include chlorophyll, phyto- and zooplankton +abundance, and zooplankton biomass. Parameters of the spring phytoplankton bloom +as estimated from remote sensing surface chlorophyll are also included. +} + +\section{Chemical variables}{ + +The chemical variables include main nutrients (nitrate, silicate and phosphate). +Carbonate chemistry variables such as pH, dissolved inorganic carbon (DIC) and +total alkalinity (TA) are also included as annual means. +} + +\section{Other variables}{ + +Other variables of relevance for multivariate data analysis are also included. They +include air temperature, North Atlantic Oscillation (NAO) and river fresh water flux. +} + +\seealso{ +Useful links: +\itemize{ + \item \url{https://casaultb.github.io/azmpdata} + \item \url{https://github.com/casaultb/azmpdata} + \item Report bugs at \url{https://github.com/casaultb/azmpdata/issues} +} + +} +\author{ +\strong{Maintainer}: Benoit Casault \email{Benoit.Casualt@dfo-mpo.gc.ca} + +Authors: +\itemize{ + \item Emily Chisholm \email{Emily.Chisholm@dfo-mpo.gc.ca} (\href{https://orcid.org/0000-0002-1072-5879}{ORCID}) + \item Chantelle Layton \email{Chantelle.Layton@dfo-mpo.gc.ca} (\href{https://orcid.org/0000-0002-3199-5763}{ORCID}) + \item Mike McMahon \email{Mike.McMahon@dfo-mpo.gc.ca} +} + +Other contributors: +\itemize{ + \item Catherine Johnson \email{Catherine.Johnson@dfo-mpo.gc.ca} [contributor] +} + +} From f0a042b17dab4021590eeb0432b90d9759cd2a88 Mon Sep 17 00:00:00 2001 From: EOGrady21 <38440373+EOGrady21@users.noreply.github.com> Date: Fri, 20 Feb 2026 13:59:21 -0400 Subject: [PATCH 09/11] MIGRATE BUILD BADGE FROM TRAVIS CI TO GITHUB ACTIONS --- README.Rmd | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.Rmd b/README.Rmd index 77e40be..5a9b28a 100644 --- a/README.Rmd +++ b/README.Rmd @@ -16,7 +16,8 @@ knitr::opts_chunk$set( # *azmpdata* -[![Travis build status](https://travis-ci.org/casaultb/azmpdata.svg?branch=master)](https://travis-ci.org/casaultb/azmpdata) +[![R-CMD-check](https://github.com/casaultb/azmpdata/actions/workflows/R-CMD-CHECK.yaml/badge.svg)](https://github.com/casaultb/azmpdata/actions/workflows/R-CMD-CHECK.yaml/badge.svg) + The R package *azmpdata* provides a series of data products derived from raw data collected as part of the Atlantic Zone Monitoring Program ([AZMP](https://www.dfo-mpo.gc.ca/science/data-donnees/azmp-pmza/index-eng.html)). The data products provided in this package are used to generate the different figures contained in the Research Documents produced annually by Fisheries and Ocean Canada's Maritimes region. The Research Documents describe the physical, chemical and biological conditions observed in Maritimes region since the inception of the AZMP program (see example documents for the [physical](http://www.dfo-mpo.gc.ca/csas-sccs/Publications/ResDocs-DocRech/2018/2018_016-eng.html) conditions and for the [optical, chemical and biological](http://www.dfo-mpo.gc.ca/csas-sccs/Publications/ResDocs-DocRech/2018/2018_017-eng.html) conditions). From de891063b83e11a62699893dcaf338ab64c86eac Mon Sep 17 00:00:00 2001 From: EOGrady21 <38440373+EOGrady21@users.noreply.github.com> Date: Fri, 20 Feb 2026 14:11:54 -0400 Subject: [PATCH 10/11] knit readme --- README.Rmd | 4 ++-- README.md | 68 ++++++++++++++++++++++++++++++++---------------------- 2 files changed, 43 insertions(+), 29 deletions(-) diff --git a/README.Rmd b/README.Rmd index 5a9b28a..b2f6fb1 100644 --- a/README.Rmd +++ b/README.Rmd @@ -27,8 +27,8 @@ The R package *azmpdata* provides a series of data products derived from raw dat The *azmpdata* R package can be installed from [GitHub](https://github.com) with: ``` r -# install.packages("devtools") -devtools::install_github("casaultb/azmpdata") +library(remotes) +remotes::install_github(repo = "casaultb/azmpdata", ref = "master", build_vignettes = TRUE) ``` ## Datasets diff --git a/README.md b/README.md index 89eb274..2bf5c86 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ azmpdata R package ================ Benoit Casault, Emily Chisholm -15 December, 2020 +20 February, 2026 @@ -9,8 +9,8 @@ Benoit Casault, Emily Chisholm -[![Travis build -status](https://travis-ci.org/casaultb/azmpdata.svg?branch=master)](https://travis-ci.org/casaultb/azmpdata) +[![R-CMD-check](https://github.com/casaultb/azmpdata/actions/workflows/R-CMD-CHECK.yaml/badge.svg)](https://github.com/casaultb/azmpdata/actions/workflows/R-CMD-CHECK.yaml/badge.svg) + The R package *azmpdata* provides a series of data products derived from @@ -48,33 +48,47 @@ To access a dataset in data frame format: ``` r library(azmpdata) -#> -#> casaultb/azmpdata status: -#> (Package ver: 0.2019.0.9000) Up to date -#> (Data ver:2020-11-26) is up to date +#> casaultb/azmpdata status: +#> (Package ver: 0.2019.0.9100) Up to date +#> (Data ver:2021-01-14 ) Up to date +#> azmpdata:: Indexing all available monthly azmpdata... data("Derived_Annual_Broadscale") head(Derived_Annual_Broadscale) -#> year area density_gradient_0_50 temperature_at_sea_floor -#> 1 1948 Scotion Shelf -0.00139 NA -#> 2 1949 Scotion Shelf -0.00968 NA -#> 3 1950 Scotion Shelf -0.01883 NA -#> 4 1951 Scotion Shelf -0.00092 NA -#> 5 1952 Scotion Shelf 0.00155 NA -#> 6 1953 Scotion Shelf -0.00313 NA -#> cold_intermediate_layer_volume minimum_temperature_in_cold_intermediate_layer -#> 1 -#> 2 -#> 3 -#> 4 -#> 5 -#> 6 +#> year area density_gradient_0_50 sea_temperature_0 salinity_0 +#> 1 1948 scotian_shelf_box 0.02715 6.45 31.23 +#> 2 1949 scotian_shelf_box 0.01339 8.97 31.83 +#> 3 1950 scotian_shelf_box 0.00587 8.15 31.92 +#> 4 1951 scotian_shelf_box 0.02733 9.55 31.21 +#> 5 1952 scotian_shelf_box 0.03159 8.91 31.02 +#> 6 1953 scotian_shelf_box 0.02433 8.89 31.27 +#> temperature_at_sea_floor cold_intermediate_layer_volume +#> 1 NA NA +#> 2 NA NA +#> 3 NA NA +#> 4 NA NA +#> 5 NA NA +#> 6 NA NA +#> minimum_temperature_in_cold_intermediate_layer north_atlantic_oscillation +#> 1 NA NA +#> 2 NA NA +#> 3 NA NA +#> 4 NA NA +#> 5 NA NA +#> 6 NA NA +#> sea_surface_temperature_from_satellite +#> 1 NA +#> 2 NA +#> 3 NA +#> 4 NA +#> 5 NA +#> 6 NA ``` To access a dataset in csv format: ``` r system.file("extdata/csv", "Derived_Annual_Broadscale.csv", package = "azmpdata") -#> [1] "C:/Users/ChisholmE/Documents/R/R-4.0.2/library/azmpdata/extdata/csv/Derived_Annual_Broadscale.csv" +#> [1] "C:/Users/ogradye/AppData/Local/Temp/1/RtmpWY0v01/temp_libpath305426945375/azmpdata/extdata/csv/Derived_Annual_Broadscale.csv" ``` ### Variable Organization @@ -105,18 +119,18 @@ look as below: ``` r res <- variable_lookup(keywords = c('nitrate', 'phosphate'), search_help = TRUE) -#> Joining, by = c("keyword", "variable", "dataframe") +#> Joining with `by = join_by(keyword, variable, dataframe)` head(res) -#> # A tibble: 6 x 3 +#> # A tibble: 6 × 3 #> keyword variable dataframe #> #> 1 nitrate integrated_nitrate_0_50 Derived_Annual_Sections #> 2 nitrate integrated_nitrate_0_50 Derived_Annual_Stations #> 3 nitrate integrated_nitrate_0_50 Derived_Occupations_Sections -#> 4 nitrate integrated_nitrate_50_150 Derived_Annual_Sections -#> 5 nitrate integrated_nitrate_50_150 Derived_Annual_Stations -#> 6 nitrate integrated_nitrate_50_150 Derived_Occupations_Sections +#> 4 nitrate integrated_nitrate_0_50 Derived_Occupations_Stations +#> 5 nitrate integrated_nitrate_50_150 Derived_Annual_Sections +#> 6 nitrate integrated_nitrate_50_150 Derived_Annual_Stations ``` #### Dataset Documentation From 4d688c06ec12a4457e715e70e8c04e77d8ab1436 Mon Sep 17 00:00:00 2001 From: EOGrady21 <38440373+EOGrady21@users.noreply.github.com> Date: Fri, 20 Feb 2026 14:17:18 -0400 Subject: [PATCH 11/11] add code coverage testing --- DESCRIPTION | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/DESCRIPTION b/DESCRIPTION index 2351cb8..1a1bf06 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -37,7 +37,8 @@ Suggests: ggplot2, grid, tools, - usethis + usethis, + covr URL: https://casaultb.github.io/azmpdata, https://github.com/casaultb/azmpdata BugReports: https://github.com/casaultb/azmpdata/issues Imports: