Skip to content

Commit

Permalink
Merge pull request #100 from rOpenGov/codefactor
Browse files Browse the repository at this point in the history
Improve codefactor score
  • Loading branch information
dieghernan authored Dec 27, 2024
2 parents 9728e07 + ee0c1ba commit b18dd6e
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 15 deletions.
1 change: 1 addition & 0 deletions CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ keywords:
- cran
- ggplot2
- gis
- cran-r
references:
- type: software
title: 'R: A Language and Environment for Statistical Computing'
Expand Down
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,4 @@ X-schema.org-applicationCategory: cartography
X-schema.org-isPartOf: http://ropengov.org/
X-schema.org-keywords: ropengov, r, spatial, api-wrapper, rstats,
r-package, eurostat, gisco, thematic-maps, eurostat-data, cran,
ggplot2, gis
ggplot2, gis, cran-r
6 changes: 3 additions & 3 deletions R/gisco_cache.R
Original file line number Diff line number Diff line change
Expand Up @@ -184,18 +184,18 @@ gsc_helper_detect_cache_dir <- function() {

# 3. Return from cached path
Sys.setenv(GISCO_CACHE_DIR = cached_path)
return(cached_path)
cached_path
} else {
# 4. Default cache location

cache_dir <- gisco_set_cache_dir(
overwrite = TRUE,
verbose = FALSE
)
return(cache_dir)
cache_dir
}
} else {
return(getvar)
getvar
}
# nocov end
}
Expand Down
8 changes: 4 additions & 4 deletions R/gisco_check_access.R
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@ gisco_check_access <- function() {
tryCatch(
download.file(url, destfile = tempfile(), quiet = TRUE),
warning = function(e) {
return(FALSE)
FALSE
}
)

if (isFALSE(access)) {
return(FALSE)
FALSE
} else {
return(TRUE)
TRUE
}
# nocov end
}
Expand All @@ -45,6 +45,6 @@ skip_if_gisco_offline <- function() {
if (requireNamespace("testthat", quietly = TRUE)) {
testthat::skip("GISCO API not reachable")
}
return(invisible())
invisible()
# nocov end
}
4 changes: 2 additions & 2 deletions R/gisco_get_units.R
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ gsc_units_sf <- function(id_giscoR,

# Last check
df_sf <- sf::st_make_valid(df_sf)
return(df_sf)
df_sf
}

#' Download data frame for units
Expand Down Expand Up @@ -349,5 +349,5 @@ gsc_units_df <- function(id_giscoR, year, api_url, verbose) {


gsc_message(verbose, "Database loaded succesfully")
return(df_csv)
df_csv
}
4 changes: 2 additions & 2 deletions R/utils_names.R
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ gsc_helper_utf8 <- function(data_sf) {
colnames(data_sf) <- newnames
data_sf <- sf::st_set_geometry(data_sf, nm)

return(data_sf)
data_sf
}


Expand All @@ -105,7 +105,7 @@ gsc_message <- function(verbose, ...) {

if (verbose) message(msg)

return(invisible())
invisible()
}


Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,6 @@ We now download the data from Eurostat:
library(eurostat)
popdens <- get_eurostat("demo_r_d3dens") %>%
filter(TIME_PERIOD == "2021-01-01")
#> indexed 0B in 0s, 0B/sindexed 2.15GB in 0s, 2.15GB/s
```

By last, we merge and manipulate the data for creating the final plot:
Expand Down
4 changes: 2 additions & 2 deletions codemeta.json
Original file line number Diff line number Diff line change
Expand Up @@ -239,8 +239,8 @@
},
"applicationCategory": "cartography",
"isPartOf": "http://ropengov.org/",
"keywords": ["ropengov", "r", "spatial", "api-wrapper", "rstats", "r-package", "eurostat", "gisco", "thematic-maps", "eurostat-data", "cran", "ggplot2", "gis"],
"fileSize": "1242.898KB",
"keywords": ["ropengov", "r", "spatial", "api-wrapper", "rstats", "r-package", "eurostat", "gisco", "thematic-maps", "eurostat-data", "cran", "ggplot2", "gis", "cran-r"],
"fileSize": "1241.968KB",
"citation": [
{
"@type": "SoftwareSourceCode",
Expand Down

0 comments on commit b18dd6e

Please sign in to comment.