Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions R/download.R
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#' user acknowledges that the data downloaded using this function may be very
#' large and use lots of machine storage and memory.
#' @param hash logical(1). By setting \code{TRUE} the function will return
#' an \code{rlang::hash_file()} hash character corresponding to the
#' a combined MD5 hash string for the
#' downloaded files. Default is \code{FALSE}.
#' @param nasa_earth_data_token character(1) or NULL. NASA EarthData
#' authentication token. Required for NASA datasets (`"geos"`, `"merra2"`,
Expand Down Expand Up @@ -52,7 +52,7 @@
#' * \code{\link{download_edgar}}: `"edgar"`
#' @return
#' * For \code{hash = FALSE}, NULL
#' * For \code{hash = TRUE}, an \code{rlang::hash_file} character.
#' * For \code{hash = TRUE}, a combined MD5 hash string.
#' * Data files will be downloaded and stored in respective
#' sub-directories within \code{directory_to_save}. File format and
#' sub-directory names depend on data source and dataset of interest.
Expand Down Expand Up @@ -886,7 +886,7 @@ download_gmted <- function(
#' @param download logical(1). DEPRECATED. Downloads happen automatically.
#' @param remove_command logical(1). Deprecated, ignored.
#' @param hash logical(1). By setting \code{TRUE} the function will return
#' an \code{rlang::hash_file()} hash character corresponding to the
#' a combined MD5 hash string for the
#' downloaded files. Default is \code{FALSE}.
#' @param show_progress logical(1). Show download progress (default TRUE)
#' @param max_tries integer(1). Maximum retry attempts (default 20)
Expand Down Expand Up @@ -3699,7 +3699,7 @@ download_terraclimate <- function(
#' Default is \code{FALSE}. Not working for this function since HUC data
#' is in 7z format.
#' @param hash logical(1). By setting \code{TRUE} the function will return
#' an \code{rlang::hash_file()} hash character corresponding to the
#' a combined MD5 hash string for the
#' downloaded files. Default is \code{FALSE}.
#' @param show_progress logical(1). Show download progress.
#' Default is \code{TRUE}.
Expand All @@ -3709,7 +3709,7 @@ download_terraclimate <- function(
#' Default is \code{2}.
#' @return
#' * For \code{hash = FALSE}, NULL
#' * For \code{hash = TRUE}, an \code{rlang::hash_file} character.
#' * For \code{hash = TRUE}, a combined MD5 hash string.
#' * Downloaded files will be stored in \code{directory_to_save}.
#' @author Insang Song
#' @importFrom Rdpack reprompt
Expand Down Expand Up @@ -3890,7 +3890,7 @@ download_huc <-
#' @param remove_zip logical(1). Remove zip file from directory_to_download.
#' Default is \code{FALSE}.
#' @param hash logical(1). By setting \code{TRUE} the function will return
#' an \code{rlang::hash_file()} hash character corresponding to the
#' a combined MD5 hash string for the
#' downloaded files. Default is \code{FALSE}.
#' @param show_progress logical(1). Show download progress.
#' Default is \code{TRUE}.
Expand All @@ -3901,7 +3901,7 @@ download_huc <-
#' @author Mariana Alifa Kassien
#' @return
#' * For \code{hash = FALSE}, NULL
#' * For \code{hash = TRUE}, an \code{rlang::hash_file} character.
#' * For \code{hash = TRUE}, a combined MD5 hash string.
#' * Zip and/or data files will be downloaded and stored in
#' \code{directory_to_save}.
#' @importFrom Rdpack reprompt
Expand Down Expand Up @@ -4359,7 +4359,7 @@ download_edgar <- function(
#' @param remove_zip logical(1). Remove the zip file after unzipping.
#' Default is \code{FALSE}. Only applies when \code{unzip = TRUE}.
#' @param hash logical(1). By setting \code{TRUE} the function will return
#' an \code{rlang::hash_file()} hash character corresponding to the
#' a combined MD5 hash string for the
#' downloaded files. Default is \code{FALSE}.
#' @param show_progress logical(1). Show download progress.
#' Default is \code{TRUE}.
Expand All @@ -4370,7 +4370,7 @@ download_edgar <- function(
#' @author Insang Song
#' @return
#' * For \code{hash = FALSE}, NULL
#' * For \code{hash = TRUE}, an \code{rlang::hash_file} character.
#' * For \code{hash = TRUE}, a combined MD5 hash string.
#' * .bil (normals) or single grid files depending on the format
#' choice will be stored in \code{directory_to_save}.
#' @importFrom Rdpack reprompt
Expand Down Expand Up @@ -4562,7 +4562,7 @@ download_prism <- function(
#' @param unzip logical(1). Unzip the downloaded compressed files.
#' Default is \code{FALSE}.
#' @param hash logical(1). By setting \code{TRUE} the function will return
#' an \code{rlang::hash_file()} hash character corresponding to the
#' a combined MD5 hash string for the
#' downloaded files. Default is \code{FALSE}.
#' @param show_progress logical(1). Show download progress.
#' Default is \code{TRUE}.
Expand All @@ -4574,7 +4574,7 @@ download_prism <- function(
#' @note JSON files should be found at STAC catalog of OpenLandMap
#' @return
#' * For \code{hash = FALSE}, NULL
#' * For \code{hash = TRUE}, an \code{rlang::hash_file} character.
#' * For \code{hash = TRUE}, a combined MD5 hash string.
#' * Yearly comma-separated value (CSV) files will be stored in
#' \code{directory_to_save}.
#' @examples
Expand Down
2 changes: 1 addition & 1 deletion vignettes/epa_download.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Start by downloading the AQS data files with `download_data`.
* `acknowledgement = TRUE`: acknowledge that data files may consume local
storage.
* `unzip = TRUE`: unzip downloaded zip files (default).
* `hash = TRUE`: generate unique SHA-1 hash for the downloaded files.
* `hash = TRUE`: generate unique MD5 hash for the downloaded files.

```{r, eval = FALSE}
dir <- tempdir()
Expand Down
2 changes: 1 addition & 1 deletion vignettes/gridmet_workflow.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Start by downloading the netCDF data files with `download_data`.
* `year = c(2019, 2020)`: years of interest.
* `directory_to_save = dir`: directory to save the downloaded files.
* `acknowledgement = TRUE`: acknowledge that the raw data files are large and may consume lots of local storage.
* `hash = TRUE`: generate unique SHA-1 hash for the downloaded files.
* `hash = TRUE`: generate unique MD5 hash for the downloaded files.

```{r, eval = FALSE}
dir <- tempdir()
Expand Down
6 changes: 3 additions & 3 deletions vignettes/modis_workflow.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ Downloaded data files are Hierarchical Data Format (HDF), with the extension `.h
* `nasa_earth_data_token = Sys.getenv("NASA_EARTHDATA_TOKEN")`: User-specific NASA credentials.
* `directory_to_save = dir_mod11a1`: directory to save the downloaded files.
* `acknowledgement = TRUE`: acknowledge that the raw data files are large and may consume lots of local storage.
* `hash = TRUE`: generate unique SHA-1 hash for the downloaded files.
* `hash = TRUE`: generate unique MD5 hash for the downloaded files.

```{r, eval = FALSE}
dir_mod11a1 <- file.path(tempdir(), "mod11a1")
Expand Down Expand Up @@ -309,7 +309,7 @@ Downloaded data files are Hierarchical Data Format version 5 (HDF5), with the ex
* `nasa_earth_data_token = Sys.getenv("NASA_EARTHDATA_TOKEN")`: User-specific NASA credentials.
* `directory_to_save = dir_vnp46a2`: directory to save the downloaded files.
* `acknowledgement = TRUE`: acknowledge that the raw data files are large and may consume lots of local storage.
* `hash = TRUE`: generate unique SHA-1 hash for the downloaded files.
* `hash = TRUE`: generate unique MD5 hash for the downloaded files.

```{r, eval = FALSE}
dir_vnp46a2 <- file.path(tempdir(), "vnp46a2")
Expand Down Expand Up @@ -547,7 +547,7 @@ cat("[1] \"vignettes/data/LAADS_query.2025-08-12T14_29.csv\"\n")
* `mod06_links = "vignettes/data/LAADS_query.2025-08-12T14_29.csv"`: Manually downloaded CSV file with MOD06_L2 links.
* `directory_to_save = dir_mod06l2`: directory to save the downloaded files.
* `acknowledgement = TRUE`: acknowledge that the raw data files are large and may consume lots of local storage.
* `hash = TRUE`: generate unique SHA-1 hash for the downloaded files.
* `hash = TRUE`: generate unique MD5 hash for the downloaded files.

```{r, eval = FALSE}
dir_mod06l2 <- file.path(tempdir(), "mod06l2")
Expand Down
2 changes: 1 addition & 1 deletion vignettes/narr_workflow.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Start by downloading the netCDF data files with `download_data`.
* `year = c(2021, 2022)`: years of interest.
* `directory_to_save = dir`: directory to save the downloaded files.
* `acknowledgement = TRUE`: acknowledge that the raw data files are large and may consume lots of local storage.
* `hash = TRUE`: generate unique SHA-1 hash for the downloaded files.
* `hash = TRUE`: generate unique MD5 hash for the downloaded files.

```{r, eval = FALSE}
dir <- tempdir()
Expand Down
2 changes: 1 addition & 1 deletion vignettes/terraclimate_workflow.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Start by downloading the netCDF data files with `download_data`.
* `year = c(2021, 2022)`: years of interest.
* `directory_to_save = dir`: directory to save the downloaded files.
* `acknowledgement = TRUE`: acknowledge that the raw data files are large and may consume lots of local storage.
* `hash = TRUE`: generate unique SHA-1 hash for the downloaded files.
* `hash = TRUE`: generate unique MD5 hash for the downloaded files.

```{r, eval = FALSE}
dir <- tempdir()
Expand Down