Skip to content

Commit f8c9f41

Browse files
committed
Small fix for chelsa and EASIN functions
1 parent a699dbc commit f8c9f41

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

R/dwf_chelsa_prepare.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ chelsa_prepare <- function(
8080

8181
chelsa_metadata <- list.files(
8282
path = path_dwnload_links, recursive = TRUE, full.names = TRUE,
83-
pattern = "dwnload_links_Climatologies_.+txt$") %>%
83+
pattern = "dwnload_links_climatologies_.+txt$") %>%
8484
dplyr::tibble(url_file = .) %>%
8585
# Add download links
8686
dplyr::mutate(
@@ -97,7 +97,7 @@ chelsa_prepare <- function(
9797
# Extract time period
9898
time_period = purrr::map_chr(
9999
url_file, stringr::str_remove_all,
100-
pattern = "dwnload_links_Climatologies_|.txt"),
100+
pattern = "dwnload_links_climatologies_|.txt"),
101101

102102
# File extension
103103
extension = purrr::map_chr(url, tools::file_ext),

R/dwf_easin_download.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,10 +97,10 @@ easin_download <- function(
9797
}
9898

9999
# nolint start
100-
Skip <- (chunk_n - 1) * n_search
100+
skip <- (chunk_n - 1) * n_search
101101
# `exclude/dps/1` excludes GBIF observations
102102
url <- stringr::str_glue(
103-
"{easin_url}/{species_key}/exclude/dps/1/{Skip}/{n_search}")
103+
"{easin_url}/{species_key}/exclude/dps/1/{skip}/{n_search}")
104104
# nolint end
105105

106106
download_try <- 0

R/dwf_easin_taxonomy.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ easin_taxonomy <- function(
6060
# The API has been changed in April 2023; the main change: using
6161
# 'apixg/catxg' instead of 'api/cat'
6262
url <- stringr::str_glue(
63-
"{easin_url}/kingdom/{kingdom}/skip/{Skip}/take/{n_search}")
63+
"{easin_url}/kingdom/{kingdom}/skip/{skip}/take/{n_search}")
6464

6565
# Extract species data as tibble
6666
taxa_data <- try(RCurl::getURL(url, .mapUnicode = FALSE), silent = TRUE)

0 commit comments

Comments
 (0)