class: center, middle, inverse, title-slide # R packages as a reproducible framework for lake and cyanobacteria research ### Jeff Hollister ###
2017-08-16 EPA R User Group Meeting
--- class: center, middle, inverse class: center, middle, inverse # Who and what? --- # Who are we? .left-column[ - Ecologists - Computational focus - Enough to be dangerous - 3 FTE - Myself - Betty Kreakie - Bryan Milstead - 2 Post-docs - Farnaz Nojavan - Stephen Shivers ] .right-column[ <img src="figure/comp_eco_crew.jpg" style="margin-left: 75px"></img> ] --- # What do we do? - Apply computational approaches to understand water quality impacts in lakes - Modelling - Open Data - New tooling - Adding field component - SSWR 4.01C: A Data Intensive Investigation of Temperature Impacts and Bloom Modelling ![function](figure/cyano_model_function.jpg) --- class: center, middle, inverse # Packages --- # Why Packages - Useful structure - Infrastrcutre for sharing - GitHub - CRAN - We are an R shop! <img src="https://media.giphy.com/media/l2JhtKtDWYNKdRpoA/giphy.gif" style="width: 80%; height: 80%; margin-left: 10%;"></img> --- # Research Compendia .left-column[ - Define - Origins - [Gentleman and Lang (2004)](http://biostats.bepress.com/bioconductor/paper2) - Part of - Reproducible Research - Literate Programming (ala Donald Knuth) - ROpenSci efforts - [rrrpkg](https://github.com/ropensci/rrrpkg) - [ROpenSci unconf 2017 discussion](https://github.com/ropensci/unconf17/issues/5) ] .right-column[ <img src="http://www.dlib.org/dlib/january17/nuest/nuest-fig1.png" style="margin-left: 75px"></img> from NĂ¼st, Konkol, et al (2017), https://doi.org/10.1045/january2017-nuest ] --- # Packages as Research Compendia - R, Data, and Vignettes folders - Other examples - [Carl Boettiger's template](https://github.com/cboettig/template) - [Ben Marwick](https://github.com/benmarwick/Pleistocene-aged-stone-artefacts-from-Jerimalai--East-Timor) - Our examples - https://github.com/usepa/LakeTrophicModelling - https://github.com/usepa/Microcystinchla) - GitHub and Zenodo (Archive) ![ghz](ghz.jpg) --- # Packages to solve common problems - `lakemorpho` - `elevatr` - `lakescape` (in development) <img src="https://media3.giphy.com/media/ID4NXWnwuLnLq/200.webp#0-grid1" style="width: 80%; height: 80%; margin-left: 10%;"></img> --- # `lakemorpho` .footnote[Package URL: <https://cran.r-project.org/package=lakemorpho>] .left-column[ - Lake morphometry metrics in R - Version 1.0 - August 2014 - Version 1.1.0 - December 2016 - `sf` support to be added - [National Lake Morphometry](https://edg.epa.gov/metadata/catalog/search/resource/details.page?uuid=%7B495CBAED-9BB9-49B4-80A7-1C91DE5FCA95%7D) - [Hollister and Milstead (2010)](http://dx.doi.org/10.1080/07438141.2010.504321) - [Hollister *et. al.* (2011)](http://dx.doi.org/10.1371/journal.pone.0025764) - [Hollister and Stachelek (To Be Submitted)](https://github.com/usepa/lakemorpho_manuscript) ] .right-column[ ![](index_files/figure-html/unnamed-chunk-1-1.png)<!-- --> ] --- class: center, middle background-image: url('figure/lakemorpho_demo.png') background-position: 50% 50% # lakemorpho::demo <!-- # [lakemorpho: Demo](http://server.jwhollister.com:8787) --> --- # `elevatr` .footnote[Package URL: <https://cran.r-project.org/package=elevatr>] .left-column[ - Access elevation data in R - Mapzen - AWS - USGS - Version 0.1.1 - January 2017 - Version 0.1.3 - March 2017 - Will be paired with `lakemorpho` - `sf` support to be added ] .right-column[ ![](index_files/figure-html/unnamed-chunk-2-1.png)<!-- --> ] --- class: center, middle background-image: url('figure/elevatr_demo.png') background-position: 50% 50% # elevatr::demo <!-- # [elevatr: Demo](http://server.jwhollister.com:8787) --> --- # `lakescape` - New effort with Bryan Milstead - Summarizes ancillary data for land area around lake - Census (via `censusapi`) - Landscover - Impervious - Accepts arbitrary spatial data for "lakescape" - Based on `sf` and tidy by design - <https://github.com/willbmisled/lakescape> --- # Thanks! .center[ ## Jeff Hollister US EPA </br> Atlantic Ecology Division </br> Narragansett, RI </br> email: [hollister.jeff@epa.gov](mailto:hollister.jeff@epa.gov) </br> twitter: [@jhollist](https://twitter.com/jhollist) </br> github: [jhollist](https://github.com/jhollist) </br> Slides created via the R package [**xaringan**](https://github.com/yihui/xaringan). ]