snotel_download: Dowloads snotel data based upon a subset of the sno-tel info...

View source: R/snotel_download.r

snotel_downloadR Documentation

Dowloads snotel data based upon a subset of the sno-tel info as provided by snotel_info()

Description

Dowloads snotel data based upon a subset of the sno-tel info as provided by snotel_info()

Usage

snotel_download(
  site_id,
  network = "sntl",
  path = tempdir(),
  metric = TRUE,
  internal = FALSE
)

Arguments

site_id

subset of the sites listed by snotel_info()

network

network list to query (default = sntl, for SNOTEL)

path

where to save downloaded files (default = tempdir())

metric

return metric values, TRUE or FALSE (default = TRUE), when false returns the raw data files

internal

return data to workspace, TRUE or FALSE (default = FALSE)

Examples


## Not run: 
# download data for SNOTEL site 429 and 1287, returning data to 
# the R workspace
df <- snotel_download(site_id = c(429,1287), internal = TRUE)

# list a few first rows
head(df)

## End(Not run)

bluegreen-labs/snotelr documentation built on Oct. 19, 2024, 12:36 p.m.