Interface to the National Lakes Assessment

Client for programmatic access to the 2007 and 2012 National Lakes Assessment database < https://www.epa.gov/national-aquatic-resource-surveys/nla> containing data for hundreds of lakes in the lower 48 states of the contiguous US.


lifecycle CRAN status Travis-CI Build Status

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:

devtools::install_github("jsta/nlaR")

Usage

Load package

library(nlaR)

Retrieve data from EPA Website

nla_get(2012, use_rappdirs = TRUE)

Load data from local machine

dt <- nla_load(2012)

View NLA tables

names(dt)
#>  [1] "algaltoxins"    "atrazine"       "bentcond"       "bentmet"       
#>  [5] "benttaxa_wide"  "chla_wide"      "phytocnt"       "phytotaxa_wide"
#>  [9] "secchi"         "topsedhg"       "waterchem_wide" "wide_benthic"  
#> [13] "wide_phab"      "wide_phabmet"   "wide_profile"   "wide_siteinfo" 
#> [17] "zoopcond"       "zoopmets"       "zooptaxa_wide"
head(dt$phytocnt)
#>   PUBLICATION_DATE  UID SAMPLE_TYPE TAXA_ID        PARAMETER   RESULT
#> 1        2/12/2014 6160        PHYL    4075        BIOVOLUME 219.9113
#> 2        2/12/2014 6160        PHYL    4075          DENSITY       25
#> 3        2/12/2014 6160        PHYL    4075   INITIAL_VOLUME     1080
#> 4        2/12/2014 6160        PHYL    4095 SUBSAMPLE_VOLUME      200
#> 5        2/12/2014 6160        PHYL    4095   VOLUME_COUNTED       10
#> 6        2/12/2014 6160        PHYL    4095       TOTAL_AREA 283.5287

More Examples

See vignettes.

References

  • National Lakes Assessment EPA page

  • Water quality metadata

  • 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

News

nlaR 0.4

  • Bug fix to create missing folder when using rappdirs

nlaR 0.3

  • Added a NEWS.md file to track changes to the package.

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("nlaR")

0.4.0 by Joseph Stachelek, 2 months ago


https://github.com/jsta/nlaR


Report a bug at https://github.com/jsta/nlaR/issues


Browse source code at https://github.com/cran/nlaR


Authors: Joseph Stachelek [aut, cre]


Documentation:   PDF Manual  


GPL license


Imports rappdirs

Suggests knitr, rmarkdown, dplyr, magrittr, skimr, sf, maps, R.rsp


See at CRAN