knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>"
)

by Jason Williams

1.0 Overview

The idtemp R package includes tools for interacting with continuous water temperature data in R. It was developed to help facilitate exploration and analysis of Idaho stream temperature data using R. The package currently includes a tool for plotting NorWeST data by site. Future functionality will include tools for comparing NorWeST data to Idaho temperature criteria, and tools for importing and comparing user-supplied temperature data to criteria.

This tutorial assumes users have some basic R experience, such as installing and loading R packages.

Package source code is available on github: https://github.com/jjwill2/idtemp

2.0 Install the idtemp package from github

# devtools package is required to install packages from github
library(devtools)

#install idtemp package
install_github("jjwill2/idtemp")

# load idtemp package
library(idtemp)

3.0 Tools for NorWeST data

NorWeST data are included with the R package; when you load the package, you also load daily summary statistics and site information from the NorWeST database.

3.1 Plot temperature data for a specific NorWeST site (PERMA_FID)

To plot data for a site, use the plot_norwest() function, which requires three arguments: a NorWeST basin name (Clearwater, Salmon, SpoKoot, MidSnake, or SnakeBear), a site (PERMA_FID), and parameter to plot (DailyMean, DailyMax, DailyMin, or DailySD). The resulting plot is faceted by year. Facet labels are OBSPRED_ID: Year, where OBSPRED_ID a unique identifier for a site/year combination in the NorWeST database.

# plot DailyMean
idtemp::plot_norwest(Clearwater, 12163, DailyMean)

# plot DailyMax
idtemp::plot_norwest(Clearwater, 12163, DailyMax)


jjwill2/idtemp documentation built on Aug. 10, 2020, 12:44 a.m.