Skip to content

Commit

Permalink
Merge pull request #43 from dieghernan/main
Browse files Browse the repository at this point in the history
Improve docs
  • Loading branch information
dieghernan authored Mar 18, 2024
2 parents 67ecff3 + 68aeb1e commit c7b115f
Show file tree
Hide file tree
Showing 19 changed files with 44 additions and 37 deletions.
6 changes: 3 additions & 3 deletions CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ message: 'To cite package "tidyBdE" in publications use:'
type: software
license: GPL-3.0-or-later
title: 'tidyBdE: Download Data from Bank of Spain'
version: 0.3.5
version: 0.3.5.9000
doi: 10.5281/zenodo.4673496
abstract: Tools to download data series from 'Banco de España' ('BdE') on 'tibble'
format. 'Banco de España' is the national central bank and, within the framework
Expand All @@ -32,7 +32,7 @@ preferred-citation:
affiliation: rOpenSpain
doi: 10.5281/zenodo.4673496
year: '2024'
version: 0.3.5
version: 0.3.5.9000
url: https://ropenspain.github.io/tidyBdE/
abstract: Tools to download data series from Banco de España (BdE) on tibble format.
Banco de España is the national central bank and, within the framework of the
Expand Down Expand Up @@ -136,7 +136,7 @@ references:
name-particle: van den
orcid: https://orcid.org/0000-0002-9335-7468
year: '2024'
version: '>= 3.3.0'
version: '>= 3.5.0'
- type: software
title: readr
abstract: 'readr: Read Rectangular Text Data'
Expand Down
6 changes: 3 additions & 3 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: tidyBdE
Title: Download Data from Bank of Spain
Version: 0.3.5
Version: 0.3.5.9000
Authors@R:
person("Diego", "H. Herrero", , "[email protected]", role = c("aut", "cre", "cph"),
comment = c(ORCID = "0000-0001-8457-4658", affiliation = "rOpenSpain"))
Expand All @@ -18,7 +18,7 @@ Depends:
R (>= 3.6.0)
Imports:
dplyr (>= 0.7.0),
ggplot2 (>= 3.3.0),
ggplot2 (>= 3.5.0),
readr (>= 1.0.0),
scales (>= 1.1.0),
tibble (>= 3.0.0),
Expand All @@ -33,7 +33,7 @@ VignetteBuilder:
knitr
Config/Needs/coverage: covr
Config/Needs/website: reactable, styler, tidyverse,
ropenspain/rostemplate, devtools
ropenspain/rostemplate, devtools, cpp11, remotes
Config/testthat/edition: 3
Config/testthat/parallel: true
Copyright: See file inst/COPYRIGHTS
Expand Down
5 changes: 5 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# tidyBdE (development version)

- Adapt `scale_color_bde_d()` and friends to **ggplot2** 3.5.0. Also
expose the `guide` argument instead of hard-coding it.

# tidyBdE 0.3.5

Mostly changes on the color functions:
Expand Down
2 changes: 1 addition & 1 deletion R/bde_check_access.R
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#' Check access to BdE
#'
#' @description
#' Check if R has access to resources at
#' Check if **R** has access to resources at
#' <https://www.bde.es/webbe/en/estadisticas/recursos/descargas-completas.html>.
#'
#' @return a logical.
Expand Down
4 changes: 2 additions & 2 deletions R/catalogs.R
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#'
#' @encoding UTF-8
#'
#' @return A [tibble][tibble::tibble].
#' @return A [`tibble`][tibble::tibble] object.
#'
#' @source
#' [Time-series bulk data
Expand Down Expand Up @@ -301,7 +301,7 @@ bde_catalog_update <- function(catalog = c("ALL", "BE", "SI", "TC", "TI", "PB"),
#'
#' @family catalog
#'
#' @return A [tibble][tibble::tibble] with the results of the query.
#' @return A [`tibble`][tibble::tibble] object with the results of the query.
#'
#' @param pattern [`regex`][base::regex] pattern to search See **Details**
#' and **Examples**.
Expand Down
15 changes: 6 additions & 9 deletions R/scales.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#' BdE scales for \CRANpkg{ggplot2}.
#' BdE scales for \CRANpkg{ggplot2}
#'
#' @description
#'
Expand All @@ -21,6 +21,7 @@
#' for details.
#'
#' @inheritParams bde_tidy_palettes
#' @inheritParams ggplot2::continuous_scale
#'
#' @param ... Further arguments of [ggplot2::discrete_scale()] or
#' [ggplot2::continuous_scale()].
Expand Down Expand Up @@ -59,7 +60,6 @@ scale_color_bde_d <- function(
ggplot2::discrete_scale(
aesthetics = "color",
palette = pal,
scale_name = palette,
...
)
}
Expand All @@ -84,7 +84,6 @@ scale_fill_bde_d <- function(
ggplot2::discrete_scale(
aesthetics = "fill",
palette = pal,
scale_name = palette,
...
)
}
Expand All @@ -95,7 +94,7 @@ scale_fill_bde_d <- function(
#' @export
scale_color_bde_c <- function(
palette = c("bde_rose_pal", "bde_vivid_pal", "bde_qual_pal"), alpha = NULL,
rev = FALSE, ...) {
rev = FALSE, guide = "colorbar", ...) {
palette <- match.arg(palette)


Expand All @@ -115,9 +114,8 @@ scale_color_bde_c <- function(
)
ggplot2::continuous_scale(
aesthetics = "color",
scale_name = palette,
palette = scales::gradient_n_pal(cols),
guide = "colorbar",
guide = guide,
...
)
}
Expand All @@ -133,7 +131,7 @@ scale_colour_bde_c <- scale_color_bde_c
#' @export
scale_fill_bde_c <- function(
palette = c("bde_rose_pal", "bde_vivid_pal", "bde_qual_pal"), alpha = NULL,
rev = FALSE, ...) {
rev = FALSE, guide = "colorbar", ...) {
palette <- match.arg(palette)


Expand All @@ -153,9 +151,8 @@ scale_fill_bde_c <- function(
)
ggplot2::continuous_scale(
aesthetics = "fill",
scale_name = palette,
palette = scales::gradient_n_pal(cols),
guide = "colorbar",
guide = guide,
...
)
}
4 changes: 2 additions & 2 deletions R/series.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#' Load a single BdE time-series.
#' Load a single BdE time-series
#'
#' Load a single time-series provided by BdE.
#'
Expand All @@ -24,7 +24,7 @@
#'
#'
#' @return
#' A [tibble][tibble::tibble] with a field `Date` and :
#' A [`tibble`][tibble::tibble] with a field `Date` and :
#' - With `out_format = "wide"` each series is presented in a separate
#' column with the name defined by `series_label`.
#' - With `out_format = "long"` the tibble would have two more columns,
Expand Down
4 changes: 2 additions & 2 deletions R/theme_tidybde.R
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
#' BdE `ggplot2` theme
#' BdE \CRANpkg{ggplot2} theme
#'
#' A custom \CRANpkg{ggplot2} theme based on the publications of BdE.
#'
#' @family bde_plot
#'
#' @export
#'
#' @return A [ggplot2::theme_classic()].
#' @return A \CRANpkg{ggplot2} [`theme()`][ggplot2::theme_classic()].
#'
#' @inheritDotParams ggplot2::theme_classic
#'
Expand Down
2 changes: 1 addition & 1 deletion R/utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#'
#' @family utils
#'
#' @return A class "Date" object.
#' @return A [`Date`][as.Date()] object.
#'
#' @seealso [as.Date()]
#'
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ A BibTeX entry for LaTeX users is
doi = {10.5281/zenodo.4673496},
author = {Diego {H. Herrero}},
year = {2024},
version = {0.3.5},
version = {0.3.5.9000},
url = {https://ropenspain.github.io/tidyBdE/},
abstract = {Tools to download data series from Banco de España (BdE) on tibble format. Banco de España is the national central bank and, within the framework of the Single Supervisory Mechanism (SSM), the supervisor of the Spanish banking system along with the European Central Bank. This package is in no way sponsored endorsed or administered by Banco de España.},
}
6 changes: 3 additions & 3 deletions codemeta.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"codeRepository": "https://github.com/rOpenSpain/tidyBdE",
"issueTracker": "https://github.com/rOpenSpain/tidyBdE/issues",
"license": "https://spdx.org/licenses/GPL-3.0",
"version": "0.3.5",
"version": "0.3.5.9000",
"programmingLanguage": {
"@type": "ComputerLanguage",
"name": "R",
Expand Down Expand Up @@ -123,7 +123,7 @@
"@type": "SoftwareApplication",
"identifier": "ggplot2",
"name": "ggplot2",
"version": ">= 3.3.0",
"version": ">= 3.5.0",
"provider": {
"@id": "https://cran.r-project.org",
"@type": "Organization",
Expand Down Expand Up @@ -192,7 +192,7 @@
},
"applicationCategory": "Macroeconomics",
"isPartOf": "https://ropenspain.es/",
"fileSize": "288.623KB",
"fileSize": "289.079KB",
"citation": [
{
"@type": "SoftwareSourceCode",
Expand Down
2 changes: 1 addition & 1 deletion inst/schemaorg.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"url": "https://cran.r-project.org"
},
"runtimePlatform": "R version 4.3.3 (2024-02-29 ucrt)",
"version": "0.3.5"
"version": "0.3.5.9000"
},
{
"id": "https://doi.org/10.5281/zenodo.4673496",
Expand Down
2 changes: 1 addition & 1 deletion man/bde_catalog_load.Rd

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

2 changes: 1 addition & 1 deletion man/bde_catalog_search.Rd

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

2 changes: 1 addition & 1 deletion man/bde_check_access.Rd

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

2 changes: 1 addition & 1 deletion man/bde_parse_dates.Rd

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

4 changes: 2 additions & 2 deletions man/bde_series_load.Rd

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

7 changes: 6 additions & 1 deletion man/scales_bde.Rd

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

4 changes: 2 additions & 2 deletions man/theme_tidybde.Rd

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

0 comments on commit c7b115f

Please sign in to comment.