-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME.Rmd
84 lines (52 loc) · 3.13 KB
/
README.Rmd
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
---
title: acewater
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, echo = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "README-"
)
```
[![Project Status: Abandoned – Initial development has started, but there has not yet been a stable, usable release; the project has been abandoned and the author(s) do not intend on continuing development.](https://www.repostatus.org/badges/latest/abandoned.svg)](https://www.repostatus.org/#abandoned)
[![license](https://img.shields.io/github/license/mashape/apistatus.svg)]()
**Note:** The data feeds used by this package are no longer publicly available, so this package does not work
acewater provides an interface to the real-time water monitoring data provided by the [Water Management Section of the Seattle District Corps of Engineers](http://www.nwd-wc.usace.army.mil/nws/hh/www/index.html), which covers most of Washington, Northern Idaho, and Northwestern Montana.
The main function, `get_water_conditions` returns a tidy data frame (a [tibble](http://tibble.tidyverse.org)).
## Installation
You can install acewater from github with:
```{r gh-installation, eval = FALSE}
# install.packages("devtools")
devtools::install_github("briandconnelly/acewater")
```
## Example
### Get the current conditions at the [Grand Coulee Dam](https://en.wikipedia.org/wiki/Grand_Coulee_Dam) (GCL), part of the [Eastern Washington Rivers](http://www.nwd-wc.usace.army.mil/nws/hh/www/eastern.html) (EWA) project:
```{r Eaxmple Grand Coulee Dam}
library(acewater)
(gcl <- get_water_conditions(station = "GCL", project = "EWA"))
```
We can easily plot the water conditions for a given station (if [ggplot2](http://ggplot2.tidyverse.org) is installed).
```{r Example Plot Grand Coulee Dam}
library(ggplot2)
autoplot(gcl)
```
### Get the most recent conditions at the [Fremont Bridge](https://en.wikipedia.org/wiki/Fremont_Bridge_(Seattle)) (station FBLW) in the [Lake Washington Ship Canal](https://en.wikipedia.org/wiki/Lake_Washington_Ship_Canal) (project LKW):
Here, we see that this station monitors different properties:
```{r Example Fremont Bridge}
(fblw <- get_water_conditions(station = "FBLW", project = "LKW"))
autoplot(fblw)
```
### Get Conditions from Multiple Stations
We can use [purrr](http://purrr.tidyverse.org) to combine data from multiple stations into a tidy data frame.
Here, we'll get data from a few stations along the [Lake Washington Ship Canal](https://en.wikipedia.org/wiki/Lake_Washington_Ship_Canal).
```{r Example Multiple Stations, message=FALSE, warning = FALSE}
(lkw <- purrr::map_df(c("UBLW", "FBLW", "LLLW"), get_water_conditions, project = "LKW"))
autoplot(lkw)
```
## Data Subject to Revision
Because the data retrieved by acewater are preliminary and have not been verified or approved by the agencies collecting them, inaccuracies may be present due to instrument malfunctions or physical changes at the measurement site.
## Contributer Code of Conduct
Please note that this project is released with a [Contributor Code of Conduct](CONDUCT.md).
By participating in this project you agree to abide by its terms.