Skip to content

Commit

Permalink
document verbosity control
Browse files Browse the repository at this point in the history
  • Loading branch information
AAoritz committed Feb 20, 2024
1 parent 5013478 commit 94accd4
Show file tree
Hide file tree
Showing 12 changed files with 76 additions and 51 deletions.
1 change: 1 addition & 0 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ Suggests:
readr,
rmarkdown,
sf,
stringr,
terra,
testthat,
tidyr,
Expand Down
4 changes: 3 additions & 1 deletion R/nuts_aggregate.R
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
#'
#' @return A tibble containing NUTS codes, aggregated variable values, and possibly grouping variables.
#'
#' @details Console messages can be controlled with `rlang::local_options(nuts.verbose = "quiet")` to silence messages and
#' `nuts.verbose = "verbose"` to switch messages back on.
#'
#' @examples
#' library(dplyr)
Expand All @@ -26,7 +28,7 @@
#'# Aggregate from NUTS 3 to 2 by indicator x year
#' manure %>%
#' filter(nchar(geo) == 5) %>%
#' classify_nuts(nuts_code = "geo",
#' nuts_classify(nuts_code = "geo",
#' group_vars = c('indic_ag','time')) %>%
#' # Group vars are automatically passed on
#' nuts_aggregate(to_level = 2,
Expand Down
3 changes: 3 additions & 0 deletions R/nuts_classify.R
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
#'
#' The output can be passed to [nuts_convert_version()] to convert data across NUTS versions and [nuts_aggregate()] to aggregate across NUTS levels.
#'
#' @details Console messages can be controlled with `rlang::local_options(nuts.verbose = "quiet")` to silence messages and
#' `nuts.verbose = "verbose"` to switch messages back on.
#'
#'
#' @examples
#' library(dplyr)
Expand Down
6 changes: 4 additions & 2 deletions R/nuts_convert_version.R
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
#'
#' @return A tibble containing NUTS codes, converted variable values, and possibly grouping variables.
#'
#' @details Console messages can be controlled with `rlang::local_options(nuts.verbose = "quiet")` to silence messages and
#' `nuts.verbose = "verbose"` to switch messages back on.
#'
#' @examples
#' library(dplyr)
Expand All @@ -31,7 +33,7 @@
#' filter(time == 2003) %>%
#' select(-indic_ag, -time) %>%
#' # Data now only varies at the NUTS code level
#' classify_nuts(nuts_code = "geo") %>%
#' nuts_classify(nuts_code = "geo") %>%
#' nuts_convert_version(to_version = '2021',
#' weight = 'pop18',
#' variables = c('values' = 'absolute'))
Expand All @@ -43,7 +45,7 @@
#' filter(indic_ag == 'I07A_EQ_Y') %>%
#' select(-indic_ag) %>%
#' # Data now varies at the year x NUTS code level
#' classify_nuts(nuts_code = 'geo', group_vars = c('time')) %>%
#' nuts_classify(nuts_code = 'geo', group_vars = c('time')) %>%
#' nuts_convert_version(to_version = '2021',
#' weight = 'pop18',
#' variables = c('values' = 'absolute'))
Expand Down
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ pak::pak("AAoritz/nuts/")

Check out the [website](https://aaoritz.github.io/nuts/articles/nuts-vignette.html) for example usage and further details.

### Verbosity Control

Console messages can be controlled with `rlang::local_options(nuts.verbose = "quiet")` to silence messages and setting `nuts.verbose = "verbose"` to switch messages back on.


### Citation

Please support the development of open science and data by citing the JRC and us in your work:
Expand Down
2 changes: 1 addition & 1 deletion _pkgdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ reference:
- title: Functions
desc: Functions that classify and convert regional data
- contents:
starts_with("convert_|classify_")
starts_with("nuts_classify|nuts_aggregate|nuts_convert")
- title: Data
desc: Data sets required for conversion and examples
- contents:
Expand Down
2 changes: 1 addition & 1 deletion docs/index.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/pkgdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ pkgdown: 2.0.7
pkgdown_sha: ~
articles:
nuts: nuts.html
last_built: 2024-02-07T21:11Z
last_built: 2024-02-20T21:42Z
urls:
reference: https://aaoritz.github.io/nuts/reference
article: https://aaoritz.github.io/nuts/articles
Expand Down
10 changes: 7 additions & 3 deletions man/nuts_aggregate.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion man/nuts_classify.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 8 additions & 4 deletions man/nuts_convert_version.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 94accd4

Please sign in to comment.