ms_download_core_data: Download macrosheds core datasets

View source: R/ms_download_core_data.R

ms_download_core_dataR Documentation

Download macrosheds core datasets

Description

Download the macrosheds core datasets of stream chemistry, stream discharge, stream solute flux, precipitation, precipitation chemistry, precipitation solute flux, annual solute loads, ws_boundary, stream_gauge_locations, and precip_gauge_locations. Not all products are available at all sites, but all products available for the selected domains will be downloaded.

Usage

ms_download_core_data(
  macrosheds_root,
  networks,
  domains,
  version = "latest",
  skip_existing = TRUE,
  quiet = FALSE
)

Arguments

macrosheds_root

character. Directory where macrosheds data files will be downloaded. If this directory does not exist, it will be created. The macrosheds_root directory should only be used for MacroSheds data files.

networks

character vector. macrosheds networks that will be downloaded. Either a single network, vector of networks, or 'all'. Either networks or domains must be supplied. See ms_load_sites() for networks available for download.

domains

character vector. macrosheds domains that will be downloaded. Either a single domain, vector of domains, or 'all'. Either domains or networks must be supplied. See ms_load_sites() for domains available for download.

version

numeric or "latest". The MacroSheds dataset version to download.

skip_existing

logical. If FALSE, dataset components already downloaded to macrosheds_root will be overwritten. If TRUE, these will be skipped.

quiet

logical. If TRUE, some messages will be suppressed.

Details

The core time-series dataset is approximately 6 GiB uncompressed.

Value

Downloads all core data for selected domains to the directory specified by macrosheds_root. Site datasets are arranged according to the following structure: domain/prodname/site_code.feather. For definitions of these terms as used by MacroSheds, see glossary.txt on MacroSheds EDI.

Author(s)

Spencer Rhea

Mike Vlah, vlahm13@gmail.com

Wes Slaughter

See Also

ms_load_sites(), ms_load_variables(), ms_load_product(), ms_load_spatial_product()

Examples

ms_download_core_data(macrosheds_root = 'data/macrosheds',
                      domains = c('niwot', 'hjandrews'))

MacroSHEDS/macrosheds documentation built on Oct. 30, 2024, 11:15 a.m.