Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/jsta/nesRdata

R package to fetch, cache, and serve the National Eutrophication Survey
https://github.com/jsta/nesRdata

cran hydrology rstats water-quality

Last synced: 8 days ago
JSON representation

R package to fetch, cache, and serve the National Eutrophication Survey

Awesome Lists containing this project

README

        

---
output: github_document
---

```{r setup, echo = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "README-"
)
```

# National Eutrophication Survey Data Package

[![Project Status: Active – The project has reached a stable, usable state and is being actively developed.](http://www.repostatus.org/badges/latest/active.svg)](http://www.repostatus.org/#active)
[![CRAN_Status_Badge](http://www.r-pkg.org/badges/version/nesRdata)](https://cran.r-project.org/package=nesRdata)

## Installation

```{r installation, eval=FALSE}
# install stable version from CRAN
install.packages("nesRdata")

# install development version from Github
# install devtools if not found - install.packages("devtools")
# devtools::install_github("jsta/nesRdata", update_dependencies = TRUE)
```

## Usage

```{r load_package}
library(nesRdata)
```

### View static compilation of all lakes

```{r static}
data(nes)
head(nes)
```

### Download dynamic external data and cache in file system

```{r get_cached, message=FALSE, eval=FALSE}
nes_get(version_id = "5", dest_folder = cache_path())
```

#### List cached (non-temporary) versions

```{r versions, eval=FALSE}
nes_versions()
```

#### Load data

```{r load_data, eval=FALSE}
dt <- nes_load(version_id = "5", folder = cache_path())
names(dt)
lapply(dt, head)
```

## Metadata

`help.search("^nes$", package = "nesRdata")`

## Contributing

We’ve tried to fix any transciption errors from the original data files but it’s difficult to catch them all. If you find any errors please open an issue or submit a pull request against the files at https://github.com/ReproducibleQM/NES

## References

Stachelek, J., Ford, C., Kincaid, D., King, K., Miller, H. and Nagelkirk, R., 2018. The National Eutrophication Survey: lake characteristics and historical nutrient concentrations. Earth System Science Data, 10(1), pp.81-86.