generated from SEFSC/SEFSC-Template
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ec5f656
commit 3fa5cc0
Showing
29 changed files
with
133,881 additions
and
6,654 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
8,022 changes: 6,508 additions & 1,514 deletions
8,022
indicator_data/SAU_PR/SAU EEZ 630 v50-0.csv → indicator_data/SAU/SAU EEZ 630,850 v50-1.csv
Large diffs are not rendered by default.
Oops, something went wrong.
4 changes: 2 additions & 2 deletions
4
indicator_data/SAU_USVI/readme.txt → indicator_data/SAU/SAUreadme.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Binary file removed
BIN
-1.63 MB
...59_660_662_670_780_796_850_904_905_906_907_908_909_967_Tsui_et_al_2020_Caribbean_FCRR.pdf
Binary file not shown.
Binary file not shown.
This file was deleted.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,140 @@ | ||
|
||
## compile TCRMP and PRCRMP into data plots | ||
## M. Karnauskas 2/8/2024 | ||
# | ||
# run PRCRMP_benthic.R, TCRMP_benthic.R, PRCRMP_fish.R and TCRMP_fish.R first | ||
# | ||
|
||
rm(list = ls()) | ||
|
||
library(plotTimeSeries) | ||
|
||
# load coral indicator data ------------------------- | ||
|
||
setwd("C:/Users/mandy.karnauskas/Desktop/Caribbean-ESR/indicator_data/") | ||
|
||
load("PRCRMP/coralspprich_PR.RData") | ||
PRsr <- out1 | ||
load("PRCRMP/percoralcov_PR.RData") | ||
PRcc <- out1 | ||
load("TCRMP/coralspprich_USVI.RData") | ||
VIsr <- out1 | ||
load("TCRMP/percoralcov_USVI.RData") | ||
VIcc <- out1 | ||
|
||
# extract years from linear mixed model ---------------------- | ||
|
||
y1 <- as.numeric(gsub("YEAR", "", rownames(summary(PRsr)$coef))) | ||
y2 <- as.numeric(gsub("YEAR", "", rownames(summary(PRcc)$coef))) | ||
y3 <- as.numeric(gsub("SampleYear", "", rownames(summary(VIsr)$coef))) | ||
y4 <- as.numeric(gsub("SampleYear", "", rownames(summary(VIcc)$coef))) | ||
|
||
y1 == y2 | ||
y3 == y4 | ||
yrs <- (min(c(y1, y2, y3, y4))) : (max(c(y1, y2, y3, y4))) | ||
|
||
# extract coefficients from linear mixed model ---------------------- | ||
|
||
mat <- data.frame(matrix(data = NA, nrow = length(yrs), ncol = 4)) | ||
rownames(mat) <- yrs | ||
mat[match(y1, yrs), 1] <- summary(PRsr)$coef[, 1] | ||
mat[match(y2, yrs), 2] <- summary(PRcc)$coef[, 1] | ||
mat[match(y3, yrs), 3] <- summary(VIsr)$coef[, 1] | ||
mat[match(y4, yrs), 4] <- summary(VIcc)$coef[, 1] | ||
|
||
matse <- data.frame(matrix(data = NA, nrow = length(yrs), ncol = 4)) | ||
rownames(matse) <- yrs | ||
matse[match(y1, yrs), 1] <- summary(PRsr)$coef[, 2] | ||
matse[match(y2, yrs), 2] <- summary(PRcc)$coef[, 2] | ||
matse[match(y3, yrs), 3] <- summary(VIsr)$coef[, 2] | ||
matse[match(y4, yrs), 4] <- summary(VIcc)$coef[, 2] | ||
|
||
# format indicator object -------------------- | ||
|
||
datdata <- yrs | ||
inddata <- data.frame(mat) | ||
ulidata <- data.frame(mat + matse) | ||
llidata <- data.frame(mat - matse) | ||
labs <- c("Coral species richness" , "average number per transect", "Puerto Rico", | ||
"Percent coral cover" , "percent cover", "Puerto Rico", | ||
"Coral species richness" , "average number per transect", "USVI", | ||
"Percent coral cover" , "percent cover", "USVI") | ||
indnames <- data.frame(matrix(labs, nrow = 3, byrow = F)) | ||
s <- list(labels = indnames, indicators = inddata, datelist = datdata, ulim = ulidata, llim = llidata) | ||
class(s) <- "indicatordata" | ||
|
||
setwd("C:/Users/mandy.karnauskas/Desktop/Caribbean-ESR/indicator_plots/") | ||
|
||
plotIndicatorTimeSeries(s, coltoplot = 1:4, plotrownum = 2, sublabel = T, sameYscale = F, | ||
widadj = 1, hgtadj = 1, trendAnalysis = T, type = "allLines", CItype = "band", outtype = "png") | ||
|
||
inddata <- s | ||
save(inddata, file = "C:/Users/mandy.karnauskas/Desktop/Caribbean-ESR/indicator_objects/coral_spprichness_cover.RData") | ||
|
||
|
||
|
||
## compile TCRMP and PRCRMP into data plots | ||
## M. Karnauskas 2/8/2024 | ||
# | ||
# run PRCRMP_benthic.R, TCRMP_benthic.R, PRCRMP_fish.R and TCRMP_fish.R first | ||
# | ||
|
||
rm(list = ls()) | ||
|
||
library(plotTimeSeries) | ||
|
||
# load fish indicator data ------------------------- | ||
|
||
setwd("C:/Users/mandy.karnauskas/Desktop/Caribbean-ESR/indicator_data/") | ||
|
||
load("PRCRMP/fish_density_PR.RData") | ||
PR <- fin | ||
load("TCRMP/fish_density_USVI.RData") | ||
VI <- findens | ||
load("TCRMP/slopeSizeSpec_USVI.RData") | ||
sl <- fin | ||
|
||
# extract years ---------------------- | ||
|
||
PR$yrs == VI$yrs | ||
PR$yrs == sl$yrs | ||
yrs <- (min(c(PR$yrs, VI$yrs, sl$yrs))) : (max(c(PR$yrs, VI$yrs, sl$yrs))) | ||
|
||
# extract coefficients from linear mixed model ---------------------- | ||
|
||
mat <- data.frame(matrix(data = NA, nrow = length(yrs), ncol = 3)) | ||
rownames(mat) <- yrs | ||
mat[match(PR$yrs, yrs), 1] <- PR$ind_norm | ||
mat[match(VI$yrs, yrs), 2] <- VI$ind_norm | ||
mat[match(sl$yrs, yrs), 3] <- sl$stind | ||
|
||
matse <- data.frame(matrix(data = NA, nrow = length(yrs), ncol = 3)) | ||
rownames(matse) <- yrs | ||
matse[match(PR$yrs, yrs), 1] <- PR$indse_norm | ||
matse[match(VI$yrs, yrs), 2] <- VI$indse_norm | ||
matse[match(sl$yrs, yrs), 3] <- sl$stindse | ||
|
||
# format indicator object -------------------- | ||
|
||
datdata <- yrs | ||
inddata <- data.frame(mat) | ||
ulidata <- data.frame(mat + matse) | ||
llidata <- data.frame(mat - matse) | ||
labs <- c("Commercial fish density" , "average number per transect", "Puerto Rico", | ||
"Commercial fish density" , "average number per transect", "USVI", | ||
"Slope of the size spectrum" , "slope of log distribution", "USVI") | ||
indnames <- data.frame(matrix(labs, nrow = 3, byrow = F)) | ||
s <- list(labels = indnames, indicators = inddata, datelist = datdata, ulim = ulidata, llim = llidata) | ||
class(s) <- "indicatordata" | ||
|
||
setwd("C:/Users/mandy.karnauskas/Desktop/Caribbean-ESR/indicator_plots/") | ||
|
||
plotIndicatorTimeSeries(s, coltoplot = 1:3, plotrownum = 3, sublabel = T, sameYscale = F, | ||
widadj = 1, hgtadj = 1, trendAnalysis = T, type = "allLines", CItype = "band", outtype = "png") | ||
|
||
inddata <- s | ||
save(inddata, file = "C:/Users/mandy.karnauskas/Desktop/Caribbean-ESR/indicator_objects/fish_density.RData") | ||
|
||
######################### END ############################ | ||
|
||
|
Oops, something went wrong.