Title: | Calculate and Visualize 'SNOTEL' Snow Data and Seasonality |
Version: | 1.5.2 |
Description: | Programmatic interface to the 'SNOTEL' snow data (https://www.nrcs.usda.gov/programs-initiatives/sswsf-snow-survey-and-water-supply-forecasting-program). Provides easy downloads of snow data into your R work space or a local directory. Additional post-processing routines to extract snow season indexes are provided. |
URL: | https://github.com/bluegreen-labs/snotelr, https://bluegreen-labs.github.io/snotelr/ |
BugReports: | https://github.com/bluegreen-labs/snotelr/issues |
Depends: | R (≥ 4.2) |
Imports: | shiny, httr, utils, stats, rvest, dplyr, memoise |
Suggests: | knitr, rmarkdown, covr, testthat, shinydashboard, leaflet, plotly, DT |
VignetteBuilder: | knitr |
License: | AGPL-3 |
ByteCompile: | true |
RoxygenNote: | 7.3.1 |
Encoding: | UTF-8 |
NeedsCompilation: | no |
Packaged: | 2024-11-20 11:55:05 UTC; khufkens |
Author: | Koen Hufkens |
Maintainer: | Koen Hufkens <koen.hufkens@gmail.com> |
Repository: | CRAN |
Date/Publication: | 2024-11-20 12:40:02 UTC |
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, |
internal |
return data to workspace, |
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)
Start the SNOTEL shiny interface
Description
Start the SNOTEL shiny interface
Usage
snotel_explorer()
Examples
# snotel_explorer()
Downloads a SNOTEL site listing for further processing
Description
Downloads a SNOTEL site listing for further processing
Usage
snotel_info(network = "sntl", path)
Arguments
network |
network list to query (default = sntl, for SNOTEL) |
path |
path where to save the snotel information (site list) |
Examples
## Not run:
# download the meta-data from the SNOTEL server
meta_data <- snotel_info()
# show a couple of lines
head(meta_data)
## End(Not run)
Convert snotel data to metric from imperial units
Description
Data is read from either a snotel data frame and returned as such.
Usage
snotel_metric(df)
Arguments
df |
snotel data frame |
Details
By default the conversion is done upon download. This function might serve some a purpose in processing of data grabbed straight from the server rather than through the package.
This is an internal function only. Hence, no examples are given.
Value
a data frame with imperial values converted to metric ones
Calculates snow phenology from the snow water equivalent data
Description
First snow melt, first continuous snow melt, first snow accumulation and continous snow accumulation are reported.
Usage
snotel_phenology(df, threshold = 0, offset = 180)
Arguments
df |
a snotel data file or data frame |
threshold |
threshold for mapping continuous snow cover |
offset |
offset of the year relative to January first (DOY 1) |
Details
Be sure to execute this code on individual sites when loading a combined tidy data frame containing data for multiple sites.
Examples
## Not run:
# download one of the longer time series
df <- snotel_download(site_id = 670, internal = TRUE)
# calculate the snow phenology
phenology <- snotel_phenology(df)
# show a couple of lines
head(phenology)
## End(Not run)