-
Notifications
You must be signed in to change notification settings - Fork 4
/
README.Rmd
72 lines (48 loc) · 1.93 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
---
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 = "images/"
)
```
# nlaR
[![lifecycle](https://img.shields.io/badge/lifecycle-stable-brightgreen.svg)](https://lifecycle.r-lib.org/articles/stages.html#stable)
[![CRAN status](http://www.r-pkg.org/badges/version/nlaR)](https://cran.r-project.org/package=nlaR)
[![R-CMD-check](https://github.com/jsta/nlaR/actions/workflows/check.yml/badge.svg)](https://github.com/jsta/nlaR/actions/workflows/check.yml)
The goal of nlaR is to provide an R interface to the National Lakes Assessment data. At this point it serves either the 2007 or 2012 data (see examples below).
## Installation
You can install nlaR from Github with:
```{r gh-installation, eval = FALSE}
# install.packages("devtools")
devtools::install_github("jsta/nlaR")
```
## Usage
### Load package
```{r }
library(nlaR)
```
### Retrieve data from EPA Website
> Turn on automated data storage at the location returned by `rappdirs::user_data_dir()`
```{r eval=FALSE}
nla_get(2012, use_rappdirs = TRUE)
```
### Load data from local machine
```{r }
dt <- nla_load(2012)
```
### View NLA tables
```{r }
names(dt)
head(dt$phytocnt)
```
## More Examples
See [vignettes](https://jsta.github.io/nlaR/articles/).
## References
* [National Lakes Assessment EPA page](https://www.epa.gov/national-aquatic-resource-surveys/nla)
* Water quality metadata
* [2012](https://www.epa.gov/sites/production/files/2016-12/nla2012_waterchem_meta.txt)
* Stoddard, J.L., Van Sickle, J., Herlihy, A.T., Brahney, J., Paulsen, S., Peck, D.V., Mitchell, R. and Pollard, A.I., 2016. Continental-scale increase in lake and stream phosphorus: Are oligotrophic systems disappearing in the United States?. Environmental Science & Technology, 50(7), pp.3409-3415. [10.1021/acs.est.5b05950](https://doi.org/10.1021/acs.est.5b05950)