# load data
complexity <- read_csv("Data/Cloudbreak_complexity_reefzones.csv")
coral <- read_csv("Data/annotations.csv")
surfers <- read_csv("Data/Cloudbreak_data2.csv")
# subset by resolution
complexity_1cm <- complexity %>% filter(fac == "1")
complexity_4cm <- complexity %>% filter(fac == "4")
complexity_8cm <- complexity %>% filter(fac == "8")
complexity_32cm <- complexity %>% filter(fac == "32")
# calculate coral cover
coral$Coral <- coral$Label
coral$Coral[coral$Label != "LICO"] <- "Other"
coral <- coral %>%
group_by(Name, Coral) %>%
summarise(count = n()) %>%
ungroup()
percent_cover <- coral %>%
group_by(Name) %>%
mutate(perc_cover = count / sum(count) * 100) %>%
filter(Coral != "Other") %>%
summarise(perc_coral_cover = sum(perc_cover))
# adjust plot name in coral dataframe to make sure it matches with surfer plots
percent_cover <- percent_cover %>%
mutate(Plot_num = sub("CoralNet_Shapefiles_", "", sub("\\.jpg$", "", Name))) %>%
select(-Name) %>% mutate(Plot_num = factor(Plot_num))
# change variable type
surfers <- surfers %>%
mutate(Plot_num = factor(Plot_num))
# join surfers and corals by matching plot number
surfer_coral <- dplyr::inner_join(percent_cover, surfers, by="Plot_num")
# add reef zone categories for each plot
left <- c(4, 19, 20, 22, 30, 32, 33, 35, 37, 40, 42,28, 44, 45, 53, 54, 56, 58, 62, 63,
64, 67, 68, 70, 71, 73, 76, 79, 81, 85, 89, 91, 93, 95, 98, 99)
mid <- c(1, 2, 3, 5, 6, 8, 9, 11, 12, 14, 15, 18, 24, 25, 26, 29, 34, 41, 43, 47,
49, 51, 52, 55, 59, 65, 72, 74, 77, 78, 82, 83, 84, 92, 97)
right <- c(7, 10, 13, 16, 17, 21, 23, 27, 36, 39, 46, 50, 57, 60, 61, 66, 69, 80,
86, 88, 90, 94, 96, 100)
surfer_coral <- surfer_coral %>%
mutate(Reef_Zone = case_when(
Plot_num %in% left ~ "Cloudbreak_Left",
Plot_num %in% mid ~ "Cloudbreak_Mid",
Plot_num %in% right ~ "Cloudbreak_Right",
TRUE ~ NA_character_
))
# subset complexity metrics
complexity_1cm <- complexity_1cm %>% select(c("surf_complex","mean_profile_curvature",
"mean_slope","mean_vrm","site","height_diff"))
complexity_8cm <- complexity_8cm %>% select(c("surf_complex","mean_profile_curvature",
"mean_slope","mean_vrm","site","height_diff"))
complexity_32cm <- complexity_32cm %>% select(c("surf_complex","mean_profile_curvature",
"mean_slope","mean_vrm","site","height_diff"))
# summarize coral and surfer data by reef zone
surfer_coral_summ <- surfer_coral %>%
group_by(Reef_Zone) %>%
summarise(
Mean_perc_coral_cover = mean(perc_coral_cover),
SD_perc_coral_cover = sd(perc_coral_cover),
Mean_Track_Counts = mean(Track_Counts),
SD_Track_Counts = sd(Track_Counts),
Mean_Sum_Track_Length_meters = mean(Sum_Track_Length_meters),
SD_Sum_Track_Length_meters = sd(Sum_Track_Length_meters)
)
# combine with complexity
cloudbreak <- surfer_coral_summ %>% full_join(complexity_1cm, by = c("Reef_Zone" = "site"))
cloudbreak_4 <- surfer_coral_summ %>% full_join(complexity_4cm, by = c("Reef_Zone" = "site"))
cloudbreak_8 <- surfer_coral_summ %>% full_join(complexity_8cm, by = c("Reef_Zone" = "site"))
cloudbreak_32 <- surfer_coral_summ %>% full_join(complexity_32cm, by = c("Reef_Zone" = "site"))
# complexity variance - 3 zones
complex_var3zones <- read_csv("complexity_3zones_variance.csv")
# 1cm
complex_3_1cm <- complex_var3zones %>%
rename(zone = file) %>%
filter(fac == "1")
complex_3_1cm$zone <- sub(".*/([^/]+)$", "\\1", complex_3_1cm$zone)
complex_3_1cm$zone <- sub("\\.tif$", "", complex_3_1cm$zone)
# 4cm
complex_3_4cm <- complex_var3zones %>%
rename(zone = file) %>%
filter(fac == "4")
complex_3_4cm$zone <- sub(".*/([^/]+)$", "\\1", complex_3_4cm$zone)
complex_3_4cm$zone <- sub("\\.tif$", "", complex_3_4cm$zone)
# complexity variance - 6 zones
complex_var <- read_csv("complexity_1cm_variance.csv")
# 1cm
complex_var1 <- complex_var %>%
rename(zone = file) %>%
filter(fac == "1")
complex_var1$zone <- sub(".*/([^/]+)$", "\\1", complex_var1$zone)
complex_var1$zone <- sub("\\.tif$", "", complex_var1$zone)
# 4cm
complex_var_4 <- complex_var %>%
rename(zone = file) %>%
filter(fac == "4")
complex_var_4$zone <- sub(".*/([^/]+)$", "\\1", complex_var_4$zone)
complex_var_4$zone <- sub("\\.tif$", "", complex_var_4$zone)
3 REEF ZONES
Distribution & Descriptive Plots
ggplot(surfer_coral, aes(x = perc_coral_cover, fill = Reef_Zone)) +
geom_density(alpha = 0.5) + theme_classic()

ggplot(surfer_coral, aes(x = Reef_Zone, y = perc_coral_cover, fill = Reef_Zone)) +
geom_boxplot() + theme_classic() + theme(legend.position="none")

ggplot(surfer_coral_summ, aes(x = Reef_Zone, y = Mean_perc_coral_cover, fill = Reef_Zone)) +
geom_bar(stat = "identity", position = "dodge") +
geom_errorbar(aes(ymin = Mean_perc_coral_cover - SD_perc_coral_cover,
ymax = Mean_perc_coral_cover + SD_perc_coral_cover),
position = position_dodge(width = 0.9), width = 0.25) +
labs(title = "Mean Perc Coral Cover Across Reef Zones",
x = "Reef Zone",
y = "Mean Perc Coral Cover") +
theme_minimal()

ggplot(surfer_coral, aes(x = Track_Counts, fill = Reef_Zone)) +
geom_density(alpha = 0.5) + theme_classic()

ggplot(surfer_coral, aes(x = Reef_Zone, y = Track_Counts, fill = Reef_Zone)) +
geom_boxplot() + theme_classic() + theme(legend.position="none")

ggplot(surfer_coral_summ, aes(x = Reef_Zone, y = Mean_Track_Counts, fill = Reef_Zone)) +
geom_bar(stat = "identity", position = "dodge") +
geom_errorbar(aes(ymin = Mean_Track_Counts - SD_Track_Counts ,
ymax = Mean_Track_Counts + SD_Track_Counts),
position = position_dodge(width = 0.9), width = 0.25) +
labs(title = "Mean Track Counts Across Reef Zones",
x = "Reef Zone",
y = "Mean Perc Coral Cover") + theme_minimal()

ggplot(surfer_coral, aes(x = Sum_Track_Length_meters, fill = Reef_Zone)) +
geom_density(alpha = 0.5) + theme_classic()

ggplot(surfer_coral, aes(x = Reef_Zone, y = Sum_Track_Length_meters, fill = Reef_Zone)) +
geom_boxplot() + theme_classic() + theme(legend.position="none")

ggplot(surfer_coral_summ, aes(x = Reef_Zone, y = Mean_Sum_Track_Length_meters, fill = Reef_Zone)) +
geom_bar(stat = "identity", position = "dodge") +
geom_errorbar(aes(ymin = Mean_Sum_Track_Length_meters - SD_Sum_Track_Length_meters,
ymax = Mean_Sum_Track_Length_meters + SD_Sum_Track_Length_meters),
position = position_dodge(width = 0.9), width = 0.25) +
labs(title = "Mean Sum Track Length Across Reef Zones",
x = "Reef Zone",
y = "Mean Perc Coral Cover") +
theme_minimal()

Comparison tests
# % Coral cover by reef zone = NOT-SIGNIFICANT (P = 0.5919)
kruskal.test(perc_coral_cover ~ Reef_Zone, data = surfer_coral)
##
## Kruskal-Wallis rank sum test
##
## data: perc_coral_cover by Reef_Zone
## Kruskal-Wallis chi-squared = 1.049, df = 2, p-value = 0.5919
# Surfer tracks by reef zone = SIGNIFICANT (P = 6.951e-12)
kruskal.test(Track_Counts ~ Reef_Zone, data = surfer_coral)
##
## Kruskal-Wallis rank sum test
##
## data: Track_Counts by Reef_Zone
## Kruskal-Wallis chi-squared = 51.384, df = 2, p-value = 6.951e-12
# Surfer track length by reef zone = SIGNIFICANT (P = 7.244e-12)
kruskal.test(Sum_Track_Length_meters ~ Reef_Zone, data = surfer_coral)
##
## Kruskal-Wallis rank sum test
##
## data: Sum_Track_Length_meters by Reef_Zone
## Kruskal-Wallis chi-squared = 51.302, df = 2, p-value = 7.244e-12
Scatter Plots - 1cm
ggplot(cloudbreak, aes(x = mean_slope, y = Mean_Track_Counts , color = Reef_Zone)) +
geom_point(size = 3) +
geom_smooth(method = "lm", se = FALSE, linetype = "solid", col = "grey") +
labs(title = "Avg. Surfer Tracks & Slope") +
theme_classic()

ggplot(cloudbreak, aes(x = mean_profile_curvature, y =Mean_Track_Counts , color = Reef_Zone)) +
geom_point(size = 3) +
geom_smooth(method = "lm", se = FALSE, linetype = "solid", col = "grey") +
labs(title = "Avg. Surfer Tracks & Curvature") +
theme_classic()

ggplot(cloudbreak, aes(x = Mean_perc_coral_cover, y = Mean_Track_Counts, color = Reef_Zone)) +
geom_point(size = 3) +
geom_smooth(method = "lm", se = FALSE, linetype = "solid", col = "grey") +
labs(title = "Avg. Surfer Tracks & Coral Cover") +
theme_classic()

ggplot(cloudbreak, aes(x = mean_vrm, y = Mean_Track_Counts, color = Reef_Zone)) +
geom_point(size = 3) +
geom_smooth(method = "lm", se = FALSE, linetype = "solid", col = "grey") +
labs(title = "Avg. Surfer Tracks & VRM") +
theme_classic()

Scatter Plots - 4cm
ggplot(cloudbreak_4, aes(x = mean_slope, y = Mean_Track_Counts , color = Reef_Zone)) +
geom_point(size = 3) +
geom_smooth(method = "lm", se = FALSE, linetype = "solid", col = "grey") +
labs(title = "Avg. Surfer Tracks & Slope") +
theme_classic()

ggplot(cloudbreak_4, aes(x = mean_profile_curvature, y =Mean_Track_Counts , color = Reef_Zone)) +
geom_point(size = 3) +
geom_smooth(method = "lm", se = FALSE, linetype = "solid", col = "grey") +
labs(title = "Avg. Surfer Tracks & Curvature") +
theme_classic()

ggplot(cloudbreak_4, aes(x = Mean_perc_coral_cover, y = Mean_Track_Counts, color = Reef_Zone)) +
geom_point(size = 3) +
geom_smooth(method = "lm", se = FALSE, linetype = "solid", col = "grey") +
labs(title = "Avg. Surfer Tracks & Coral Cover") +
theme_classic()

ggplot(cloudbreak_4, aes(x = mean_vrm, y = Mean_Track_Counts, color = Reef_Zone)) +
geom_point(size = 3) +
geom_smooth(method = "lm", se = FALSE, linetype = "solid", col = "grey") +
labs(title = "Avg. Surfer Tracks & VRM") +
theme_classic()

Scatter Plots - 8cm
ggplot(cloudbreak_8, aes(x = mean_slope, y = Mean_Track_Counts , color = Reef_Zone)) +
geom_point(size = 3) +
geom_smooth(method = "lm", se = FALSE, linetype = "solid", col = "grey") +
labs(title = "Avg. Surfer Tracks & Slope") +
theme_classic()

ggplot(cloudbreak_8, aes(x = mean_profile_curvature, y =Mean_Track_Counts , color = Reef_Zone)) +
geom_point(size = 3) +
geom_smooth(method = "lm", se = FALSE, linetype = "solid", col = "grey") +
labs(title = "Avg. Surfer Tracks & Curvature") +
theme_classic()

ggplot(cloudbreak_8, aes(x = Mean_perc_coral_cover, y = Mean_Track_Counts, color = Reef_Zone)) +
geom_point(size = 3) +
geom_smooth(method = "lm", se = FALSE, linetype = "solid", col = "grey") +
labs(title = "Avg. Surfer Tracks & Coral Cover") +
theme_classic()

ggplot(cloudbreak_8, aes(x = mean_vrm, y = Mean_Track_Counts, color = Reef_Zone)) +
geom_point(size = 3) +
geom_smooth(method = "lm", se = FALSE, linetype = "solid", col = "grey") +
labs(title = "Avg. Surfer Tracks & VRM") +
theme_classic()

Correlations - 1 cm
# Mean Track Counts & Slope
cor.test(cloudbreak$Mean_Track_Counts, cloudbreak$mean_slope)
##
## Pearson's product-moment correlation
##
## data: cloudbreak$Mean_Track_Counts and cloudbreak$mean_slope
## t = 2.1095, df = 1, p-value = 0.2818
## alternative hypothesis: true correlation is not equal to 0
## sample estimates:
## cor
## 0.9036125
# Mean Track Counts & Curvature
cor.test(cloudbreak$Mean_Track_Counts, cloudbreak$mean_profile_curvature)
##
## Pearson's product-moment correlation
##
## data: cloudbreak$Mean_Track_Counts and cloudbreak$mean_profile_curvature
## t = -2.2683, df = 1, p-value = 0.2643
## alternative hypothesis: true correlation is not equal to 0
## sample estimates:
## cor
## -0.9150277
# Mean Track Counts & surf_complex
cor.test(cloudbreak$Mean_Track_Counts, cloudbreak$surf_complex)
##
## Pearson's product-moment correlation
##
## data: cloudbreak$Mean_Track_Counts and cloudbreak$surf_complex
## t = 3.9836, df = 1, p-value = 0.1566
## alternative hypothesis: true correlation is not equal to 0
## sample estimates:
## cor
## 0.9699077
# Mean Track Counts & Coral Cover
cor.test(cloudbreak$Mean_Track_Counts, cloudbreak$Mean_perc_coral_cover)
##
## Pearson's product-moment correlation
##
## data: cloudbreak$Mean_Track_Counts and cloudbreak$Mean_perc_coral_cover
## t = 0.36455, df = 1, p-value = 0.7775
## alternative hypothesis: true correlation is not equal to 0
## sample estimates:
## cor
## 0.3425028
# Mean Track Counts & Coral Cover
cor.test(cloudbreak$Mean_Track_Counts, cloudbreak$mean_vrm)
##
## Pearson's product-moment correlation
##
## data: cloudbreak$Mean_Track_Counts and cloudbreak$mean_vrm
## t = 1.421, df = 1, p-value = 0.3904
## alternative hypothesis: true correlation is not equal to 0
## sample estimates:
## cor
## 0.8177988
Correlations - 8 cm
# Mean Track Counts & Slope
cor.test(cloudbreak_8$Mean_Track_Counts, cloudbreak_8$mean_slope)
##
## Pearson's product-moment correlation
##
## data: cloudbreak_8$Mean_Track_Counts and cloudbreak_8$mean_slope
## t = 0.64456, df = 1, p-value = 0.6355
## alternative hypothesis: true correlation is not equal to 0
## sample estimates:
## cor
## 0.5417674
# Mean Track Counts & Curvature
cor.test(cloudbreak_8$Mean_Track_Counts, cloudbreak_8$mean_profile_curvature)
##
## Pearson's product-moment correlation
##
## data: cloudbreak_8$Mean_Track_Counts and cloudbreak_8$mean_profile_curvature
## t = -6.1087, df = 1, p-value = 0.1033
## alternative hypothesis: true correlation is not equal to 0
## sample estimates:
## cor
## -0.9868643
# Mean Track Counts & surf_complex
cor.test(cloudbreak_8$Mean_Track_Counts, cloudbreak_8$surf_complex)
##
## Pearson's product-moment correlation
##
## data: cloudbreak_8$Mean_Track_Counts and cloudbreak_8$surf_complex
## t = 2.7391, df = 1, p-value = 0.2228
## alternative hypothesis: true correlation is not equal to 0
## sample estimates:
## cor
## 0.9393558
# Mean Track Counts & Coral Cover
cor.test(cloudbreak_8$Mean_Track_Counts, cloudbreak_8$Mean_perc_coral_cover)
##
## Pearson's product-moment correlation
##
## data: cloudbreak_8$Mean_Track_Counts and cloudbreak_8$Mean_perc_coral_cover
## t = 0.36455, df = 1, p-value = 0.7775
## alternative hypothesis: true correlation is not equal to 0
## sample estimates:
## cor
## 0.3425028
# Mean Track Counts & Coral Cover
cor.test(cloudbreak_8$Mean_Track_Counts, cloudbreak_8$mean_vrm)
##
## Pearson's product-moment correlation
##
## data: cloudbreak_8$Mean_Track_Counts and cloudbreak_8$mean_vrm
## t = 5.1729, df = 1, p-value = 0.1216
## alternative hypothesis: true correlation is not equal to 0
## sample estimates:
## cor
## 0.9818228
Correlations - 32 cm
# Mean Track Counts & Slope
cor.test(cloudbreak_32$Mean_Track_Counts, cloudbreak_32$mean_slope)
##
## Pearson's product-moment correlation
##
## data: cloudbreak_32$Mean_Track_Counts and cloudbreak_32$mean_slope
## t = 0.81079, df = 1, p-value = 0.5663
## alternative hypothesis: true correlation is not equal to 0
## sample estimates:
## cor
## 0.6297909
# Mean Track Counts & Curvature
cor.test(cloudbreak_32$Mean_Track_Counts, cloudbreak_32$mean_profile_curvature)
##
## Pearson's product-moment correlation
##
## data: cloudbreak_32$Mean_Track_Counts and cloudbreak_32$mean_profile_curvature
## t = -4.2401, df = 1, p-value = 0.1474
## alternative hypothesis: true correlation is not equal to 0
## sample estimates:
## cor
## -0.9732983
# Mean Track Counts & surf_complex
cor.test(cloudbreak_32$Mean_Track_Counts, cloudbreak_32$surf_complex)
##
## Pearson's product-moment correlation
##
## data: cloudbreak_32$Mean_Track_Counts and cloudbreak_32$surf_complex
## t = 1.292, df = 1, p-value = 0.4193
## alternative hypothesis: true correlation is not equal to 0
## sample estimates:
## cor
## 0.7908023
# Mean Track Counts & Coral Cover
cor.test(cloudbreak_32$Mean_Track_Counts, cloudbreak_32$Mean_perc_coral_cover)
##
## Pearson's product-moment correlation
##
## data: cloudbreak_32$Mean_Track_Counts and cloudbreak_32$Mean_perc_coral_cover
## t = 0.36455, df = 1, p-value = 0.7775
## alternative hypothesis: true correlation is not equal to 0
## sample estimates:
## cor
## 0.3425028
# Mean Track Counts & Coral Cover
cor.test(cloudbreak_32$Mean_Track_Counts, cloudbreak_32$mean_vrm)
##
## Pearson's product-moment correlation
##
## data: cloudbreak_32$Mean_Track_Counts and cloudbreak_32$mean_vrm
## t = 1.1931, df = 1, p-value = 0.4441
## alternative hypothesis: true correlation is not equal to 0
## sample estimates:
## cor
## 0.7664078
Complexity - 3 reef zones - 1cm - WITH ERROR BARS
ggplot(complex_3_1cm, aes(x = mean_slope, y = zone)) +
geom_point(aes(color = zone), size = 3) +
geom_errorbarh(aes(xmin = mean_slope - sd_slope,
xmax = mean_slope + sd_slope), height = 0.2) +
theme_minimal() + theme(legend.position = "bottom") + labs(title = "1 cm")

ggplot(complex_3_1cm, aes(x = mean_vrm, y = zone)) +
geom_point(aes(color = zone), size = 3) +
geom_errorbarh(aes(xmin = mean_vrm - sd_vrm,
xmax = mean_vrm + sd_vrm), height = 0.2) +
theme_minimal() + theme(legend.position = "bottom") + labs(title = "1 cm")

ggplot(complex_3_1cm, aes(x = mean_profile_curvature, y = zone)) +
geom_point(aes(color = zone), size = 3) +
geom_errorbarh(aes(xmin = mean_profile_curvature - sd_profile_curvature,
xmax = mean_profile_curvature + sd_profile_curvature), height = 0.2) +
theme_minimal() + theme(legend.position = "bottom") + labs(title = "1 cm")

Complexity - 3 reef zones - 4cm - WITH ERROR BARS
ggplot(complex_3_4cm, aes(x = mean_slope, y = zone)) +
geom_point(aes(color = zone), size = 3) +
geom_errorbarh(aes(xmin = mean_slope - sd_slope,
xmax = mean_slope + sd_slope), height = 0.2) +
theme_minimal() + theme(legend.position = "bottom") + labs(title = "4 cm")

ggplot(complex_3_4cm, aes(x = mean_vrm, y = zone)) +
geom_point(aes(color = zone), size = 3) +
geom_errorbarh(aes(xmin = mean_vrm - sd_vrm,
xmax = mean_vrm + sd_vrm), height = 0.2) +
theme_minimal() + theme(legend.position = "bottom") + labs(title = "4 cm")

ggplot(complex_3_4cm, aes(x = mean_profile_curvature, y = zone)) +
geom_point(aes(color = zone), size = 3) +
geom_errorbarh(aes(xmin = mean_profile_curvature - sd_profile_curvature,
xmax = mean_profile_curvature + sd_profile_curvature), height = 0.2) +
theme_minimal() + theme(legend.position = "bottom") + labs(title = "4 cm")

6 FEEZ ZONES
# load data
complexity_6zones <- read_csv("Data/Cloudbreak_complexity_6_zones.csv")
# subset by resolution
complex_6zones_1cm <- complexity_6zones %>% filter(fac == "1")
complex_6zones_8cm <- complexity_6zones %>% filter(fac == "8")
complex_6zones_32cm <- complexity_6zones %>% filter(fac == "32")
# 6 reef zone categories
left_1 <- c(4, 19, 22, 28, 31, 38, 42, 44, 48, 54, 67, 68, 71, 75, 76, 79, 81, 87, 95)
left_2 <- c(20, 30, 32, 33, 35, 37, 40, 45, 53, 56, 58, 62, 63, 64, 70, 73, 85, 89, 91, 93, 98, 99)
mid_1 <- c(1, 3, 5, 25, 29, 41, 43, 52, 78, 82, 84)
mid_2 <- c(2, 6, 8, 9, 11, 12, 14, 15, 18, 24, 26, 34, 47, 49, 51, 55, 59, 65, 72, 74, 77, 83, 92, 97)
right_1 <- c(7, 10, 13, 17, 36, 57, 61, 69, 80, 94)
right_2 <- c(16, 21, 23, 27, 39, 46, 50, 60, 66, 86, 88, 90, 96, 100)
# add reef zones variable to dataframe
surfer_coral <- surfer_coral %>%
mutate(Reef_6_Zones = case_when(
Plot_num %in% left_1 ~ "Left_1",
Plot_num %in% left_2 ~ "Left_2",
Plot_num %in% mid_1 ~ "Mid_1",
Plot_num %in% mid_2 ~ "Mid_2",
Plot_num %in% right_1 ~ "Right_1",
Plot_num %in% right_2 ~ "Right_2",
TRUE ~ NA_character_
))
# subset complexity metrics
complex_6zones_1cm <- complex_6zones_1cm %>% dplyr::select(c("surf_complex","mean_profile_curvature",
"mean_slope","mean_vrm","site","height_diff"))
complex_6zones_8cm <- complex_6zones_8cm %>% dplyr::select(c("surf_complex","mean_profile_curvature",
"mean_slope","mean_vrm","site","height_diff"))
complex_6zones_32cm <- complex_6zones_32cm %>% dplyr::select(c("surf_complex","mean_profile_curvature",
"mean_slope","mean_vrm","site","height_diff"))
# summarize coral and surfer data by reef zone
surfer_coral_summ_6 <- surfer_coral %>%
group_by(Reef_6_Zones) %>%
summarise(
Mean_perc_coral_cover = mean(perc_coral_cover),
SD_perc_coral_cover = sd(perc_coral_cover),
Mean_Track_Counts = mean(Track_Counts),
SD_Track_Counts = sd(Track_Counts),
Mean_Sum_Track_Length_meters = mean(Sum_Track_Length_meters),
SD_Sum_Track_Length_meters = sd(Sum_Track_Length_meters)
)
# combine with complexity
zones_6_1cm <- surfer_coral_summ_6 %>% full_join(complex_6zones_1cm, by = c("Reef_6_Zones" = "site"))
zones_6_8cm <- surfer_coral_summ_6 %>% full_join(complex_6zones_8cm, by = c("Reef_6_Zones" = "site"))
zones_6_32cm <- surfer_coral_summ_6 %>% full_join(complex_6zones_32cm, by = c("Reef_6_Zones" = "site"))
Distributions & Descriptive Plots
ggplot(surfer_coral, aes(x = perc_coral_cover, fill = Reef_6_Zones)) +
geom_density(alpha = 0.5) + theme_classic()

ggplot(surfer_coral, aes(x = Reef_6_Zones, y = perc_coral_cover, fill = Reef_6_Zones)) +
geom_boxplot() + theme_classic() + theme(legend.position="none")

ggplot(surfer_coral_summ_6, aes(x = Reef_6_Zones, y = Mean_perc_coral_cover, fill = Reef_6_Zones)) +
geom_bar(stat = "identity", position = "dodge") +
geom_errorbar(aes(ymin = Mean_perc_coral_cover - SD_perc_coral_cover,
ymax = Mean_perc_coral_cover + SD_perc_coral_cover),
position = position_dodge(width = 0.9), width = 0.25) +
labs(title = "Mean Perc Coral Cover Across Reef Zones",
x = "Reef Zone",
y = "Mean Perc Coral Cover") +
theme_minimal()

ggplot(surfer_coral, aes(x = Track_Counts, fill = Reef_6_Zones)) +
geom_density(alpha = 0.5) + theme_classic()

ggplot(surfer_coral, aes(x = Reef_6_Zones, y = Track_Counts, fill = Reef_6_Zones)) +
geom_boxplot() + theme_classic() + theme(legend.position="none")

ggplot(surfer_coral_summ_6, aes(x = Reef_6_Zones, y = Mean_Track_Counts, fill = Reef_6_Zones)) +
geom_bar(stat = "identity", position = "dodge") +
geom_errorbar(aes(ymin = Mean_Track_Counts - SD_Track_Counts ,
ymax = Mean_Track_Counts + SD_Track_Counts),
position = position_dodge(width = 0.9), width = 0.25) +
labs(title = "Mean Track Counts Across Reef Zones",
x = "Reef Zone",
y = "Mean Perc Coral Cover") + theme_minimal()

ggplot(surfer_coral, aes(x = Sum_Track_Length_meters, fill = Reef_6_Zones)) +
geom_density(alpha = 0.5) + theme_classic()

ggplot(surfer_coral, aes(x = Reef_6_Zones, y = Sum_Track_Length_meters, fill = Reef_6_Zones)) +
geom_boxplot() + theme_classic() + theme(legend.position="none")

ggplot(surfer_coral_summ_6, aes(x = Reef_6_Zones, y = Mean_Sum_Track_Length_meters, fill = Reef_6_Zones)) +
geom_bar(stat = "identity", position = "dodge") +
geom_errorbar(aes(ymin = Mean_Sum_Track_Length_meters - SD_Sum_Track_Length_meters,
ymax = Mean_Sum_Track_Length_meters + SD_Sum_Track_Length_meters),
position = position_dodge(width = 0.9), width = 0.25) +
labs(title = "Mean Sum Track Length Across Reef Zones",
x = "Reef Zone",
y = "Mean Perc Coral Cover") +
theme_minimal()

Comparison tests
# % Coral cover by reef zone = NOT-SIGNIFICANT (P = 0.5919)
kruskal.test(perc_coral_cover ~ Reef_6_Zones, data = surfer_coral)
##
## Kruskal-Wallis rank sum test
##
## data: perc_coral_cover by Reef_6_Zones
## Kruskal-Wallis chi-squared = 4.4811, df = 5, p-value = 0.4824
# Surfer tracks by reef zone = SIGNIFICANT (P = 6.951e-12)
kruskal.test(Track_Counts ~ Reef_6_Zones, data = surfer_coral)
##
## Kruskal-Wallis rank sum test
##
## data: Track_Counts by Reef_6_Zones
## Kruskal-Wallis chi-squared = 65.007, df = 5, p-value = 1.117e-12
# Surfer track length by reef zone = SIGNIFICANT (P = 7.244e-12)
kruskal.test(Sum_Track_Length_meters ~ Reef_6_Zones, data = surfer_coral)
##
## Kruskal-Wallis rank sum test
##
## data: Sum_Track_Length_meters by Reef_6_Zones
## Kruskal-Wallis chi-squared = 63.616, df = 5, p-value = 2.17e-12
Scatter Plots - 1cm
ggplot(zones_6_1cm, aes(x = mean_slope, y = Mean_Track_Counts , color = Reef_6_Zones)) +
geom_point(size = 3) +
geom_smooth(method = "lm", se = FALSE, linetype = "solid", col = "grey") +
labs(title = "Avg. Surfer Tracks & Slope") +
theme_classic()

ggplot(zones_6_1cm, aes(x = mean_profile_curvature, y =Mean_Track_Counts , color = Reef_6_Zones)) +
geom_point(size = 3) +
geom_smooth(method = "lm", se = FALSE, linetype = "solid", col = "grey") +
labs(title = "Avg. Surfer Tracks & Curvature") +
theme_classic()

ggplot(zones_6_1cm, aes(x = Mean_perc_coral_cover, y = Mean_Track_Counts, color = Reef_6_Zones)) +
geom_point(size = 3) +
geom_smooth(method = "lm", se = FALSE, linetype = "solid", col = "grey") +
labs(title = "Avg. Surfer Tracks & Coral Cover") +
theme_classic()

ggplot(zones_6_1cm, aes(x = mean_vrm, y = Mean_Track_Counts, color = Reef_6_Zones)) +
geom_point(size = 3) +
geom_smooth(method = "lm", se = FALSE, linetype = "solid", col = "grey") +
labs(title = "Avg. Surfer Tracks & VRM") +
theme_classic()

Scatter Plots - 8cm
ggplot(zones_6_8cm, aes(x = mean_slope, y = Mean_Track_Counts , color = Reef_6_Zones)) +
geom_point(size = 3) +
geom_smooth(method = "lm", se = FALSE, linetype = "solid", col = "grey") +
labs(title = "Avg. Surfer Tracks & Slope") +
theme_classic()

ggplot(zones_6_8cm, aes(x = mean_profile_curvature, y =Mean_Track_Counts , color = Reef_6_Zones)) +
geom_point(size = 3) +
geom_smooth(method = "lm", se = FALSE, linetype = "solid", col = "grey") +
labs(title = "Avg. Surfer Tracks & Curvature") +
theme_classic()

ggplot(zones_6_8cm, aes(x = Mean_perc_coral_cover, y = Mean_Track_Counts, color = Reef_6_Zones)) +
geom_point(size = 3) +
geom_smooth(method = "lm", se = FALSE, linetype = "solid", col = "grey") +
labs(title = "Avg. Surfer Tracks & Coral Cover") +
theme_classic()

ggplot(zones_6_8cm, aes(x = mean_vrm, y = Mean_Track_Counts, color = Reef_6_Zones)) +
geom_point(size = 3) +
geom_smooth(method = "lm", se = FALSE, linetype = "solid", col = "grey") +
labs(title = "Avg. Surfer Tracks & VRM") +
theme_classic()

Scatter Plots - 32cm
ggplot(zones_6_32cm, aes(x = mean_slope, y = Mean_Track_Counts , color = Reef_6_Zones)) +
geom_point(size = 3) +
geom_smooth(method = "lm", se = FALSE, linetype = "solid", col = "grey") +
labs(title = "Avg. Surfer Tracks & Slope") +
theme_classic()

ggplot(zones_6_32cm, aes(x = mean_profile_curvature, y =Mean_Track_Counts , color = Reef_6_Zones)) +
geom_point(size = 3) +
geom_smooth(method = "lm", se = FALSE, linetype = "solid", col = "grey") +
labs(title = "Avg. Surfer Tracks & Curvature") +
theme_classic()

ggplot(zones_6_32cm, aes(x = Mean_perc_coral_cover, y = Mean_Track_Counts, color = Reef_6_Zones)) +
geom_point(size = 3) +
geom_smooth(method = "lm", se = FALSE, linetype = "solid", col = "grey") +
labs(title = "Avg. Surfer Tracks & Coral Cover") +
theme_classic()

ggplot(zones_6_32cm, aes(x = mean_vrm, y = Mean_Track_Counts, color = Reef_6_Zones)) +
geom_point(size = 3) +
geom_smooth(method = "lm", se = FALSE, linetype = "solid", col = "grey") +
labs(title = "Avg. Surfer Tracks & VRM") +
theme_classic()

Complexity - 6 reef zones - 1cm - WITH ERROR BARS
ggplot(complex_var1, aes(x = mean_slope, y = zone)) +
geom_point(aes(color = zone), size = 3) +
geom_errorbarh(aes(xmin = mean_slope - sd_slope,
xmax = mean_slope + sd_slope), height = 0.2) +
theme_minimal() + theme(legend.position = "bottom") + labs(title = "1 cm")

ggplot(complex_var1, aes(x = mean_vrm, y = zone)) +
geom_point(aes(color = zone), size = 3) +
geom_errorbarh(aes(xmin = mean_vrm - sd_vrm,
xmax = mean_vrm + sd_vrm), height = 0.2) +
theme_minimal() + theme(legend.position = "bottom") + labs(title = "1 cm")

ggplot(complex_var1, aes(x = mean_profile_curvature, y = zone)) +
geom_point(aes(color = zone), size = 3) +
geom_errorbarh(aes(xmin = mean_profile_curvature - sd_profile_curvature,
xmax = mean_profile_curvature + sd_profile_curvature), height = 0.2) +
theme_minimal() + theme(legend.position = "bottom") + labs(title = "1 cm")

Complexity - 6 reef zones - 4cm - WITH ERROR BARS
ggplot(complex_var_4, aes(x = mean_slope, y = zone)) +
geom_point(aes(color = zone), size = 3) +
geom_errorbarh(aes(xmin = mean_slope - sd_slope,
xmax = mean_slope + sd_slope), height = 0.2) +
theme_minimal() + theme(legend.position = "bottom") + labs(title = "4 cm")

ggplot(complex_var_4, aes(x = mean_vrm, y = zone)) +
geom_point(aes(color = zone), size = 3) +
geom_errorbarh(aes(xmin = mean_vrm - sd_vrm,
xmax = mean_vrm + sd_vrm), height = 0.2) +
theme_minimal() + theme(legend.position = "bottom") + labs(title = "4 cm")

ggplot(complex_var_4, aes(x = mean_profile_curvature, y = zone)) +
geom_point(aes(color = zone), size = 3) +
geom_errorbarh(aes(xmin = mean_profile_curvature - sd_profile_curvature,
xmax = mean_profile_curvature + sd_profile_curvature), height = 0.2) +
theme_minimal() + theme(legend.position = "bottom") + labs(title = "4 cm")

Correlations - 1 cm
# Mean Track Counts & Slope
cor.test(zones_6_1cm$Mean_Track_Counts, zones_6_1cm$mean_slope)
##
## Pearson's product-moment correlation
##
## data: zones_6_1cm$Mean_Track_Counts and zones_6_1cm$mean_slope
## t = 0.74792, df = 4, p-value = 0.4961
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
## -0.6445011 0.9046658
## sample estimates:
## cor
## 0.3502693
# Mean Track Counts & Curvature
cor.test(zones_6_1cm$Mean_Track_Counts, zones_6_1cm$mean_profile_curvature)
##
## Pearson's product-moment correlation
##
## data: zones_6_1cm$Mean_Track_Counts and zones_6_1cm$mean_profile_curvature
## t = -0.81921, df = 4, p-value = 0.4587
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
## -0.9105140 0.6246832
## sample estimates:
## cor
## -0.379039
# Mean Track Counts & surf_complex
cor.test(zones_6_1cm$Mean_Track_Counts, zones_6_1cm$surf_complex)
##
## Pearson's product-moment correlation
##
## data: zones_6_1cm$Mean_Track_Counts and zones_6_1cm$surf_complex
## t = 1.6542, df = 4, p-value = 0.1734
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
## -0.3608628 0.9549606
## sample estimates:
## cor
## 0.637356
# Mean Track Counts & Coral Cover
cor.test(zones_6_1cm$Mean_Track_Counts, zones_6_1cm$Mean_perc_coral_cover)
##
## Pearson's product-moment correlation
##
## data: zones_6_1cm$Mean_Track_Counts and zones_6_1cm$Mean_perc_coral_cover
## t = -0.47357, df = 4, p-value = 0.6605
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
## -0.8778261 0.7148140
## sample estimates:
## cor
## -0.2304139
# Mean Track Counts & Coral Cover
cor.test(zones_6_1cm$Mean_Track_Counts, zones_6_1cm$mean_vrm)
##
## Pearson's product-moment correlation
##
## data: zones_6_1cm$Mean_Track_Counts and zones_6_1cm$mean_vrm
## t = 2.9681, df = 4, p-value = 0.04122
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
## 0.05424508 0.98077324
## sample estimates:
## cor
## 0.829298
Correlations - 8 cm
# Mean Track Counts & Slope
cor.test(zones_6_8cm$Mean_Track_Counts, zones_6_8cm$mean_slope)
##
## Pearson's product-moment correlation
##
## data: zones_6_8cm$Mean_Track_Counts and zones_6_8cm$mean_slope
## t = 0.38243, df = 4, p-value = 0.7216
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
## -0.7359189 0.8671945
## sample estimates:
## cor
## 0.1878116
# Mean Track Counts & Curvature
cor.test(zones_6_8cm$Mean_Track_Counts, zones_6_8cm$mean_profile_curvature)
##
## Pearson's product-moment correlation
##
## data: zones_6_8cm$Mean_Track_Counts and zones_6_8cm$mean_profile_curvature
## t = -0.15269, df = 4, p-value = 0.886
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
## -0.8360351 0.7838645
## sample estimates:
## cor
## -0.07612235
# Mean Track Counts & surf_complex
cor.test(zones_6_8cm$Mean_Track_Counts, zones_6_8cm$surf_complex)
##
## Pearson's product-moment correlation
##
## data: zones_6_8cm$Mean_Track_Counts and zones_6_8cm$surf_complex
## t = 0.77823, df = 4, p-value = 0.4799
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
## -0.6361474 0.9072042
## sample estimates:
## cor
## 0.3626296
# Mean Track Counts & Coral Cover
cor.test(zones_6_8cm$Mean_Track_Counts, zones_6_8cm$Mean_perc_coral_cover)
##
## Pearson's product-moment correlation
##
## data: zones_6_8cm$Mean_Track_Counts and zones_6_8cm$Mean_perc_coral_cover
## t = -0.47357, df = 4, p-value = 0.6605
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
## -0.8778261 0.7148140
## sample estimates:
## cor
## -0.2304139
# Mean Track Counts & Coral Cover
cor.test(zones_6_8cm$Mean_Track_Counts, zones_6_8cm$mean_vrm)
##
## Pearson's product-moment correlation
##
## data: zones_6_8cm$Mean_Track_Counts and zones_6_8cm$mean_vrm
## t = 0.64925, df = 4, p-value = 0.5516
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
## -0.6709156 0.8958441
## sample estimates:
## cor
## 0.3087647
Correlations - 32 cm
# Mean Track Counts & Slope
cor.test(zones_6_32cm$Mean_Track_Counts, zones_6_32cm$mean_slope)
##
## Pearson's product-moment correlation
##
## data: zones_6_32cm$Mean_Track_Counts and zones_6_32cm$mean_slope
## t = 0.59186, df = 4, p-value = 0.5858
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
## -0.6857101 0.8902974
## sample estimates:
## cor
## 0.2837654
# Mean Track Counts & Curvature
cor.test(zones_6_32cm$Mean_Track_Counts, zones_6_32cm$mean_profile_curvature)
##
## Pearson's product-moment correlation
##
## data: zones_6_32cm$Mean_Track_Counts and zones_6_32cm$mean_profile_curvature
## t = -1.698, df = 4, p-value = 0.1647
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
## -0.9564122 0.3462060
## sample estimates:
## cor
## -0.6471963
# Mean Track Counts & surf_complex
cor.test(zones_6_32cm$Mean_Track_Counts, zones_6_32cm$surf_complex)
##
## Pearson's product-moment correlation
##
## data: zones_6_32cm$Mean_Track_Counts and zones_6_32cm$surf_complex
## t = 0.65847, df = 4, p-value = 0.5462
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
## -0.6685004 0.8967054
## sample estimates:
## cor
## 0.3127211
# Mean Track Counts & Coral Cover
cor.test(zones_6_32cm$Mean_Track_Counts, zones_6_32cm$Mean_perc_coral_cover)
##
## Pearson's product-moment correlation
##
## data: zones_6_32cm$Mean_Track_Counts and zones_6_32cm$Mean_perc_coral_cover
## t = -0.47357, df = 4, p-value = 0.6605
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
## -0.8778261 0.7148140
## sample estimates:
## cor
## -0.2304139
# Mean Track Counts & Coral Cover
cor.test(zones_6_32cm$Mean_Track_Counts, zones_6_32cm$mean_vrm)
##
## Pearson's product-moment correlation
##
## data: zones_6_32cm$Mean_Track_Counts and zones_6_32cm$mean_vrm
## t = 0.67794, df = 4, p-value = 0.535
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
## -0.6633607 0.8984999
## sample estimates:
## cor
## 0.3210291