knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  eval = FALSE,
  fig.path = "man/figures/README-",
  out.width = "100%"
)

nohrsc

Travis-CI Build Status AppVeyor Build Status Coverage Status

nohrsc is designed to make it easy to access the NOHRSC data archive. It takes common name arguments and dates to construct the proper URLs and access the correctly formatted file names. Multiple days and products can be downloaded and extracted in a single call. The extracted rasters will be converted to *.bil format and an appropriate *.hdr and *.prj will be created for each raster.

Installation

If you are using Windows you should install nohrsc by downloading the binary version (see below) of the package. Otherwise you can build nohrsc from these source files.

Windows Installation

install.packages("https://pages.mtu.edu/~jpshanno/win_binaries/nohrsc.zip", 
                 repos = NULL)

remotes Linux Installation

remotes::install_github("jpshanno/nohrsc")

or without remotes by Linux Installation without remotes package

nohrsc_source <- file.path(tempdir(), "nohrsc-master.zip")
download.file("https://github.com/jpshanno/nohrsc/archive/master.zip",
              nohrsc_source)
unzip(nohrsc_source,
        exdir = dirname(nohrsc_source))
install.packages(sub(".zip$", "", nohrsc_source),
                 repos = NULL,
                 type = "source")

Development Timeline

Minimum Viable Product

First Improvement

Second Improvement

Example

Download data over three days and extract SWE and melt data:

library(nohrsc)
rasters <- 
  nsa_get_snodas(product = c("snow water equivalent", "snow melt"),
                 start.date = "2015-04-01",
                 end.date = "2015-04-03",
                 path = "snodas")


jpshanno/nohrsc documentation built on Feb. 20, 2023, 7:33 p.m.