View source: R/ms_load_spatial_product.R
ms_load_spatial_product | R Documentation |
Load a macrosheds spatial product (ws_boundary, precip_gauge_locations,
or stream_gauge_locations) from a downloaded MacroSheds dataset. See
ms_load_product()
for core time-series data and watershed attributes.
ms_load_spatial_product(
macrosheds_root,
spatial_product,
version = "latest",
networks,
domains,
site_codes,
warn = TRUE
)
macrosheds_root |
character. The path to the macrosheds dataset's parent
directory, established with |
spatial_product |
character. One of "stream_gauge_locations", "precip_gauge_locations", or "ws_boundary" (watershed boundary) Files associated with the requested product will be combined across specified networks/domains. |
version |
numeric or "latest". The MacroSheds dataset version from which to load data. |
networks |
character vector. MacroSheds networks to load; optional. Omit networks, domains, and site_codes to load all. For a catalog of
networks, use |
domains |
character vector. MacroSheds domains to load; optional. Omit networks, domains, and site_codes to load all. For a catalog of
domains, use |
site_codes |
character vector. MacroSheds networks to load; optional. Omit networks, domains, and site_codes to load all. For a catalog of
sites, use |
warn |
logical. If TRUE, you'll get notifications about more recent versions of the MacroSheds dataset, if available. |
returns an sf
object containing all data belonging to the
selected spatial product in the macrosheds_root
directory.
Spencer Rhea
Mike Vlah, vlahm13@gmail.com
Wes Slaughter
ms_download_core_data()
, ms_load_product()
, ms_load_variables()
, ms_load_sites()
ms_root = 'data/macrosheds'
ms_download_core_data(macrosheds_root = ms_root,
domains = c('niwot', 'hjandrews', 'hbef'))
macrosheds_data <- load_spatial_product(macrosheds_root = ms_root,
spatial_product = 'ws_boundary'
domains = 'hbef')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.