download_cropscape {amadeus} | R Documentation |
Download CropScape data
Description
Accesses and downloads United States Department of Agriculture CropScape Cropland Data Layer data from the USDA National Agricultural Statistics Service or the George Mason University website.
Usage
download_cropscape(
year = seq(1997, 2023),
source = c("USDA", "GMU"),
directory_to_save = NULL,
acknowledgement = FALSE,
download = FALSE,
remove_command = FALSE,
unzip = TRUE,
hash = FALSE
)
Arguments
year |
integer(1). Year of the data to download. |
source |
character(1). Data source, one of
|
directory_to_save |
character(1). Directory to download files. |
acknowledgement |
logical(1). By setting |
download |
logical(1). |
remove_command |
logical(1).
Remove ( |
unzip |
logical(1). Unzip the downloaded compressed files.
Default is |
hash |
logical(1). By setting |
Value
For
hash = FALSE
, NULLFor
hash = TRUE
, anrlang::hash_file
character.Yearly comma-separated value (CSV) files will be stored in
directory_to_save
.
Note
JSON files should be found at STAC catalog of OpenLandMap
Author(s)
Insang Song
Examples
## Not run:
download_cropscape(
year = 2020,
source = "USDA",
directory_to_save = tempdir(),
acknowledgement = TRUE,
download = FALSE, # NOTE: download skipped for examples,
remove_command = TRUE,
unzip = FALSE
)
## End(Not run)