Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jsta/nesr
Scrape Data from the National Eutrophication Survey
https://github.com/jsta/nesr
epa rstats water-quality
Last synced: about 2 months ago
JSON representation
Scrape Data from the National Eutrophication Survey
- Host: GitHub
- URL: https://github.com/jsta/nesr
- Owner: jsta
- License: gpl-3.0
- Created: 2016-12-13T14:40:40.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2023-10-10T18:03:24.000Z (over 1 year ago)
- Last Synced: 2024-06-11T17:08:54.117Z (8 months ago)
- Topics: epa, rstats, water-quality
- Language: R
- Homepage: https://dx.doi.org/10.5063/F1KK98R5
- Size: 25.1 MB
- Stars: 1
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.Rmd
- License: LICENSE
Awesome Lists containing this project
README
---
output: github_document
bibliography:
- inst/references.bib
nocite: |
@brett_review_2007, @reckhow_empirical_1988, @StachelekNationalEutrophicationSurvey2017
csl: inst/ecology.csl
---```{r, echo = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "README-"
)
``````{r knitcitations, echo=FALSE, cache = FALSE}
library(knitcitations)
cleanbib()
cite_options(citation_format = "pandoc")
```# nesR
Code to rescue (scrape) data from the National Eutrophication Survey archival PDF.
## Installation
### Prerequites
Until `magick` can handle local adaptive thresholding. This package requires you to be able to call the `imagemagick` `convert` command with `system()`.
You can install nesR from github with:
```{r gh-installation, eval = FALSE}
# install.packages("devtools")
devtools::install_github("jsta/nesR")
```## Usage
### Load package
```{r }
library(nesR)
```### Get data
```{r eval=TRUE}
nes_file <- system.file("extdata/national-eutrophication-survey_477.PDF",
package = "nesR")
res <- nes_get(nes_file, 89)
parse_nes(res)
```### Build database
As written, building the NES database requires GNU Make and the ability to run `R` commands using the `Rscript` command-line utility (aka doesn't work on Windows). For best results, use a machine with at least 4 GB RAM.
```{bash eval=FALSE}
make PDFSOURCE=474 all
make PDFSOURCE=475 all
make PDFSOURCE=476 all
make PDFSOURCE=477 all
```# References
```{r write_citations, cache=FALSE, include=FALSE,eval=FALSE}
write.bibtex(file="inst/references.bib")
```