Skip to content

Commit

Permalink
Lint
Browse files Browse the repository at this point in the history
  • Loading branch information
dieghernan committed Dec 20, 2024
1 parent c403049 commit 774374c
Show file tree
Hide file tree
Showing 15 changed files with 38 additions and 36 deletions.
1 change: 1 addition & 0 deletions .github/workflows/test-coverage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,3 +76,4 @@ jobs:
with:
name: coverage-test-failures
path: ${{ runner.temp }}/package

4 changes: 2 additions & 2 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.7.9000
version: 0.3.8
doi: 10.32614/CRAN.package.tidyBdE
identifiers:
- type: doi
Expand All @@ -35,7 +35,7 @@ preferred-citation:
affiliation: rOpenSpain
doi: 10.32614/CRAN.package.tidyBdE
year: '2024'
version: 0.3.7.9000
version: 0.3.8
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
2 changes: 1 addition & 1 deletion 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.7.9000
Version: 0.3.8
Authors@R:
person("Diego", "H. Herrero", , "[email protected]", role = c("aut", "cre", "cph"),
comment = c(ORCID = "0000-0001-8457-4658", affiliation = "rOpenSpain"))
Expand Down
2 changes: 1 addition & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# tidyBdE (development version)
# tidyBdE 0.3.8

- Update `bde_ind_gdp_quarterly()` since the underlying identifier changed.

Expand Down
9 changes: 5 additions & 4 deletions R/bde_check_access.R
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,16 @@ bde_check_access <- function() {
tryCatch(
download.file(url, destfile = tempfile(), quiet = TRUE),
warning = function(e) {
return(FALSE)
FALSE
}
)

if (isFALSE(access)) {
return(FALSE)
res <- FALSE
} else {
return(TRUE)
res <- TRUE
}
res
# nocov end
}

Expand All @@ -55,6 +56,6 @@ skip_if_bde_offline <- function() {
if (requireNamespace("testthat", quietly = TRUE)) {
testthat::skip("tidyBdE> BdE API not reachable")
}
return(invisible())
invisible()
# nocov end
}
2 changes: 1 addition & 1 deletion R/bde_tidy_palettes.R
Original file line number Diff line number Diff line change
Expand Up @@ -68,5 +68,5 @@ bde_tidy_palettes <- function(n = 6,
if (rev) endcols <- rev(endcols)
if (!is.null(alpha)) endcols <- ggplot2::alpha(endcols, alpha)

return(endcols)
endcols
}
8 changes: 4 additions & 4 deletions R/catalogs.R
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ bde_catalog_load <- function(catalog = c("ALL", "BE", "SI", "TC", "TI", "PB"),
catalog_load <- catalog_load[-1, ]

catalog_load <- bde_hlp_tochar(catalog_load)
return(catalog_load)
catalog_load
})

res_all <- unlist(lapply(final_catalog, is.null))
Expand Down Expand Up @@ -183,7 +183,7 @@ bde_catalog_load <- function(catalog = c("ALL", "BE", "SI", "TC", "TI", "PB"),
final_catalog[field] <- bde_parse_dates(final_catalog[[field]])
}
}
return(final_catalog)
final_catalog
}


Expand Down Expand Up @@ -295,7 +295,7 @@ bde_catalog_update <- function(catalog = c("ALL", "BE", "SI", "TC", "TI", "PB"),
url = full_url, local_file = local_file,
verbose = verbose
)
return(result)
result
})

return(invisible(res))
Expand Down Expand Up @@ -382,5 +382,5 @@ bde_catalog_search <- function(pattern, ...) {
if (nrow(search_results) == 0) {
stop("tidyBdE> No matches found for ", pattern)
}
return(search_results)
search_results
}
18 changes: 9 additions & 9 deletions R/indicators.R
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ bde_ind_gdp_var <- function(series_label = "GDP_YoY", ...) {
bde_series_load(seq_num, series_label = series_label, ...)
econom_ind <- econom_ind[!is.na(econom_ind[[2]]), ]

return(econom_ind)
econom_ind
}

#' @rdname bde_indicators
Expand All @@ -50,7 +50,7 @@ bde_ind_unemployment_rate <-
econom_ind <- bde_series_load(seq_num, series_label = series_label, ...)
econom_ind <- econom_ind[!is.na(econom_ind[[2]]), ]

return(econom_ind)
econom_ind
}

#' @rdname bde_indicators
Expand All @@ -64,7 +64,7 @@ bde_ind_euribor_12m_monthly <-
econom_ind <- bde_series_load(seq_num, series_label = series_label, ...)
econom_ind <- econom_ind[!is.na(econom_ind[[2]]), ]

return(econom_ind)
econom_ind
}

#' @rdname bde_indicators
Expand All @@ -77,7 +77,7 @@ bde_ind_euribor_12m_daily <-
econom_ind <- bde_series_load(seq_num, series_label = series_label, ...)
econom_ind <- econom_ind[!is.na(econom_ind[[2]]), ]

return(econom_ind)
econom_ind
}

#' @rdname bde_indicators
Expand All @@ -90,7 +90,7 @@ bde_ind_cpi_var <-
econom_ind <- bde_series_load(seq_num, series_label = series_label, ...)
econom_ind <- econom_ind[!is.na(econom_ind[[2]]), ]

return(econom_ind)
econom_ind
}

#' @rdname bde_indicators
Expand All @@ -102,7 +102,7 @@ bde_ind_ibex_monthly <- function(series_label = "IBEX_index_month", ...) {
econom_ind <- bde_series_load(seq_num, series_label = series_label, ...)
econom_ind <- econom_ind[!is.na(econom_ind[[2]]), ]

return(econom_ind)
econom_ind
}

#' @rdname bde_indicators
Expand All @@ -114,7 +114,7 @@ bde_ind_ibex_daily <- function(series_label = "IBEX_index_day", ...) {
econom_ind <- bde_series_load(seq_num, series_label = series_label, ...)
econom_ind <- econom_ind[!is.na(econom_ind[[2]]), ]

return(econom_ind)
econom_ind
}

#' @rdname bde_indicators
Expand All @@ -126,7 +126,7 @@ bde_ind_gdp_quarterly <- function(series_label = "GDP_quarterly_value", ...) {
econom_ind <- bde_series_load(seq_num, series_label = series_label, ...)
econom_ind <- econom_ind[!is.na(econom_ind[[2]]), ]

return(econom_ind)
econom_ind
}


Expand All @@ -140,7 +140,7 @@ bde_ind_population <- function(series_label = "Population_Spain", ...) {
econom_ind <- bde_series_load(seq_num, series_label = series_label, ...)
econom_ind <- econom_ind[!is.na(econom_ind[[2]]), ]

return(econom_ind)
econom_ind
}

#' @export
Expand Down
2 changes: 1 addition & 1 deletion R/series.R
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ bde_series_load <- function(series_code, series_label = NULL,
# Rearrange
serie_file <- serie_file[c("Date", "serie_name", "serie_value")]

return(serie_file)
serie_file
})

# Clean
Expand Down
4 changes: 2 additions & 2 deletions R/superseded.R
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ bde_vivid_pal <- function(...) {
}

pal <- c("#4180C2", "#D86E7B", "#F89E63", "#5FBD6A", "#62C8D0", "#AC8771")
return(scales::manual_pal(pal))
scales::manual_pal(pal)
}

#' @rdname bde_pals
Expand All @@ -49,5 +49,5 @@ bde_rose_pal <- function(...) {
)
}
pal <- c("#b7365c", "#cb6e8a", "#db9aad", "#0a50a1", "#5385bd", "#89AEDA")
return(scales::manual_pal(pal))
scales::manual_pal(pal)
}
7 changes: 3 additions & 4 deletions R/utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ bde_parse_dates <- function(dates_to_parse) {

# Convert object
dateformat <- as.Date(dateformat, "%d%m%Y")
return(dateformat)
dateformat
}


Expand Down Expand Up @@ -154,7 +154,7 @@ bde_hlp_cachedir <- function(cache_dir = NULL, verbose = FALSE, suffix = NULL) {
if (verbose) {
message("tidyBdE> Cache dir created on ", cache_dir)
}
return(cache_dir)
cache_dir
}

#' Helper for downloading files
Expand Down Expand Up @@ -209,9 +209,8 @@ bde_hlp_download <- function(url, local_file, verbose) {
if (isTRUE(err_dwnload)) {
return(FALSE)
# nocov end
} else {
return(TRUE)
}
TRUE
}


Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,9 @@ XR_GBP %>%
knitr::kable()
```

| Numero_secuencial | Descripcion_de_la_serie |
|------------------:|:-------------------------------------------------------------------|
| 573214 | Tipo de cambio. Libras esterlinas por euro (GBP/EUR).Datos diarios |
| Numero_secuencial | Descripcion_de_la_serie |
|---:|:---|
| 573214 | Tipo de cambio. Libras esterlinas por euro (GBP/EUR).Datos diarios |

**Note that BdE files are only provided in Spanish, for the time
being**, the organism is working on the English version. By now, search
Expand Down Expand Up @@ -217,7 +217,7 @@ A BibTeX entry for LaTeX users is
doi = {10.32614/CRAN.package.tidyBdE},
author = {Diego {H. Herrero}},
year = {2024},
version = {0.3.7.9000},
version = {0.3.8},
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.},
}
4 changes: 2 additions & 2 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.7.9000",
"version": "0.3.8",
"programmingLanguage": {
"@type": "ComputerLanguage",
"name": "R",
Expand Down Expand Up @@ -193,7 +193,7 @@
"applicationCategory": "Macroeconomics",
"isPartOf": "https://ropenspain.es/",
"keywords": ["api", "bde", "cran", "ggplot2", "macroeconomics", "r", "r-package", "ropenspain", "rstats", "series-data", "spain"],
"fileSize": "289.182KB",
"fileSize": "287.205KB",
"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.4.2 (2024-10-31 ucrt)",
"version": "0.3.7.9000"
"version": "0.3.8"
},
{
"id": "https://doi.org/10.32614/CRAN.package.tidyBdE",
Expand Down
1 change: 1 addition & 0 deletions tidyBdE.Rproj
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
Version: 1.0
ProjectId: c24317b7-f9bb-4692-bb51-96d3dd734df5

RestoreWorkspace: Default
SaveWorkspace: Default
Expand Down

0 comments on commit 774374c

Please sign in to comment.