download_data() around shared argument
checks, URL and destination planning, download execution, and return handling.
Existing non-empty files are skipped by the shared download runner, which
also creates missing destination directories.download = FALSE previews as invisible lists containing
urls, destfiles, and n_files. Previews include all planned files,
including existing destinations. MODIS, MERRA-2, and GOES discovery can still make network requests. The download and remove_command arguments remain deprecated with warnings.success,
failed, skipped, failed_urls, and failed_files. Both failure vectors
are character(0) when no downloads fail, including when all files are
skipped. Counts describe file downloads, not extracted archive members.hash = TRUE returns with each source's output directory, using
data_files/ for extracted archives. Hashes are visible character scalars
and include existing files recursively. Preview returns take precedence
over hashing.sequence_years()
accept one year, two endpoints, or a longer vector and request every year
between the smallest and largest values. Date ranges accept endpoints in
either order. Added configurable bounds and documented the implemented
source-specific limits for HMS, NARR, NLCD, and CropScape; requests outside
those limits fail rather than being truncated.check_url_status() remains
available for other uses.download_unzip() to accept multiple archives with either one shared
extraction directory or one directory per archive. Source downloaders use
the common helper for batch extraction, including multi-year NLCD requests.
Requested archive cleanup runs after the extraction loop.zip_files/, with separate extraction folders
for each archive under data_files/. Added remove_zip support.download_eddi(), download_spei(), and download_usdm().
download_drought() delegates to these functions, and download_data()
routes their dataset aliases directly. SPEI now uses an explicit version
selection ("2.11", "2.10", or "legacy", defaulting to "2.11")
instead of automatically falling back between versions.xml2;
GOES listing failures now stop discovery instead of warning and continuing.process_nei() still supports only 2017 and 2020.api-, source-, and utils- groups, consolidated
download helpers, and made internal helper calls explicitly qualified.
Existing helper exports are retained. Updated download documentation and
test mocks for the shared workflow and return values.download_narr() base URL to drop the "Datasets" directory.Added GRIDMET EDDI integration for all eight accumulation periods, with eddi defaulting to eddi30d.
Added native 4-km GRIDMET SPEI downloads and extraction for eight accumulation periods, retaining five-day observation dates; spei defaults to spei30d.
Fixed process_gridmet() to use valid native NetCDF time metadata from terra::time() when available and fall back to layer-name parsing when needed
Fixed download_gridmet() to handle cases where all requested files already exist locally without calling download_run_method() with an empty URL list
process_tri() and calculate_tri() series..by and .by_time parameters to all calculate_*() functions for consistent spatial and temporal summarization options across all datasetscalculate_*() functions remains unchanged - i.e., no summarization, returning extracted or summarized values at the temporal resolution of the data - but users can now specify .by for spatial grouping (e.g., by HUC, county, state) and .by_time for temporal grouping (e.g., by year, month) to obtain summarized covariate values directly from the calculation stephms, koppen, and ecoregion datasets now have optional fraction covariate calculation
that returns the fraction of each category in the radius buffer.hms, koppen, and ecoregion datasets now have optional drop parameter that will drop or exclude categories that don't have any coverage in the radius buffer for a given point, which can help reduce the number of columns returned when many categories are possible but only a few are present in the area around the point.requireNamespace("nhdplusTools") checks in all functions that use itdownload_drought(), process_drought(), and calculate_drought()
supporting three drought datasets:
CONUS_Archive path are also supporteddownload_data(), process_covariates(), and calculate_covariates() using
aliases "drought", "spei", "eddi", or "usdm" for dataset_name /
covariate.process_drought() returns a SpatRaster (SPEI/EDDI) or SpatVector
polygons (USDM), both with CRS EPSG:4326.calculate_drought() supports .by / .by_time post-extraction
summarization consistent with all other calculate_*() functions.download_* functions from httr/wget/curl
command-line calls to httr2 for all network requestsdownload parameter (use default download = TRUE) and
remove_command parameter across all download functions; both now emit
informative warnings and are ignoredhash parameter to all download_* functions for optional MD5
file integrity verification via download_hash() (using system md5sum)unzip and remove_zip parameters to download_prism() for
post-download archive handlingdownload_run_method() internal helper for unified httr2-based
file retrieval with progress reporting, retry logic, and rate limitingcheck_url_status() for general-purpose URL validationdownload_narr() documentation, listing
all 88 available NARR variable abbreviations with descriptions grouped by
category (monolevel, pressure level, subsurface); resolves
#194download_narr() tests covering every variable abbreviation across
all three variable categoriesdownload_data() dispatch to include "edgar" so
download_edgar() is reachable via the wrapper functionfuture and future.apply dependencies were removed
nthreads argument is removed from calculate_modis_par() and calculate_nlcd()calculate_modis_par() is renamed to calculate_modis()calc_*() functions are renamed to calculate_*() per naming convention of other function family in the package