Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Verbosity control #16

Merged
merged 2 commits into from
Oct 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,5 @@
^docs$
^pkgdown$
^codemeta\.json$
^doc$
^Meta$
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,5 @@
*.excalidraw
inst/doc
docs
/doc/
/Meta/
4 changes: 2 additions & 2 deletions R/create_object_list.R
Original file line number Diff line number Diff line change
Expand Up @@ -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`"
)
}
Expand Down Expand Up @@ -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 '",
Expand Down
2 changes: 1 addition & 1 deletion README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -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")
```

Expand Down
10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

<img src="man/figures/README-butterfly_diagram.png" width="100%" />
<div class="figure">

<img src="man/figures/README-butterfly_diagram.png" alt="An illustration of continually updating timeseries data where a previous value unexpectedly changes." width="100%" />
<p class="caption">
An illustration of continually updating timeseries data where a previous
value unexpectedly changes.
</p>

</div>

Data previously recorded could change for a number of reasons, such as
discovery of an error in model code, a change in methodology or
Expand Down
6 changes: 5 additions & 1 deletion vignettes/butterfly.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -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")
```

Expand Down Expand Up @@ -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.
Expand Down
Loading