From 8e5e55699ac5e57b01f2089e334a79c2b23d8e9d Mon Sep 17 00:00:00 2001 From: thomaszwagerman Date: Tue, 22 Oct 2024 08:56:41 +0100 Subject: [PATCH 1/2] minor tweaks and documentation to enable verbosity control --- R/create_object_list.R | 4 ++-- vignettes/butterfly.Rmd | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/R/create_object_list.R b/R/create_object_list.R index b14295d..048b939 100644 --- a/R/create_object_list.R +++ b/R/create_object_list.R @@ -40,7 +40,7 @@ create_object_list <- function(df_current, df_previous, datetime_variable) { # Check if `datetime_variable` is in both `df_current` and `df_previous` if (!datetime_variable %in% names(df_current) || !datetime_variable %in% names(df_previous)) { - stop( + cli::cli_abort( "`datetime_variable` must be present in both `df_current` and `df_previous`" ) } @@ -76,7 +76,7 @@ create_object_list <- function(df_current, df_previous, datetime_variable) { # Creating a feedback message depending on the waldo object's output # First checking if there are new rows at all: if (nrow(df_current_new_rows) == 0) { - stop( + cli::cli_abort( "There are no new rows. Check '", deparse(substitute(df_current)), "' is your most recent data, and '", diff --git a/vignettes/butterfly.Rmd b/vignettes/butterfly.Rmd index a06a16c..8a10d7b 100644 --- a/vignettes/butterfly.Rmd +++ b/vignettes/butterfly.Rmd @@ -119,6 +119,10 @@ butterflycount This dataset is entirely fictional, and merely included to aid demonstrating butterfly's functionality. +## A note on controlling verbosity + +Although verbosity is mostly the purpose if this package, **should** you wish to silence messages and warnings, you can do so with `options(rlib_message_verbosity = "quiet")` and options `(rlib_warning_verbosity = "quiet")`. + ## Incorporating in data pipeline Examples of using applying butterfly in a pipeline. From c13255bee3dadfa6adc32c2bda262a9a395e6ecd Mon Sep 17 00:00:00 2001 From: thomaszwagerman Date: Tue, 22 Oct 2024 09:03:26 +0100 Subject: [PATCH 2/2] adding alt text to figures --- .Rbuildignore | 2 ++ .gitignore | 2 ++ README.Rmd | 2 +- README.md | 10 +++++++++- vignettes/butterfly.Rmd | 4 ++-- 5 files changed, 16 insertions(+), 4 deletions(-) diff --git a/.Rbuildignore b/.Rbuildignore index bf71665..408d91c 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -8,3 +8,5 @@ ^docs$ ^pkgdown$ ^codemeta\.json$ +^doc$ +^Meta$ diff --git a/.gitignore b/.gitignore index 4bcd0cd..40a6d3c 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,5 @@ *.excalidraw inst/doc docs +/doc/ +/Meta/ diff --git a/README.Rmd b/README.Rmd index 7e09de7..d769939 100644 --- a/README.Rmd +++ b/README.Rmd @@ -23,7 +23,7 @@ knitr::opts_chunk$set( The goal of butterfly is to aid in the quality assurance of continually updating and overwritten time-series data, where we expect new values over time, but want to ensure previous data remains unchanged. -```{r butterfly_diagram, echo=FALSE, out.width="100%", fig.cap=""} +```{r butterfly_diagram, echo=FALSE, out.width="100%", fig.cap="An illustration of continually updating timeseries data where a previous value unexpectedly changes."} knitr::include_graphics("man/figures/README-butterfly_diagram.png") ``` diff --git a/README.md b/README.md index c06e9a2..0c7c7e7 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,15 @@ The goal of butterfly is to aid in the quality assurance of continually updating and overwritten time-series data, where we expect new values over time, but want to ensure previous data remains unchanged. - +
+ +An illustration of continually updating timeseries data where a previous value unexpectedly changes. +

+An illustration of continually updating timeseries data where a previous +value unexpectedly changes. +

+ +
Data previously recorded could change for a number of reasons, such as discovery of an error in model code, a change in methodology or diff --git a/vignettes/butterfly.Rmd b/vignettes/butterfly.Rmd index 8a10d7b..3e802b7 100644 --- a/vignettes/butterfly.Rmd +++ b/vignettes/butterfly.Rmd @@ -16,7 +16,7 @@ knitr::opts_chunk$set( The goal of butterfly is to aid in the quality assurance of continually updating and overwritten time-series data, where we expect new values over time, but want to ensure previous data remains unchanged. -```{r butterfly_diagram, echo=FALSE, out.width="100%", fig.cap=""} +```{r butterfly_diagram, echo=FALSE, out.width="100%", fig.cap="An illustration of continually updating timeseries data where a previous value unexpectedly changes."} knitr::include_graphics("img/butterfly_diagram_light.png") ``` @@ -121,7 +121,7 @@ This dataset is entirely fictional, and merely included to aid demonstrating but ## A note on controlling verbosity -Although verbosity is mostly the purpose if this package, **should** you wish to silence messages and warnings, you can do so with `options(rlib_message_verbosity = "quiet")` and options `(rlib_warning_verbosity = "quiet")`. + ## Incorporating in data pipeline