https://github.com/jsta/nlar
R interface to the National Lakes Assessment
https://github.com/jsta/nlar
cran limnology rstats
Last synced: 5 months ago
JSON representation
R interface to the National Lakes Assessment
- Host: GitHub
- URL: https://github.com/jsta/nlar
- Owner: jsta
- Created: 2016-12-01T19:20:48.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2023-03-16T14:40:24.000Z (about 3 years ago)
- Last Synced: 2025-02-01T08:49:03.285Z (over 1 year ago)
- Topics: cran, limnology, rstats
- Language: HTML
- Homepage: https://jsta.github.io/nlaR
- Size: 2.37 MB
- Stars: 3
- Watchers: 2
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.Rmd
Awesome Lists containing this project
README
---
output: github_document
---
```{r, echo = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "images/"
)
```
# nlaR
[](https://lifecycle.r-lib.org/articles/stages.html#stable)
[](https://cran.r-project.org/package=nlaR)
[](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)