The intention of this .Rmd script is to explore how sediment type (primary and secondary classifications) influences various variables that we measured in Summer 2017. The sediment type data presented here is qualitative, with sediment type classified as 1 of 10 types (1:10 :: fine:big).



Outline



General findings






1. Importing data: we need the sediment_pit, biometrics, and transect dataframes from the seagrass sites. Also throw in the coordinate info and the sea otter index. All of these cleaned files are found in the GitHub repositry.

df.sedpit <- read.csv("https://raw.githubusercontent.com/APECS-ak/APECS-master-repos/master/ALL_DATA/seagrass_seaotter_pit_sediment_2017_CLEAN.csv", stringsAsFactors = FALSE, header = TRUE)

df.bio <- read.csv("https://raw.githubusercontent.com/APECS-ak/APECS-master-repos/master/ALL_DATA/seagrass_biometrics_CLEAN.csv", stringsAsFactors = FALSE, header = TRUE)

df.trans <- read.csv("https://raw.githubusercontent.com/APECS-ak/APECS-master-repos/master/ALL_DATA/seagrass_transect_2017_RAW.csv", stringsAsFactors = FALSE, header = TRUE)

df.coords <- read.csv("https://raw.githubusercontent.com/APECS-ak/APECS-master-repos/master/ALL_DATA/sites_coordinates.csv", stringsAsFactors = FALSE, header = TRUE)

df.soi <- read.csv("https://raw.githubusercontent.com/APECS-ak/APECS-master-repos/master/ALL_DATA/sea_otter_impact_index_2017_new.csv", stringsAsFactors = FALSE, header = TRUE)






2. Tidy and reshape: The next steps are to look at each imported DF, tidy them up, reshape them for the intended analyses, and join all reshaped DFs into one large DF (i.e. ‘df.all’). All packages used are libraried at the top of this script. The sript echoed in this .html file but can be accessed in the .Rmd file.






3. Join: Now all of the prepared DFs will be joined together to form the ‘df.all’, the primary DF that will be used in the following analyses.

df.all <- left_join(df.coords, df.trans2, by = c("site"))
df.all <- left_join(df.all, df.sedpit2, by = c("site"))
df.all <- left_join(df.all, df.sedpit_trans, by = c("site"))
df.all <- left_join(df.all, df.bio2, by = c("site"))
df.all <- left_join(df.all, df.mass_area, by = c("site"))
df.all <- left_join(df.all, df.soi, by = c("site"))


We want to manipulate df.all in the following ways:

Here are the column names in the final df.all:

##  [1] "site"                     "site_name"               
##  [3] "latitude"                 "longitude"               
##  [5] "date"                     "julian_day"              
##  [7] "depth_m"                  "so_index"                
##  [9] "pits_in"                  "pits_edge"               
## [11] "pits_out"                 "pits_tot_site"           
## [13] "sed1_in"                  "sed1_edge"               
## [15] "sed1_out"                 "sed2_in"                 
## [17] "sed2_edge"                "sed2_out"                
## [19] "sedmean_in"               "sedmean_edge"            
## [21] "sedmean_out"              "sed1_site"               
## [23] "sed2_site"                "sedmean_site"            
## [25] "macroalgae_percent_cover" "epiphyte_percent_cover"  
## [27] "epiphyte_mass_perplant"   "epi_mass_shootmass_g.g"  
## [29] "epi_mass_leafarea_mg.cm2" "flower_density_m2"       
## [31] "shoot_mass_perplant"      "shoot_density_m2"        
## [33] "shoot_mass_m2"            "leaf_length_mean"        
## [35] "leaf_length_max"          "leaf_width_mean"         
## [37] "leaf_width_max"           "leaf_area_blade"         
## [39] "leaf_area_plant"          "rhi_mass_percm"          
## [41] "rhi_mass_percm_m2"        "shoot_mass_m2_sd"        
## [43] "rhi_mass_percm_m2_sd"








4. Large-scale pattern in sediment type: These maps represent the numeric ordinal data, where the circle size scales with the numeric classification (larger circle = larger numeric).



Here is a break down of how the numbers match with the visual classifications of sediment type. Sorry about the weird format…tables are hard. Note: the numeric ID is used as the “value” for all of the sediment analysis.


Numeric Ordinal ID Adjective ID
1 Mud
2 Sandy mud
3 Muddy sand
4 Sand
5 Coarse sand
6 Pebble
7 Gravel
8 Cobble
9 Boulder
10 Reef



4A. First set of maps compare primary, secondary, and their mean for the entire site (transects averaged)

Red: primary sediment type; Orange: secondary sediment type; Yellow: mean of primary and secondary types

#.


4B. Second set of maps compare inside, edge, and outside sediments, across sites (mean primary and secondary).
Green: inside transect sediment type; Blue: edge transect sediment type; Purple: outside transect sediment type

#.


4C. Third set of maps compare #pits dug at inside, edge, and outside transects (larger circle = more pits).
Black: inside transect total pits; Red: edge transect total pits; Blue: outside transect total pits

#.



4D. Regression of sediment versus sea otter index










5. Exploratory analysis



Regressions: use sediment or pit values as independent factors


There are a lot of possible plots using df.all. Tiff looked at the regressions for all of those plots but only includes results for regressions that look significant, or might with either transformation or non-linear regression.



5A. Aboveground biomass:










5B. Belowground biomass (biomass rhizome per cm, per msq):












5C. Belowground biomass (biomass rhizome per cm):












5D. Epiphyte biomass (per plant):












5E. Pits vs belowground biomass












5. Outliers

5A. Epiphytes per gram of seagrass