Code and data for:
Jemma Stachelek and Patricia A. Soranno. 2019. Does Freshwater Connectivity Influence Phosphorus Retention in Lakes? Limnology and Oceanography 10.1002/lno.11137
The full system and R environment required to reproduce the paper and analyses is specified in this Dockerfile (jsta/stachelek_soranno_2019).
Run the following commands with Docker installed to rebuild the pre-print and test connectivity metric calculations:
docker pull jsta/stachelek_soranno_2019
docker run --rm -e PASSWORD=<PASSWORD> jsta/stachelek_soranno_2019
docker ps # note container "code name"
docker exec -ti <NAME> /bin/bash
cd nes_connectivity_p
# build analysis from precomputed connectivity metrics
make -B all
# test connectivity metric calculations
make test_calc_metrics
Run the following commands to fully recalculate connectivity metrics:
docker run -e PASSWORD=<PASSWORD> --rm -v ~/.local/share/LAGOS-GIS:/root/.local/share/LAGOS-GIS jsta/stachelek_soranno_2019
docker ps # note container "code name"
docker exec -ti <NAME> /bin/bash
cd nes_connectivity_p
# test a single lake
Rscript data/connectivity_metrics.R 7003
# recalculate all lakes
make -B data
LAGOSNEgis |
|
nhdR |
|
spnetwork |
|
streamnet |
|
rgrass7sf |
|
tidybayes |
|
nlaR |