Giter Site home page Giter Site logo

oyster-insitu-filtration's Introduction

In situ Habitat Clearance Rates and Particle Size Preference of Indigenous Olympia Oysters (Ostrea lurida) and Non-native Pacific Oysters (Magallana gigas) in the North American Pacific Coast Estuaries

This repository holds the wrangling, analysis, and document building code for two versions of this research: 1) Publication_Analysis and 2) Thesis_Manuscript

DOI

Instructions to Reproduce Publication Analysis:

  1. Run renv::activate() and then renv::restore()
  2. Run 01_Data_wrangling.Rmd
  3. Run Publication_Analysis/Pub_Results.Rmd Note: not all code chunks will run by design

Publication

Marks, A. N., Gray, M. W., Nichols, K., & Zacherl, D. C. (2024). In situ habitat clearance rates and particle size preference of indigenous Olympia oysters (Ostrea lurida) and non-native Pacific oysters (Magallana gigas) in North American Pacific coast estuaries. Science of The Total Environment, 912, 169267. https://doi.org/10.1016/j.scitotenv.2023.169267

Code version for publication --> DOI

File Details:

  • Data/ Raw data directory
    • bibalve_density_community/data pertaining bivalve DTW, density, and shell height
    • gray_data/ lurida & gigas partical selection data from co-author Matt Gray
    • Insitu_Filter_POM_PIM_Data.csv Particulate organic matter and particulate inorganic matter data from HCR trials
    • Insitu_Filter_sbs_FR_variables_All_data.csv observations about each HCR field trial
    • Insitu_Filter_velocity_all_data.csv water velocity for all HCR field trials
    • map_rnaturalearth/ raster data downloaded from rnaturalearth
    • sonde_time_series/ directory containing raw water quality sonde data for all HCR trials
  • manual_Corrections/ contains a .csv with field notes and observations used to cut disturbed data from raw data (e.g. major boat wake)
  • Thesis_Manuscript/ contains scripts used to construct CSUF thesis
  • Publication_Analysis/ directory used to analyze data for publication
    • Pub_Results.Rmd Rmarkdown file with all analyses, sources scripts, text was not used in manuscript
    • scripts/ contains individual analysis scripts sourced from Pub_Results.Rmd
    • figures/ folder containing figure outputs from Pub_Results.Rmd
  • output/ will be populated by 10 sub-directories when 01_Data_wrangling.Rmd is run
  • functions.R contains wrangling and analysis functions. sourced by other .Rmd scripts
  • 01_Data_wrangling.Rmd cleans up raw data, pairs upstream and downstream measurements based on water velocity, corrects instrument measurements based on side-by-side trials and compiles summary tables used in further analysis. When knit, this file produces a html dashboard Insitu_Filtration_Data_wrangling.html displaying time series plots of filtration and side-by-side before and after trials for each field experiment. Tabs show raw data, data corrected by manual_Corrections, and Chlorophyll drawdown over time of paired instrument measurements.
  • 02_Water_Quality.Rmd when knit produces a html dashboard Insitu_Filtration_Water_Quality.html that displays all water quality data collected during filtration and side-by-side trials from both upstream and downstream instruments (Chl a, turbidity, temperature, and salinity). These are exploratory time series not directly use for anlysis or needed to reproduce thesis or publication results.
  • Insitu_Filtration_Data_Cleaning_Outline.R Outline of what 01_Data_wrangling.Rmd needs to do. Plain language prompt

Instructions to Reproduce Thesis

Not sure this is working at the moment. I've learned a lot about reproducible practices since first putting this together. Shortcut: open THESIS.pdf

  1. Run all 01_Data_wrangling.Rmd
  2. Knit Thesis_Manuscript/THESIS.Rmd which will knit and compile children documents into single final document THESIS.pdf (Thesis_Acknowledgments.Rmd, Thesis_Abstract.Rmd, Thesis_Introduction.Rmd, Thesis_Methods.Rmd, Thesis_Results.Rmd, and Thesis_Discussion.Rmd)

Thesis Details

In situ Clearance Rates of Olympia Oyster (Ostrea lurida) Habitat and Japanese Oyster (Magallana gigas) Aquaculture in California

M.S. completed 2021 with this version --> DOI

Althea N. Marks
M.S. Biology | Marine Ecology

Graduate Thesis for
Department of Biological Sciences
California State University Fullerton

Advisor: Dr. Danielle Zacherl (CSUF)
Committee: Dr. Doug Eernisse (CSUF), Dr. Paul Stapp (CSUF), Dr. Ted Grosholz (UC Davis)
Statistical Consulting: Dr. Kevin Nichols (CSUF)
Programming Consulting: Sarthak Saini

Session Info & package versions needed to run:

R version 3.6.3 (2020-02-29)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: macOS Sierra 10.12.6

Matrix products: default
BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/3.6/Resources/lib/libRlapack.dylib

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] grid stats graphics grDevices datasets utils methods base

other attached packages:
[1] pwr_1.3-0 quantreg_5.85 SparseM_1.81 multcompView_0.1-8
[5] agricolae_1.3-3 broom_0.7.6 tinytex_0.38 ISLR_1.2
[9] MASS_7.3-54 xtable_1.8-4 olsrr_0.5.3 wesanderson_0.3.6
[13] cowplot_1.1.1 scales_1.1.1 viridis_0.6.2 ggpmisc_0.3.9
[17] gridExtra_2.3 forcats_0.5.1 viridisLite_0.4.0 hms_1.1.1
[21] stringr_1.4.0 ggthemes_4.2.4 ggplot2_3.3.3 lubridate_1.8.0
[25] data.table_1.13.6 magrittr_2.0.3 readr_2.1.1 tidyr_1.2.0
[29] dplyr_1.0.7 knitr_1.38

oyster-insitu-filtration's People

Contributors

theamarks avatar

Watchers

 avatar

oyster-insitu-filtration's Issues

Wrangling Rmd loosing 3 SR trials data

2 or 3 of the San Rafael trials are being removed from the wrangling output at the manual correction stage. I believe this may have to do with the 2022 updates I made to the file. Possible fix is to revert rmd to 2020 version and figure out what package version this script originally ran on. Install and update renv library so that rmd runs properly again.

Remove .csvs from data/

This was a git mistake. data files don't belong in github... Remove and put in a data repo.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.