-
Notifications
You must be signed in to change notification settings - Fork 6
/
precipitation.Rd
61 lines (56 loc) · 2.08 KB
/
precipitation.Rd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/data.R
\docType{data}
\name{precipitation}
\alias{precipitation}
\title{Precipitation Rate}
\format{
An object of data.frame class with 582 records and the following variables:
with the following variables:
\describe{
\item{YearMonth}{year and month during which precipitation were recorded,
with a required date format of \code{YYYYMM}.}
\item{PrecipZone}{name of the precipitation zone,
see \code{\link{precip.zones}} dataset for details.}
\item{Precip}{monthly depth of precipitation accounting for spring melt, in meters.}
\item{Precip.raw}{monthly depth of precipitation recorded at the weather station,
in meters.}
}
}
\source{
Idaho Department of Water Resources, accessed on April 24, 2015
}
\usage{
precipitation
}
\description{
Precipitation rates in the Wood River Valley and surrounding areas.
}
\examples{
str(precipitation)
d <- precipitation
d <- data.frame(Date = as.Date(paste0(d$YearMonth, "15"), format = "\%Y\%m\%d"),
Precip = d$Precip)
zones <- c("Hailey", "Ketchum", "Picabo")
d1 <- d[precipitation$PrecipZone == zones[1], ]
d2 <- d[precipitation$PrecipZone == zones[2], ]
d3 <- d[precipitation$PrecipZone == zones[3], ]
d <- merge(merge(d1, d2, by = "Date"), d3, by = "Date")
col <- c("red", "blue", "green")
ylab <- paste("Precipitation in", c("meters", "feet"))
inlmisc::PlotGraph(d, ylab = ylab, col = col, lty = 1:3,
conversion.factor = 3.28084, seq.date.by = "year")
legend("topright", zones, col = col, lty = 1:3, inset = 0.02, cex = 0.7,
box.lty = 1, bg = "#FFFFFFE7")
graphics.off()
}
\references{
National Oceanic and Atmospheric Administration's National Weather Service
(\href{https://www.ncdc.noaa.gov/data-access/land-based-station-data/land-based-datasets/cooperative-observer-network-coop}{NWS}) Cooperative Observer Program
U.S. Bureau of Reclamation's Cooperative Agricultural Weather Network
(\href{https://www.usbr.gov/pn/agrimet/}{AgriMet})
}
\seealso{
\code{\link{precip.zones}}, \code{\link{swe}}
}
\keyword{datasets}