Load libraries

library(tidyverse)
## ── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
## ✔ dplyr     1.1.4     ✔ readr     2.1.5
## ✔ forcats   1.0.0     ✔ stringr   1.5.1
## ✔ ggplot2   3.5.1     ✔ tibble    3.2.1
## ✔ lubridate 1.9.3     ✔ tidyr     1.3.1
## ✔ purrr     1.0.2     
## ── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
## ✖ dplyr::filter() masks stats::filter()
## ✖ dplyr::lag()    masks stats::lag()
## ℹ Use the conflicted package (<http://conflicted.r-lib.org/>) to force all conflicts to become errors
library(conflicted)
## Warning: package 'conflicted' was built under R version 4.4.1
library(coin)
## Warning: package 'coin' was built under R version 4.4.1
## Loading required package: survival
library(dplyr)
library(multcompView)
## Warning: package 'multcompView' was built under R version 4.4.1
library(readxl)
library(rstudioapi)
library(stringr)
library(vtable)
## Warning: package 'vtable' was built under R version 4.4.1
## Loading required package: kableExtra
## Warning: package 'kableExtra' was built under R version 4.4.1
## 
## Attaching package: 'kableExtra'
## 
## The following object is masked from 'package:dplyr':
## 
##     group_rows

Using the complete data from March to June with onboard gridboard data

Load data including all the snapper measurements from lobster and redfish boats

df_allsnappers <- read.csv("snappers_onboardgridboard.csv")

#change data type
df_allsnappers$Boat_name <- factor(df_allsnappers$Boat_name)
df_allsnappers$Fishing_gear <- factor(df_allsnappers$Fishing_gear)
df_allsnappers$Fishing_area <- factor(df_allsnappers$Fishing_area)
df_allsnappers$Species_sn <- factor(df_allsnappers$Species_sn)
df_allsnappers$Species_cn <- factor(df_allsnappers$Species_cn)
df_allsnappers$Trap_no <- factor(df_allsnappers$Trap_no)
df_allsnappers$landed <- factor(df_allsnappers$landed)
df_allsnappers$catch_contents <- factor(df_allsnappers$catch_contents)
df_allsnappers$Length <- as.numeric(df_allsnappers$Length)
df_allsnappers$study <- factor(df_allsnappers$study)

sumtable(df_allsnappers)
Summary Statistics
Variable N Mean Std. Dev. Min Pctl. 25 Pctl. 75 Max
year 1677 2024 0 2024 2024 2024 2024
month 1677
… April 143 9%
… July 11 1%
… June 603 36%
… March 143 9%
… May 777 46%
Boat_name 1677
… Bridgette 13 1%
… Highliner 50 3%
… Lady Carolina 17 1%
… Mr Fish 1 0%
… Navigator 29 2%
… Second Wind 1425 85%
… Spirit of Saba 142 8%
Trip_ID 0
… No 0
… Yes 0
Fishing_gear 1677
… LP 63 4%
… LP/MP 11 1%
… RP 1603 96%
Fishing_area 1677
… 143 9%
… A3 140 8%
… A3/A4 432 26%
… B2 29 2%
… B4 66 4%
… C4/C5 11 1%
… C5 4 0%
… C5/D5 407 24%
… D4 156 9%
… D5 289 17%
Depth_m_min 1111 47 20 8 40 50 91
Depth_m_max 1111 107 52 12 60 150 150
Species_sn 1677
… Apsilus dentatus 5 0%
… Etelis oculatus 6 0%
… Lutjanus buccanella 802 48%
… Lutjanus jocu 6 0%
… Lutjanus synagris 26 2%
… Lutjanus vivanus 712 42%
… Ocyurus chrysurus 3 0%
… Pristipomoides aquilonaris 9 1%
… Rhomboplites aurorubens 108 6%
Species_cn 1677
… Black snapper 2 0%
… Black Snapper 3 0%
… Blackfin snapper 64 4%
… Blackfin Snapper 738 44%
… Dog Snapper 6 0%
… Lane Snapper 26 2%
… Queen Snapper 6 0%
… Vermillion snapper 14 1%
… Vermillion Snapper 94 6%
… Wenchman snapper 1 0%
… Wenchman Snapper 8 0%
… yelloweye snapper 1 0%
… yelloweye Snapper 1 0%
… Yelloweye snapper 72 4%
… Yelloweye Snapper 636 38%
… YellowEye Snapper 2 0%
… Yellowtail Snapper 3 0%
Trap_no 1677
… 349 21%
… 1 34 2%
… 10 109 6%
… 11 41 2%
… 12 61 4%
… 13 60 4%
… 14 73 4%
… 14/15 9 1%
… 15 46 3%
… 16 54 3%
… 17 65 4%
… 18 21 1%
… 19 30 2%
… 2 45 3%
… 20 35 2%
… 21 13 1%
… 22 22 1%
… 23 16 1%
… 24 40 2%
… 25 16 1%
… 26 10 1%
… 27 6 0%
… 28 21 1%
… 29 15 1%
… 3 48 3%
… 30 22 1%
… 31 24 1%
… 33 6 0%
… 34 20 1%
… 35 3 0%
… 36 18 1%
… 37 34 2%
… 38 14 1%
… 39 6 0%
… 4 61 4%
… 40 9 1%
… 41 4 0%
… 42 6 0%
… 43 5 0%
… 44 8 0%
… 45 5 0%
… 5 34 2%
… 51 1 0%
… 54 1 0%
… 6 28 2%
… 7 47 3%
… 8 32 2%
… 9 50 3%
landed 1677
… Landed 1677 100%
catch_contents 1677
… Partial 349 21%
… Whole 1328 79%
Length 1677 29 5.1 12 25 31 70
study 1677
… GRIDBOARD 349 21%
… ONBOARD 1328 79%
Comments 1677
… 1662 99%
… 18 FATHOM JAPANESE BAIT= MIXED FISH POT 11 1%
… All mixed fish measured, no lobsters measured 2 0%
… G=33 1 0%
… G=44 1 0%

Look at species data

ggplot(df_allsnappers, aes(x = Species_sn)) + 
  geom_bar() + 
  theme_classic() +
  theme(axis.text.x=element_text(angle = 90, hjust = 0, vjust = 0.5))

calculate counts and proportions of species caught

total_counts <- df_allsnappers %>%
  group_by(Species_sn) %>%
  summarize(count = n())
View(total_counts)

#calculate proportions
proportions <- total_counts %>%
  mutate(proportion = count / sum(count))

total_counts$proportions <- proportions

#calculate percentages
perc <- total_counts %>%
  mutate(perc = (count / sum(count))*100)

total_counts$perc <- perc
View(total_counts)
## Warning in format.data.frame(x0): corrupt data frame: columns will be truncated
## or padded with NAs

bar chart

xaxis_species_names <- c("A. dentatus", "E. oculatus", "L. buccanella", "L. jocu", "L. synagris", "L. vivanus", "O. chrysurus", "P. aquilonaris", "R. aurorubens")
xaxis_species_names_rev <- c("R. aurorubens", "P. aquilonaris", "O. chrysurus", "L. vivanus", "L. synagris", "L. jocu", "L. buccanella", "E. oculatus", "A. dentatus")

snapper_barchart_gridonboard <- ggplot(total_counts, 
                                       aes(x = Species_sn, 
                                           y = count, 
                                           fill = Species_sn)) +
  theme_classic() +
  geom_bar(stat = "identity") +
  scale_fill_viridis_d(option = "H", 
                       guide = "none", 
                       begin = 0.05, 
                       end = 0.95) +
  labs(y = "Number of individuals", 
       x = "Species", 
       title = str_wrap(c("Onboard and gridboard recordings of snappers"), width = 28)) +
  theme(axis.text.x=element_text(angle = 45, 
                                 hjust = 0.95, 
                                 vjust = 0.95,
                                 face = "italic")) +
  scale_x_discrete(labels = xaxis_species_names)

snapper_barchart_gridonboard

Save plot

ggsave("snapper_barchart_gridonboard.png", plot = snapper_barchart_gridonboard, width = 4, height = 4, dpi = 400)

look at lengths

snapper_gridboardonboard_boxplot <- ggplot(df_allsnappers, 
                                           aes(x = Species_sn, 
                                               y = Length)) +
  geom_boxplot(aes(color = Species_sn)) +
  theme_classic() +
  coord_flip() +
  scale_color_viridis_d(option = "H", 
                        guide = "none", 
                        begin = 0.05, 
                        end = 0.95) +
  labs(x = "Species", 
       y = "Fork length in cm", 
       title = "Snapper lengths recorded during onboard and gridboard sampling") +
  scale_x_discrete(limits = rev, labels = xaxis_species_names_rev) +
  theme(axis.text.y = element_text(face = "italic"))

snapper_gridboardonboard_boxplot

Save plot

ggsave("snapper_gridboardonboard_boxplot.png", plot = snapper_gridboardonboard_boxplot, width = 7.2, height = 4, dpi = 400)

Gridboard vs onboard studies

calculate counts

conflicts_prefer(dplyr::filter)
## [conflicted] Will prefer dplyr::filter over any other package.
# get a summary of onboard vs gridboard measurements
onboard_counts <- df_allsnappers %>%
  filter(study == "ONBOARD") %>%
  group_by(Species_sn) %>%
  summarize(count = n())

Study_OB <- "Onboard"
onboard_counts$Study <- Study_OB
View(onboard_counts)

gridboard_counts <- df_allsnappers %>%
  filter(study == "GRIDBOARD") %>%
  group_by(Species_sn) %>%
  summarize(count = n())

Study_GB <- "Gridboard"
gridboard_counts$Study <- Study_GB
View(gridboard_counts)

summary_studysnappers <- bind_rows(onboard_counts, gridboard_counts)
summary_studysnappers
## # A tibble: 15 × 3
##    Species_sn                 count Study    
##    <fct>                      <int> <chr>    
##  1 Apsilus dentatus               5 Onboard  
##  2 Etelis oculatus                6 Onboard  
##  3 Lutjanus buccanella          579 Onboard  
##  4 Lutjanus jocu                  2 Onboard  
##  5 Lutjanus synagris             11 Onboard  
##  6 Lutjanus vivanus             619 Onboard  
##  7 Ocyurus chrysurus              1 Onboard  
##  8 Pristipomoides aquilonaris     9 Onboard  
##  9 Rhomboplites aurorubens       96 Onboard  
## 10 Lutjanus buccanella          223 Gridboard
## 11 Lutjanus jocu                  4 Gridboard
## 12 Lutjanus synagris             15 Gridboard
## 13 Lutjanus vivanus              93 Gridboard
## 14 Ocyurus chrysurus              2 Gridboard
## 15 Rhomboplites aurorubens       12 Gridboard

stacked bar chart

plot_studysnappers <- ggplot(summary_studysnappers, aes(x = Species_sn, 
                                y = count, 
                                fill = Study)) +
  geom_bar(stat = "identity", 
           position = "fill") +
    labs(x = "Species", 
       y = "Proportion of individuals", 
       title = str_wrap(c("Snappers measured by onboard and gridboard sampling"), width = 28),
       fill = "Study") +
  theme_classic() +
  scale_fill_viridis_d(option = "C", begin = 0.1, end = 0.9) +
  theme(axis.text.x=element_text(angle = 45, 
                                 hjust = 0.95, 
                                 vjust = 0.95,
                                 face = "italic")) +
  scale_x_discrete(labels = xaxis_species_names)

plot_studysnappers

Save plot

ggsave("plot_studysnappers.png", plot = plot_studysnappers, width = 4, height = 4, dpi = 400)

Type of fishing gear used

calculate counts

# get a summary of the fishing gear used
rp_counts <- df_allsnappers %>%
  filter(Fishing_gear == "RP") %>%
  group_by(Species_sn) %>%
  summarize(count = n())

Fishing_gear_RP <- "RP"
rp_counts$Fishing_gear <- Fishing_gear_RP
View(rp_counts)

lp_counts <- df_allsnappers %>%
  filter(Fishing_gear == "LP") %>%
  group_by(Species_sn) %>%
  summarize(count = n())

Fishing_gear_LP <- "LP"
lp_counts$Fishing_gear <- Fishing_gear_LP
View(lp_counts)

mplp_counts <- df_allsnappers %>%
  filter(Fishing_gear == "LP/MP") %>%
  group_by(Species_sn) %>%
  summarize(count = n())

Fishing_gear_LPMP <- "LP/MP"
mplp_counts$Fishing_gear <- Fishing_gear_LPMP
View(mplp_counts)

summary_fishinggear <- bind_rows(rp_counts, lp_counts, mplp_counts)
summary_fishinggear
## # A tibble: 16 × 3
##    Species_sn                 count Fishing_gear
##    <fct>                      <int> <chr>       
##  1 Apsilus dentatus               5 RP          
##  2 Etelis oculatus                5 RP          
##  3 Lutjanus buccanella          778 RP          
##  4 Lutjanus jocu                  1 RP          
##  5 Lutjanus synagris             11 RP          
##  6 Lutjanus vivanus             709 RP          
##  7 Pristipomoides aquilonaris     9 RP          
##  8 Rhomboplites aurorubens       85 RP          
##  9 Etelis oculatus                1 LP          
## 10 Lutjanus buccanella           24 LP          
## 11 Lutjanus jocu                  5 LP          
## 12 Lutjanus synagris             15 LP          
## 13 Lutjanus vivanus               3 LP          
## 14 Ocyurus chrysurus              3 LP          
## 15 Rhomboplites aurorubens       12 LP          
## 16 Rhomboplites aurorubens       11 LP/MP

stacked bar chart

snapper_fishingear_onboardgridboard <- ggplot(summary_fishinggear, aes(x = Species_sn, 
                                y = count, 
                                fill = Fishing_gear)) +
  geom_bar(stat = "identity", 
           position = "fill") +
    labs(x = "Species", 
       y = "Proportion of individuals", 
       title = str_wrap(c("Fishing gear used to catch snappers"), width = 28),
       fill = "Fishing gear") +
  theme_classic() +
  scale_fill_viridis_d(option = "C", 
                       begin = 0.3, 
                       end = 0.7, 
                       labels = str_wrap(c("Lobster pot", 
                                  "Lobster/mixed fish pot", 
                                  "Redfish pot"), width = 12)) +
  theme(axis.text.x=element_text(angle = 45, 
                                 hjust = 0.95, 
                                 vjust = 0.95,
                                 face = "italic")) +
  scale_x_discrete(labels = xaxis_species_names)

snapper_fishingear_onboardgridboard

Save plot

ggsave("snapper_fishingear_onboardgridboard.png", plot = snapper_fishingear_onboardgridboard, width = 4, height = 4, dpi = 400)

Area-length relationship

Summary per area

df_area <- df_allsnappers %>%
  filter(Fishing_area != "") %>% # remove measurements for which the area was not recorded
  filter(!Species_sn %in% c("Ocyurus chrysurus", "Lutjanus jocu", "Apsilus dentatus")) # remove these three species
view(df_area)

#filter by area
df_area_a3 <- df_area%>%
  filter(Fishing_area == "A3")
sumtable(df_area_a3)
Summary Statistics
Variable N Mean Std. Dev. Min Pctl. 25 Pctl. 75 Max
date 140
… 24/04/2024 140 100%
year 140 2024 0 2024 2024 2024 2024
month 140
… April 140 100%
Boat_name 140
… Bridgette 0 0%
… Highliner 0 0%
… Lady Carolina 0 0%
… Mr Fish 0 0%
… Navigator 0 0%
… Second Wind 140 100%
… Spirit of Saba 0 0%
Trip_ID 0
… No 0
… Yes 0
Fishing_gear 140
… LP 0 0%
… LP/MP 0 0%
… RP 140 100%
Fishing_area 140
… 0 0%
… A3 140 100%
… A3/A4 0 0%
… B2 0 0%
… B4 0 0%
… C4/C5 0 0%
… C5 0 0%
… C5/D5 0 0%
… D4 0 0%
… D5 0 0%
Depth_m_min 140 82 0 82 82 82 82
Depth_m_max 140 128 0 128 128 128 128
Species_sn 140
… Apsilus dentatus 0 0%
… Etelis oculatus 0 0%
… Lutjanus buccanella 99 71%
… Lutjanus jocu 0 0%
… Lutjanus synagris 0 0%
… Lutjanus vivanus 41 29%
… Ocyurus chrysurus 0 0%
… Pristipomoides aquilonaris 0 0%
… Rhomboplites aurorubens 0 0%
Species_cn 140
… Black snapper 0 0%
… Black Snapper 0 0%
… Blackfin snapper 0 0%
… Blackfin Snapper 99 71%
… Dog Snapper 0 0%
… Lane Snapper 0 0%
… Queen Snapper 0 0%
… Vermillion snapper 0 0%
… Vermillion Snapper 0 0%
… Wenchman snapper 0 0%
… Wenchman Snapper 0 0%
… yelloweye snapper 0 0%
… yelloweye Snapper 0 0%
… Yelloweye snapper 0 0%
… Yelloweye Snapper 41 29%
… YellowEye Snapper 0 0%
… Yellowtail Snapper 0 0%
Trap_no 140
… 140 100%
… 1 0 0%
… 10 0 0%
… 11 0 0%
… 12 0 0%
… 13 0 0%
… 14 0 0%
… 14/15 0 0%
… 15 0 0%
… 16 0 0%
… 17 0 0%
… 18 0 0%
… 19 0 0%
… 2 0 0%
… 20 0 0%
… 21 0 0%
… 22 0 0%
… 23 0 0%
… 24 0 0%
… 25 0 0%
… 26 0 0%
… 27 0 0%
… 28 0 0%
… 29 0 0%
… 3 0 0%
… 30 0 0%
… 31 0 0%
… 33 0 0%
… 34 0 0%
… 35 0 0%
… 36 0 0%
… 37 0 0%
… 38 0 0%
… 39 0 0%
… 4 0 0%
… 40 0 0%
… 41 0 0%
… 42 0 0%
… 43 0 0%
… 44 0 0%
… 45 0 0%
… 5 0 0%
… 51 0 0%
… 54 0 0%
… 6 0 0%
… 7 0 0%
… 8 0 0%
… 9 0 0%
landed 140
… Landed 140 100%
catch_contents 140
… Partial 140 100%
… Whole 0 0%
Length 140 30 5 24 27 32 45
study 140
… GRIDBOARD 140 100%
… ONBOARD 0 0%
Comments 140
… 138 99%
… All mixed fish measured, no lobsters measured 2 1%
df_area_a3a4 <- df_area%>%
  filter(Fishing_area == "A3/A4")
sumtable(df_area_a3a4)
Summary Statistics
Variable N Mean Std. Dev. Min Pctl. 25 Pctl. 75 Max
date 431
… 01/05/2024 110 26%
… 08/05/2024 133 31%
… 14/05/2024 188 44%
year 431 2024 0 2024 2024 2024 2024
month 431
… May 431 100%
Boat_name 431
… Bridgette 0 0%
… Highliner 0 0%
… Lady Carolina 0 0%
… Mr Fish 0 0%
… Navigator 0 0%
… Second Wind 431 100%
… Spirit of Saba 0 0%
Trip_ID 0
… No 0
… Yes 0
Fishing_gear 431
… LP 0 0%
… LP/MP 0 0%
… RP 431 100%
Fishing_area 431
… 0 0%
… A3 0 0%
… A3/A4 431 100%
… B2 0 0%
… B4 0 0%
… C4/C5 0 0%
… C5 0 0%
… C5/D5 0 0%
… D4 0 0%
… D5 0 0%
Depth_m_min 298 28 9.2 21 21 40 40
Depth_m_max 298 40 15 28 28 60 60
Species_sn 431
… Apsilus dentatus 0 0%
… Etelis oculatus 0 0%
… Lutjanus buccanella 393 91%
… Lutjanus jocu 0 0%
… Lutjanus synagris 0 0%
… Lutjanus vivanus 38 9%
… Ocyurus chrysurus 0 0%
… Pristipomoides aquilonaris 0 0%
… Rhomboplites aurorubens 0 0%
Species_cn 431
… Black snapper 0 0%
… Black Snapper 0 0%
… Blackfin snapper 0 0%
… Blackfin Snapper 393 91%
… Dog Snapper 0 0%
… Lane Snapper 0 0%
… Queen Snapper 0 0%
… Vermillion snapper 0 0%
… Vermillion Snapper 0 0%
… Wenchman snapper 0 0%
… Wenchman Snapper 0 0%
… yelloweye snapper 0 0%
… yelloweye Snapper 0 0%
… Yelloweye snapper 0 0%
… Yelloweye Snapper 36 8%
… YellowEye Snapper 2 0%
… Yellowtail Snapper 0 0%
Trap_no 431
… 110 26%
… 1 9 2%
… 10 42 10%
… 11 17 4%
… 12 31 7%
… 13 18 4%
… 14 27 6%
… 14/15 0 0%
… 15 14 3%
… 16 4 1%
… 17 3 1%
… 18 3 1%
… 19 7 2%
… 2 28 6%
… 20 9 2%
… 21 1 0%
… 22 5 1%
… 23 0 0%
… 24 0 0%
… 25 0 0%
… 26 0 0%
… 27 0 0%
… 28 0 0%
… 29 0 0%
… 3 13 3%
… 30 0 0%
… 31 0 0%
… 33 0 0%
… 34 0 0%
… 35 0 0%
… 36 0 0%
… 37 0 0%
… 38 0 0%
… 39 0 0%
… 4 14 3%
… 40 0 0%
… 41 0 0%
… 42 0 0%
… 43 0 0%
… 44 0 0%
… 45 0 0%
… 5 10 2%
… 51 0 0%
… 54 0 0%
… 6 11 3%
… 7 24 6%
… 8 6 1%
… 9 25 6%
landed 431
… Landed 431 100%
catch_contents 431
… Partial 110 26%
… Whole 321 74%
Length 431 30 5 20 26 32 44
study 431
… GRIDBOARD 110 26%
… ONBOARD 321 74%
Comments 431
… 431 100%
df_area_b2 <- df_area%>%
  filter(Fishing_area == "B2")
sumtable(df_area_b2)
Summary Statistics
Variable N Mean Std. Dev. Min Pctl. 25 Pctl. 75 Max
date 28
… 16/05/2024 28 100%
year 28 2024 0 2024 2024 2024 2024
month 28
… May 28 100%
Boat_name 28
… Bridgette 0 0%
… Highliner 0 0%
… Lady Carolina 0 0%
… Mr Fish 0 0%
… Navigator 28 100%
… Second Wind 0 0%
… Spirit of Saba 0 0%
Trip_ID 0
… No 0
… Yes 0
Fishing_gear 28
… LP 28 100%
… LP/MP 0 0%
… RP 0 0%
Fishing_area 28
… 0 0%
… A3 0 0%
… A3/A4 0 0%
… B2 28 100%
… B4 0 0%
… C4/C5 0 0%
… C5 0 0%
… C5/D5 0 0%
… D4 0 0%
… D5 0 0%
Depth_m_min 28 20 0 20 20 20 20
Depth_m_max 28 20 0 20 20 20 20
Species_sn 28
… Apsilus dentatus 0 0%
… Etelis oculatus 0 0%
… Lutjanus buccanella 22 79%
… Lutjanus jocu 0 0%
… Lutjanus synagris 0 0%
… Lutjanus vivanus 0 0%
… Ocyurus chrysurus 0 0%
… Pristipomoides aquilonaris 0 0%
… Rhomboplites aurorubens 6 21%
Species_cn 28
… Black snapper 0 0%
… Black Snapper 0 0%
… Blackfin snapper 0 0%
… Blackfin Snapper 22 79%
… Dog Snapper 0 0%
… Lane Snapper 0 0%
… Queen Snapper 0 0%
… Vermillion snapper 0 0%
… Vermillion Snapper 6 21%
… Wenchman snapper 0 0%
… Wenchman Snapper 0 0%
… yelloweye snapper 0 0%
… yelloweye Snapper 0 0%
… Yelloweye snapper 0 0%
… Yelloweye Snapper 0 0%
… YellowEye Snapper 0 0%
… Yellowtail Snapper 0 0%
Trap_no 28
… 28 100%
… 1 0 0%
… 10 0 0%
… 11 0 0%
… 12 0 0%
… 13 0 0%
… 14 0 0%
… 14/15 0 0%
… 15 0 0%
… 16 0 0%
… 17 0 0%
… 18 0 0%
… 19 0 0%
… 2 0 0%
… 20 0 0%
… 21 0 0%
… 22 0 0%
… 23 0 0%
… 24 0 0%
… 25 0 0%
… 26 0 0%
… 27 0 0%
… 28 0 0%
… 29 0 0%
… 3 0 0%
… 30 0 0%
… 31 0 0%
… 33 0 0%
… 34 0 0%
… 35 0 0%
… 36 0 0%
… 37 0 0%
… 38 0 0%
… 39 0 0%
… 4 0 0%
… 40 0 0%
… 41 0 0%
… 42 0 0%
… 43 0 0%
… 44 0 0%
… 45 0 0%
… 5 0 0%
… 51 0 0%
… 54 0 0%
… 6 0 0%
… 7 0 0%
… 8 0 0%
… 9 0 0%
landed 28
… Landed 28 100%
catch_contents 28
… Partial 28 100%
… Whole 0 0%
Length 28 27 3.5 21 25 30 33
study 28
… GRIDBOARD 28 100%
… ONBOARD 0 0%
Comments 28
… 28 100%
df_area_b4_lp <- df_area%>%
  filter(Fishing_area == "B4") %>%
  filter(Fishing_gear == "LP")
sumtable(df_area_b4_lp)
Summary Statistics
Variable N Mean Std. Dev. Min Pctl. 25 Pctl. 75 Max
date 24
… 06/05/2024 1 4%
… 15/05/2024 12 50%
… 16/05/2024 9 38%
… 22/04/2024 2 8%
year 24 2024 0 2024 2024 2024 2024
month 24
… April 2 8%
… May 22 92%
Boat_name 24
… Bridgette 11 46%
… Highliner 0 0%
… Lady Carolina 12 50%
… Mr Fish 1 4%
… Navigator 0 0%
… Second Wind 0 0%
… Spirit of Saba 0 0%
Trip_ID 0
… No 0
… Yes 0
Fishing_gear 24
… LP 24 100%
… LP/MP 0 0%
… RP 0 0%
Fishing_area 24
… 0 0%
… A3 0 0%
… A3/A4 0 0%
… B2 0 0%
… B4 24 100%
… C4/C5 0 0%
… C5 0 0%
… C5/D5 0 0%
… D4 0 0%
… D5 0 0%
Depth_m_min 24 13 2 11 12 15 19
Depth_m_max 24 22 2.4 14 22 23 23
Species_sn 24
… Apsilus dentatus 0 0%
… Etelis oculatus 0 0%
… Lutjanus buccanella 2 8%
… Lutjanus jocu 0 0%
… Lutjanus synagris 15 62%
… Lutjanus vivanus 1 4%
… Ocyurus chrysurus 0 0%
… Pristipomoides aquilonaris 0 0%
… Rhomboplites aurorubens 6 25%
Species_cn 24
… Black snapper 0 0%
… Black Snapper 0 0%
… Blackfin snapper 0 0%
… Blackfin Snapper 2 8%
… Dog Snapper 0 0%
… Lane Snapper 15 62%
… Queen Snapper 0 0%
… Vermillion snapper 0 0%
… Vermillion Snapper 6 25%
… Wenchman snapper 0 0%
… Wenchman Snapper 0 0%
… yelloweye snapper 0 0%
… yelloweye Snapper 0 0%
… Yelloweye snapper 0 0%
… Yelloweye Snapper 1 4%
… YellowEye Snapper 0 0%
… Yellowtail Snapper 0 0%
Trap_no 24
… 24 100%
… 1 0 0%
… 10 0 0%
… 11 0 0%
… 12 0 0%
… 13 0 0%
… 14 0 0%
… 14/15 0 0%
… 15 0 0%
… 16 0 0%
… 17 0 0%
… 18 0 0%
… 19 0 0%
… 2 0 0%
… 20 0 0%
… 21 0 0%
… 22 0 0%
… 23 0 0%
… 24 0 0%
… 25 0 0%
… 26 0 0%
… 27 0 0%
… 28 0 0%
… 29 0 0%
… 3 0 0%
… 30 0 0%
… 31 0 0%
… 33 0 0%
… 34 0 0%
… 35 0 0%
… 36 0 0%
… 37 0 0%
… 38 0 0%
… 39 0 0%
… 4 0 0%
… 40 0 0%
… 41 0 0%
… 42 0 0%
… 43 0 0%
… 44 0 0%
… 45 0 0%
… 5 0 0%
… 51 0 0%
… 54 0 0%
… 6 0 0%
… 7 0 0%
… 8 0 0%
… 9 0 0%
landed 24
… Landed 24 100%
catch_contents 24
… Partial 24 100%
… Whole 0 0%
Length 24 28 3.6 23 26 30 38
study 24
… GRIDBOARD 24 100%
… ONBOARD 0 0%
Comments 24
… 24 100%
df_area_b4_rp <- df_area%>%
  filter(Fishing_area == "B4") %>%
  filter(Fishing_gear == "RP")
sumtable(df_area_b4_rp)
Summary Statistics
Variable N Mean Std. Dev. Min Pctl. 25 Pctl. 75 Max
date 39
… 04/06/2024 39 100%
year 39 2024 0 2024 2024 2024 2024
month 39
… June 39 100%
Boat_name 39
… Bridgette 0 0%
… Highliner 39 100%
… Lady Carolina 0 0%
… Mr Fish 0 0%
… Navigator 0 0%
… Second Wind 0 0%
… Spirit of Saba 0 0%
Trip_ID 0
… No 0
… Yes 0
Fishing_gear 39
… LP 0 0%
… LP/MP 0 0%
… RP 39 100%
Fishing_area 39
… 0 0%
… A3 0 0%
… A3/A4 0 0%
… B2 0 0%
… B4 39 100%
… C4/C5 0 0%
… C5 0 0%
… C5/D5 0 0%
… D4 0 0%
… D5 0 0%
Depth_m_min 39 91 0 91 91 91 91
Depth_m_max 39 92 0 92 92 92 92
Species_sn 39
… Apsilus dentatus 0 0%
… Etelis oculatus 0 0%
… Lutjanus buccanella 3 8%
… Lutjanus jocu 0 0%
… Lutjanus synagris 0 0%
… Lutjanus vivanus 36 92%
… Ocyurus chrysurus 0 0%
… Pristipomoides aquilonaris 0 0%
… Rhomboplites aurorubens 0 0%
Species_cn 39
… Black snapper 0 0%
… Black Snapper 0 0%
… Blackfin snapper 0 0%
… Blackfin Snapper 3 8%
… Dog Snapper 0 0%
… Lane Snapper 0 0%
… Queen Snapper 0 0%
… Vermillion snapper 0 0%
… Vermillion Snapper 0 0%
… Wenchman snapper 0 0%
… Wenchman Snapper 0 0%
… yelloweye snapper 0 0%
… yelloweye Snapper 0 0%
… Yelloweye snapper 0 0%
… Yelloweye Snapper 36 92%
… YellowEye Snapper 0 0%
… Yellowtail Snapper 0 0%
Trap_no 39
… 39 100%
… 1 0 0%
… 10 0 0%
… 11 0 0%
… 12 0 0%
… 13 0 0%
… 14 0 0%
… 14/15 0 0%
… 15 0 0%
… 16 0 0%
… 17 0 0%
… 18 0 0%
… 19 0 0%
… 2 0 0%
… 20 0 0%
… 21 0 0%
… 22 0 0%
… 23 0 0%
… 24 0 0%
… 25 0 0%
… 26 0 0%
… 27 0 0%
… 28 0 0%
… 29 0 0%
… 3 0 0%
… 30 0 0%
… 31 0 0%
… 33 0 0%
… 34 0 0%
… 35 0 0%
… 36 0 0%
… 37 0 0%
… 38 0 0%
… 39 0 0%
… 4 0 0%
… 40 0 0%
… 41 0 0%
… 42 0 0%
… 43 0 0%
… 44 0 0%
… 45 0 0%
… 5 0 0%
… 51 0 0%
… 54 0 0%
… 6 0 0%
… 7 0 0%
… 8 0 0%
… 9 0 0%
landed 39
… Landed 39 100%
catch_contents 39
… Partial 39 100%
… Whole 0 0%
Length 39 27 3.6 20 25 29 34
study 39
… GRIDBOARD 39 100%
… ONBOARD 0 0%
Comments 39
… 39 100%
df_area_c4c5 <- df_area%>%
  filter(Fishing_area == "C4/C5")
sumtable(df_area_c4c5)
Summary Statistics
Variable N Mean Std. Dev. Min Pctl. 25 Pctl. 75 Max
date 11
… 15/07/2024 11 100%
year 11 2024 0 2024 2024 2024 2024
month 11
… July 11 100%
Boat_name 11
… Bridgette 0 0%
… Highliner 11 100%
… Lady Carolina 0 0%
… Mr Fish 0 0%
… Navigator 0 0%
… Second Wind 0 0%
… Spirit of Saba 0 0%
Trip_ID 0
… No 0
… Yes 0
Fishing_gear 11
… LP 0 0%
… LP/MP 11 100%
… RP 0 0%
Fishing_area 11
… 0 0%
… A3 0 0%
… A3/A4 0 0%
… B2 0 0%
… B4 0 0%
… C4/C5 11 100%
… C5 0 0%
… C5/D5 0 0%
… D4 0 0%
… D5 0 0%
Depth_m_min 11 15 0 15 15 15 15
Depth_m_max 11 30 0 30 30 30 30
Species_sn 11
… Apsilus dentatus 0 0%
… Etelis oculatus 0 0%
… Lutjanus buccanella 0 0%
… Lutjanus jocu 0 0%
… Lutjanus synagris 0 0%
… Lutjanus vivanus 0 0%
… Ocyurus chrysurus 0 0%
… Pristipomoides aquilonaris 0 0%
… Rhomboplites aurorubens 11 100%
Species_cn 11
… Black snapper 0 0%
… Black Snapper 0 0%
… Blackfin snapper 0 0%
… Blackfin Snapper 0 0%
… Dog Snapper 0 0%
… Lane Snapper 0 0%
… Queen Snapper 0 0%
… Vermillion snapper 0 0%
… Vermillion Snapper 11 100%
… Wenchman snapper 0 0%
… Wenchman Snapper 0 0%
… yelloweye snapper 0 0%
… yelloweye Snapper 0 0%
… Yelloweye snapper 0 0%
… Yelloweye Snapper 0 0%
… YellowEye Snapper 0 0%
… Yellowtail Snapper 0 0%
Trap_no 11
… 0 0%
… 1 0 0%
… 10 0 0%
… 11 0 0%
… 12 0 0%
… 13 1 9%
… 14 1 9%
… 14/15 9 82%
… 15 0 0%
… 16 0 0%
… 17 0 0%
… 18 0 0%
… 19 0 0%
… 2 0 0%
… 20 0 0%
… 21 0 0%
… 22 0 0%
… 23 0 0%
… 24 0 0%
… 25 0 0%
… 26 0 0%
… 27 0 0%
… 28 0 0%
… 29 0 0%
… 3 0 0%
… 30 0 0%
… 31 0 0%
… 33 0 0%
… 34 0 0%
… 35 0 0%
… 36 0 0%
… 37 0 0%
… 38 0 0%
… 39 0 0%
… 4 0 0%
… 40 0 0%
… 41 0 0%
… 42 0 0%
… 43 0 0%
… 44 0 0%
… 45 0 0%
… 5 0 0%
… 51 0 0%
… 54 0 0%
… 6 0 0%
… 7 0 0%
… 8 0 0%
… 9 0 0%
landed 11
… Landed 11 100%
catch_contents 11
… Partial 0 0%
… Whole 11 100%
Length 11 23 2.3 20 22 25 27
study 11
… GRIDBOARD 0 0%
… ONBOARD 11 100%
Comments 11
… 18 FATHOM JAPANESE BAIT= MIXED FISH POT 11 100%
df_area_c5 <- df_area%>%
  filter(Fishing_area == "C5")
sumtable(df_area_c5)
Summary Statistics
Variable N Mean Std. Dev. Min Pctl. 25 Pctl. 75 Max
date 2
… 07/05/2024 2 100%
year 2 2024 0 2024 2024 2024 2024
month 2
… May 2 100%
Boat_name 2
… Bridgette 0 0%
… Highliner 0 0%
… Lady Carolina 2 100%
… Mr Fish 0 0%
… Navigator 0 0%
… Second Wind 0 0%
… Spirit of Saba 0 0%
Trip_ID 0
… No 0
… Yes 0
Fishing_gear 2
… LP 2 100%
… LP/MP 0 0%
… RP 0 0%
Fishing_area 2
… 0 0%
… A3 0 0%
… A3/A4 0 0%
… B2 0 0%
… B4 0 0%
… C4/C5 0 0%
… C5 2 100%
… C5/D5 0 0%
… D4 0 0%
… D5 0 0%
Depth_m_min 2 8 0 8 8 8 8
Depth_m_max 2 14 0 14 14 14 14
Species_sn 2
… Apsilus dentatus 0 0%
… Etelis oculatus 0 0%
… Lutjanus buccanella 0 0%
… Lutjanus jocu 0 0%
… Lutjanus synagris 0 0%
… Lutjanus vivanus 2 100%
… Ocyurus chrysurus 0 0%
… Pristipomoides aquilonaris 0 0%
… Rhomboplites aurorubens 0 0%
Species_cn 2
… Black snapper 0 0%
… Black Snapper 0 0%
… Blackfin snapper 0 0%
… Blackfin Snapper 0 0%
… Dog Snapper 0 0%
… Lane Snapper 0 0%
… Queen Snapper 0 0%
… Vermillion snapper 0 0%
… Vermillion Snapper 0 0%
… Wenchman snapper 0 0%
… Wenchman Snapper 0 0%
… yelloweye snapper 0 0%
… yelloweye Snapper 0 0%
… Yelloweye snapper 0 0%
… Yelloweye Snapper 2 100%
… YellowEye Snapper 0 0%
… Yellowtail Snapper 0 0%
Trap_no 2
… 2 100%
… 1 0 0%
… 10 0 0%
… 11 0 0%
… 12 0 0%
… 13 0 0%
… 14 0 0%
… 14/15 0 0%
… 15 0 0%
… 16 0 0%
… 17 0 0%
… 18 0 0%
… 19 0 0%
… 2 0 0%
… 20 0 0%
… 21 0 0%
… 22 0 0%
… 23 0 0%
… 24 0 0%
… 25 0 0%
… 26 0 0%
… 27 0 0%
… 28 0 0%
… 29 0 0%
… 3 0 0%
… 30 0 0%
… 31 0 0%
… 33 0 0%
… 34 0 0%
… 35 0 0%
… 36 0 0%
… 37 0 0%
… 38 0 0%
… 39 0 0%
… 4 0 0%
… 40 0 0%
… 41 0 0%
… 42 0 0%
… 43 0 0%
… 44 0 0%
… 45 0 0%
… 5 0 0%
… 51 0 0%
… 54 0 0%
… 6 0 0%
… 7 0 0%
… 8 0 0%
… 9 0 0%
landed 2
… Landed 2 100%
catch_contents 2
… Partial 2 100%
… Whole 0 0%
Length 2 38 9.2 32 35 42 45
study 2
… GRIDBOARD 2 100%
… ONBOARD 0 0%
Comments 2
… 2 100%
df_area_c5d5 <- df_area%>%
  filter(Fishing_area == "C5/D5")
sumtable(df_area_c5d5)
Summary Statistics
Variable N Mean Std. Dev. Min Pctl. 25 Pctl. 75 Max
date 406
… 05/06/2024 406 100%
year 406 2024 0 2024 2024 2024 2024
month 406
… June 406 100%
Boat_name 406
… Bridgette 0 0%
… Highliner 0 0%
… Lady Carolina 0 0%
… Mr Fish 0 0%
… Navigator 0 0%
… Second Wind 406 100%
… Spirit of Saba 0 0%
Trip_ID 0
… No 0
… Yes 0
Fishing_gear 406
… LP 0 0%
… LP/MP 0 0%
… RP 406 100%
Fishing_area 406
… 0 0%
… A3 0 0%
… A3/A4 0 0%
… B2 0 0%
… B4 0 0%
… C4/C5 0 0%
… C5 0 0%
… C5/D5 406 100%
… D4 0 0%
… D5 0 0%
Depth_m_min 406 50 0 50 50 50 50
Depth_m_max 406 150 0 150 150 150 150
Species_sn 406
… Apsilus dentatus 0 0%
… Etelis oculatus 0 0%
… Lutjanus buccanella 105 26%
… Lutjanus jocu 0 0%
… Lutjanus synagris 0 0%
… Lutjanus vivanus 274 67%
… Ocyurus chrysurus 0 0%
… Pristipomoides aquilonaris 5 1%
… Rhomboplites aurorubens 22 5%
Species_cn 406
… Black snapper 0 0%
… Black Snapper 0 0%
… Blackfin snapper 0 0%
… Blackfin Snapper 105 26%
… Dog Snapper 0 0%
… Lane Snapper 0 0%
… Queen Snapper 0 0%
… Vermillion snapper 0 0%
… Vermillion Snapper 22 5%
… Wenchman snapper 0 0%
… Wenchman Snapper 5 1%
… yelloweye snapper 0 0%
… yelloweye Snapper 0 0%
… Yelloweye snapper 0 0%
… Yelloweye Snapper 274 67%
… YellowEye Snapper 0 0%
… Yellowtail Snapper 0 0%
Trap_no 406
… 0 0%
… 1 11 3%
… 10 10 2%
… 11 7 2%
… 12 9 2%
… 13 8 2%
… 14 6 1%
… 14/15 0 0%
… 15 8 2%
… 16 13 3%
… 17 38 9%
… 18 14 3%
… 19 18 4%
… 2 6 1%
… 20 8 2%
… 21 4 1%
… 22 11 3%
… 23 8 2%
… 24 24 6%
… 25 11 3%
… 26 7 2%
… 27 0 0%
… 28 0 0%
… 29 0 0%
… 3 19 5%
… 30 7 2%
… 31 17 4%
… 33 0 0%
… 34 9 2%
… 35 3 1%
… 36 11 3%
… 37 19 5%
… 38 5 1%
… 39 2 0%
… 4 26 6%
… 40 9 2%
… 41 4 1%
… 42 6 1%
… 43 5 1%
… 44 8 2%
… 45 5 1%
… 5 10 2%
… 51 0 0%
… 54 0 0%
… 6 4 1%
… 7 3 1%
… 8 4 1%
… 9 9 2%
landed 406
… Landed 406 100%
catch_contents 406
… Partial 0 0%
… Whole 406 100%
Length 406 28 5.5 12 25 30 70
study 406
… GRIDBOARD 0 0%
… ONBOARD 406 100%
Comments 406
… 406 100%
df_area_d4 <- df_area%>%
  filter(Fishing_area == "D4")
sumtable(df_area_d4)
Summary Statistics
Variable N Mean Std. Dev. Min Pctl. 25 Pctl. 75 Max
date 153
… 19/06/2024 153 100%
year 153 2024 0 2024 2024 2024 2024
month 153
… June 153 100%
Boat_name 153
… Bridgette 0 0%
… Highliner 0 0%
… Lady Carolina 0 0%
… Mr Fish 0 0%
… Navigator 0 0%
… Second Wind 153 100%
… Spirit of Saba 0 0%
Trip_ID 0
… No 0
… Yes 0
Fishing_gear 153
… LP 0 0%
… LP/MP 0 0%
… RP 153 100%
Fishing_area 153
… 0 0%
… A3 0 0%
… A3/A4 0 0%
… B2 0 0%
… B4 0 0%
… C4/C5 0 0%
… C5 0 0%
… C5/D5 0 0%
… D4 153 100%
… D5 0 0%
Depth_m_min 153 50 0 50 50 50 50
Depth_m_max 153 150 0 150 150 150 150
Species_sn 153
… Apsilus dentatus 0 0%
… Etelis oculatus 0 0%
… Lutjanus buccanella 64 42%
… Lutjanus jocu 0 0%
… Lutjanus synagris 0 0%
… Lutjanus vivanus 74 48%
… Ocyurus chrysurus 0 0%
… Pristipomoides aquilonaris 1 1%
… Rhomboplites aurorubens 14 9%
Species_cn 153
… Black snapper 0 0%
… Black Snapper 0 0%
… Blackfin snapper 64 42%
… Blackfin Snapper 0 0%
… Dog Snapper 0 0%
… Lane Snapper 0 0%
… Queen Snapper 0 0%
… Vermillion snapper 14 9%
… Vermillion Snapper 0 0%
… Wenchman snapper 1 1%
… Wenchman Snapper 0 0%
… yelloweye snapper 1 1%
… yelloweye Snapper 0 0%
… Yelloweye snapper 72 47%
… Yelloweye Snapper 1 1%
… YellowEye Snapper 0 0%
… Yellowtail Snapper 0 0%
Trap_no 153
… 0 0%
… 1 11 7%
… 10 5 3%
… 11 13 8%
… 12 2 1%
… 13 1 1%
… 14 9 6%
… 14/15 0 0%
… 15 7 5%
… 16 11 7%
… 17 13 8%
… 18 2 1%
… 19 0 0%
… 2 6 4%
… 20 14 9%
… 21 4 3%
… 22 3 2%
… 23 6 4%
… 24 14 9%
… 25 0 0%
… 26 0 0%
… 27 0 0%
… 28 0 0%
… 29 0 0%
… 3 11 7%
… 30 0 0%
… 31 0 0%
… 33 0 0%
… 34 0 0%
… 35 0 0%
… 36 0 0%
… 37 0 0%
… 38 0 0%
… 39 0 0%
… 4 5 3%
… 40 0 0%
… 41 0 0%
… 42 0 0%
… 43 0 0%
… 44 0 0%
… 45 0 0%
… 5 1 1%
… 51 0 0%
… 54 0 0%
… 6 6 4%
… 7 3 2%
… 8 3 2%
… 9 3 2%
landed 153
… Landed 153 100%
catch_contents 153
… Partial 0 0%
… Whole 153 100%
Length 153 29 5.1 20 25 32 55
study 153
… GRIDBOARD 0 0%
… ONBOARD 153 100%
Comments 153
… 153 100%
df_area_d5 <- df_area%>%
  filter(Fishing_area == "D5")
sumtable(df_area_d5)
Summary Statistics
Variable N Mean Std. Dev. Min Pctl. 25 Pctl. 75 Max
date 287
… 29/05/2024 287 100%
year 287 2024 0 2024 2024 2024 2024
month 287
… May 287 100%
Boat_name 287
… Bridgette 0 0%
… Highliner 0 0%
… Lady Carolina 0 0%
… Mr Fish 0 0%
… Navigator 0 0%
… Second Wind 287 100%
… Spirit of Saba 0 0%
Trip_ID 0
… No 0
… Yes 0
Fishing_gear 287
… LP 0 0%
… LP/MP 0 0%
… RP 287 100%
Fishing_area 287
… 0 0%
… A3 0 0%
… A3/A4 0 0%
… B2 0 0%
… B4 0 0%
… C4/C5 0 0%
… C5 0 0%
… C5/D5 0 0%
… D4 0 0%
… D5 287 100%
Depth_m_min 0 Inf -Inf
Depth_m_max 0 Inf -Inf
Species_sn 287
… Apsilus dentatus 0 0%
… Etelis oculatus 0 0%
… Lutjanus buccanella 110 38%
… Lutjanus jocu 0 0%
… Lutjanus synagris 0 0%
… Lutjanus vivanus 162 56%
… Ocyurus chrysurus 0 0%
… Pristipomoides aquilonaris 3 1%
… Rhomboplites aurorubens 12 4%
Species_cn 287
… Black snapper 0 0%
… Black Snapper 0 0%
… Blackfin snapper 0 0%
… Blackfin Snapper 110 38%
… Dog Snapper 0 0%
… Lane Snapper 0 0%
… Queen Snapper 0 0%
… Vermillion snapper 0 0%
… Vermillion Snapper 12 4%
… Wenchman snapper 0 0%
… Wenchman Snapper 3 1%
… yelloweye snapper 0 0%
… yelloweye Snapper 1 0%
… Yelloweye snapper 0 0%
… Yelloweye Snapper 161 56%
… YellowEye Snapper 0 0%
… Yellowtail Snapper 0 0%
Trap_no 287
… 0 0%
… 1 2 1%
… 10 44 15%
… 11 2 1%
… 12 18 6%
… 13 11 4%
… 14 17 6%
… 14/15 0 0%
… 15 14 5%
… 16 26 9%
… 17 10 3%
… 18 1 0%
… 19 5 2%
… 2 0 0%
… 20 4 1%
… 21 3 1%
… 22 2 1%
… 23 1 0%
… 24 2 1%
… 25 4 1%
… 26 3 1%
… 27 5 2%
… 28 0 0%
… 29 12 4%
… 3 3 1%
… 30 12 4%
… 31 7 2%
… 33 0 0%
… 34 10 3%
… 35 0 0%
… 36 1 0%
… 37 12 4%
… 38 9 3%
… 39 1 0%
… 4 11 4%
… 40 0 0%
… 41 0 0%
… 42 0 0%
… 43 0 0%
… 44 0 0%
… 45 0 0%
… 5 6 2%
… 51 0 0%
… 54 0 0%
… 6 3 1%
… 7 7 2%
… 8 10 3%
… 9 9 3%
landed 287
… Landed 287 100%
catch_contents 287
… Partial 0 0%
… Whole 287 100%
Length 287 28 4.4 19 25 30 47
study 287
… GRIDBOARD 0 0%
… ONBOARD 287 100%
Comments 287
… 287 100%

Summarize data

area_length_summary <- df_area %>%
  group_by(Fishing_area) %>%
  summarize(
    count = n(),
    mean = mean(Length, na.rm = TRUE),
    sd = sd(Length, na.rm = TRUE),
    median = median(Length, na.rm = TRUE),
    IQR = IQR(Length, na.rm = TRUE)
  )

area_length_summary
## # A tibble: 9 × 6
##   Fishing_area count  mean    sd median   IQR
##   <fct>        <int> <dbl> <dbl>  <dbl> <dbl>
## 1 A3             140  30.2  4.97   29    5   
## 2 A3/A4          431  29.5  4.99   28    6   
## 3 B2              28  27.3  3.54   27.5  5.25
## 4 B4              63  27.7  3.58   27    4.5 
## 5 C4/C5           11  23.4  2.29   23    3   
## 6 C5               2  38.5  9.19   38.5  6.5 
## 7 C5/D5          406  28.0  5.50   27    5   
## 8 D4             153  29.1  5.08   28    7   
## 9 D5             287  27.7  4.38   27    5

LS and YS area

ls_area <- df_area %>%
  filter(Species_sn == "Lutjanus synagris")
sumtable(ls_area)
Summary Statistics
Variable N Mean Std. Dev. Min Pctl. 25 Pctl. 75 Max
date 15
… 06/05/2024 1 7%
… 15/05/2024 6 40%
… 16/05/2024 8 53%
year 15 2024 0 2024 2024 2024 2024
month 15
… May 15 100%
Boat_name 15
… Bridgette 8 53%
… Highliner 0 0%
… Lady Carolina 6 40%
… Mr Fish 1 7%
… Navigator 0 0%
… Second Wind 0 0%
… Spirit of Saba 0 0%
Trip_ID 0
… No 0
… Yes 0
Fishing_gear 15
… LP 15 100%
… LP/MP 0 0%
… RP 0 0%
Fishing_area 15
… 0 0%
… A3 0 0%
… A3/A4 0 0%
… B2 0 0%
… B4 15 100%
… C4/C5 0 0%
… C5 0 0%
… C5/D5 0 0%
… D4 0 0%
… D5 0 0%
Depth_m_min 15 14 2 12 12 15 19
Depth_m_max 15 22 0.64 21 22 23 23
Species_sn 15
… Apsilus dentatus 0 0%
… Etelis oculatus 0 0%
… Lutjanus buccanella 0 0%
… Lutjanus jocu 0 0%
… Lutjanus synagris 15 100%
… Lutjanus vivanus 0 0%
… Ocyurus chrysurus 0 0%
… Pristipomoides aquilonaris 0 0%
… Rhomboplites aurorubens 0 0%
Species_cn 15
… Black snapper 0 0%
… Black Snapper 0 0%
… Blackfin snapper 0 0%
… Blackfin Snapper 0 0%
… Dog Snapper 0 0%
… Lane Snapper 15 100%
… Queen Snapper 0 0%
… Vermillion snapper 0 0%
… Vermillion Snapper 0 0%
… Wenchman snapper 0 0%
… Wenchman Snapper 0 0%
… yelloweye snapper 0 0%
… yelloweye Snapper 0 0%
… Yelloweye snapper 0 0%
… Yelloweye Snapper 0 0%
… YellowEye Snapper 0 0%
… Yellowtail Snapper 0 0%
Trap_no 15
… 15 100%
… 1 0 0%
… 10 0 0%
… 11 0 0%
… 12 0 0%
… 13 0 0%
… 14 0 0%
… 14/15 0 0%
… 15 0 0%
… 16 0 0%
… 17 0 0%
… 18 0 0%
… 19 0 0%
… 2 0 0%
… 20 0 0%
… 21 0 0%
… 22 0 0%
… 23 0 0%
… 24 0 0%
… 25 0 0%
… 26 0 0%
… 27 0 0%
… 28 0 0%
… 29 0 0%
… 3 0 0%
… 30 0 0%
… 31 0 0%
… 33 0 0%
… 34 0 0%
… 35 0 0%
… 36 0 0%
… 37 0 0%
… 38 0 0%
… 39 0 0%
… 4 0 0%
… 40 0 0%
… 41 0 0%
… 42 0 0%
… 43 0 0%
… 44 0 0%
… 45 0 0%
… 5 0 0%
… 51 0 0%
… 54 0 0%
… 6 0 0%
… 7 0 0%
… 8 0 0%
… 9 0 0%
landed 15
… Landed 15 100%
catch_contents 15
… Partial 15 100%
… Whole 0 0%
Length 15 29 3.2 25 26 32 33
study 15
… GRIDBOARD 15 100%
… ONBOARD 0 0%
Comments 15
… 15 100%
ys_area <- df_area %>%
  filter(Species_sn == "Lutjanus vivanus")
sumtable(ys_area)
Summary Statistics
Variable N Mean Std. Dev. Min Pctl. 25 Pctl. 75 Max
year 628 2024 0 2024 2024 2024 2024
month 628
… April 41 7%
… June 384 61%
… May 203 32%
Boat_name 628
… Bridgette 1 0%
… Highliner 36 6%
… Lady Carolina 2 0%
… Mr Fish 0 0%
… Navigator 0 0%
… Second Wind 589 94%
… Spirit of Saba 0 0%
Trip_ID 0
… No 0
… Yes 0
Fishing_gear 628
… LP 3 0%
… LP/MP 0 0%
… RP 625 100%
Fishing_area 628
… 0 0%
… A3 41 7%
… A3/A4 38 6%
… B2 0 0%
… B4 37 6%
… C4/C5 0 0%
… C5 2 0%
… C5/D5 274 44%
… D4 74 12%
… D5 162 26%
Depth_m_min 453 55 15 8 50 50 91
Depth_m_max 453 137 30 14 150 150 150
Species_sn 628
… Apsilus dentatus 0 0%
… Etelis oculatus 0 0%
… Lutjanus buccanella 0 0%
… Lutjanus jocu 0 0%
… Lutjanus synagris 0 0%
… Lutjanus vivanus 628 100%
… Ocyurus chrysurus 0 0%
… Pristipomoides aquilonaris 0 0%
… Rhomboplites aurorubens 0 0%
Species_cn 628
… Black snapper 0 0%
… Black Snapper 0 0%
… Blackfin snapper 0 0%
… Blackfin Snapper 0 0%
… Dog Snapper 0 0%
… Lane Snapper 0 0%
… Queen Snapper 0 0%
… Vermillion snapper 0 0%
… Vermillion Snapper 0 0%
… Wenchman snapper 0 0%
… Wenchman Snapper 0 0%
… yelloweye snapper 1 0%
… yelloweye Snapper 1 0%
… Yelloweye snapper 72 11%
… Yelloweye Snapper 552 88%
… YellowEye Snapper 2 0%
… Yellowtail Snapper 0 0%
Trap_no 628
… 93 15%
… 1 24 4%
… 10 49 8%
… 11 10 2%
… 12 15 2%
… 13 14 2%
… 14 29 5%
… 14/15 0 0%
… 15 22 4%
… 16 44 7%
… 17 45 7%
… 18 13 2%
… 19 15 2%
… 2 11 2%
… 20 14 2%
… 21 5 1%
… 22 3 0%
… 23 6 1%
… 24 10 2%
… 25 8 1%
… 26 4 1%
… 27 4 1%
… 28 0 0%
… 29 4 1%
… 3 30 5%
… 30 9 1%
… 31 17 3%
… 33 0 0%
… 34 8 1%
… 35 2 0%
… 36 3 0%
… 37 1 0%
… 38 0 0%
… 39 0 0%
… 4 39 6%
… 40 1 0%
… 41 3 0%
… 42 0 0%
… 43 0 0%
… 44 0 0%
… 45 0 0%
… 5 15 2%
… 51 0 0%
… 54 0 0%
… 6 9 1%
… 7 12 2%
… 8 12 2%
… 9 25 4%
landed 628
… Landed 628 100%
catch_contents 628
… Partial 93 15%
… Whole 535 85%
Length 628 29 5.5 12 25 31 70
study 628
… GRIDBOARD 93 15%
… ONBOARD 535 85%
Comments 628
… 627 100%
… All mixed fish measured, no lobsters measured 1 0%

Remove fishing areas with too few measurements for kruskal-wallis (<5)

# Count the number of Length measurements per Fishing_area
area_counts <- df_area %>%
  group_by(Fishing_area) %>%
  summarize(count = n()) %>%
  filter(count > 5)

# Filter the original data to include only Fishing_area values with more than five measurements
filtered_area_df <- df_area %>%
  filter(Fishing_area %in% area_counts$Fishing_area)

filtered_area_length_summary <- filtered_area_df %>%
  group_by(Fishing_area) %>%
  summarize(
    count = n(),
    mean = mean(Length, na.rm = TRUE),
    sd = sd(Length, na.rm = TRUE),
    median = median(Length, na.rm = TRUE),
    IQR = IQR(Length, na.rm = TRUE)
  )

filtered_area_length_summary
## # A tibble: 8 × 6
##   Fishing_area count  mean    sd median   IQR
##   <fct>        <int> <dbl> <dbl>  <dbl> <dbl>
## 1 A3             140  30.2  4.97   29    5   
## 2 A3/A4          431  29.5  4.99   28    6   
## 3 B2              28  27.3  3.54   27.5  5.25
## 4 B4              63  27.7  3.58   27    4.5 
## 5 C4/C5           11  23.4  2.29   23    3   
## 6 C5/D5          406  28.0  5.50   27    5   
## 7 D4             153  29.1  5.08   28    7   
## 8 D5             287  27.7  4.38   27    5

#Overall Area-length correlation ## Kruskal-wallis test length-area

KWtest_length_area <- kruskal.test(Length ~ Fishing_area, data = filtered_area_df)
KWtest_length_area
## 
##  Kruskal-Wallis rank sum test
## 
## data:  Length by Fishing_area
## Kruskal-Wallis chi-squared = 73.844, df = 7, p-value = 2.461e-13

pairwise Wilcoxon tests with Monte Carlo simulations

pairwilcox_length_area <- pairwise.wilcox.test(filtered_area_df$Length, 
                                               filtered_area_df$Fishing_area, 
                                               p.adjust.method = "bonferroni", 
                                               exact = FALSE, 
                                               simulate.p.value = TRUE, 
                                               B = 10000) # B is the number of simulations
pairwilcox_length_area
## 
##  Pairwise comparisons using Wilcoxon rank sum test with continuity correction 
## 
## data:  filtered_area_df$Length and filtered_area_df$Fishing_area 
## 
##       A3      A3/A4   B2      B4      C4/C5   C5/D5   D4     
## A3/A4 1.00000 -       -       -       -       -       -      
## B2    0.30652 1.00000 -       -       -       -       -      
## B4    0.02415 0.47487 1.00000 -       -       -       -      
## C4/C5 2.8e-05 0.00023 0.08079 0.00485 -       -       -      
## C5/D5 2.3e-06 1.3e-05 1.00000 1.00000 0.00818 -       -      
## D4    1.00000 1.00000 1.00000 1.00000 0.00083 0.14953 -      
## D5    2.2e-06 4.8e-05 1.00000 1.00000 0.00616 1.00000 0.12847
## 
## P value adjustment method: bonferroni

A3 - C4/C5 A3 - C5/D5 A3 - D5 A3/A4 - C4/C5 A3/A4 - C5/D5 A3/A4 - D5 B4 - C4/C5 C4/C5 - C5/D5 C4/C5 - D4/D5

# Extract p-values and generate significance letters
p_values <- pairwilcox_length_area$p.value

# Create the initial data frame
p_values <- data.frame(
  A3 = c(NA, 1.00000, 0.31322, 0.06237, 2.8e-05, 3.0e-06, 1.00000, 3.4e-06),
  A3_A4 = c(1.00000, NA, 1.00000, 0.92696, 0.00022, 1.4e-05, 1.00000, 6.2e-05),
  B2 = c(0.31322, 1.00000, NA, 1.00000, 0.06215, 1.00000, 1.00000, 1.00000),
  B4 = c(0.06237, 0.92696, 1.00000, NA, 0.00357, 1.00000, 1.00000, 1.00000),
  C4_C5 = c(2.8e-05, 0.00022, 0.06215, 0.00357, NA, 0.00802, 0.00073, 0.00583),
  C5_D5 = c(3.0e-06, 1.4e-05, 1.00000, 1.00000, 0.00802, NA, 0.07650, 1.00000),
  D4 = c(1.00000, 1.00000, 1.00000, 1.00000, 0.00073, 0.07650, NA, 0.07062),
  D5 = c(3.4e-06, 6.2e-05, 1.00000, 1.00000, 0.00583, 1.00000, 0.07062, NA)
)

# Set row names
rownames(p_values) <- c("A3", "A3_A4", "B2", "B4", "C4_C5", "C5_D5", "D4", "D5")

# Convert to matrix
matrix_p_values <- as.matrix(p_values)

# Fill the lower triangle to make it symmetric
matrix_p_values[lower.tri(matrix_p_values)] <- t(matrix_p_values)[lower.tri(matrix_p_values)]

# Print the symmetric matrix
print(matrix_p_values)
##              A3    A3_A4      B2      B4    C4_C5    C5_D5      D4        D5
## A3           NA 1.000000 0.31322 0.06237 0.000028 0.000003 1.00000 0.0000034
## A3_A4 1.0000000       NA 1.00000 0.92696 0.000220 0.000014 1.00000 0.0000620
## B2    0.3132200 1.000000      NA 1.00000 0.062150 1.000000 1.00000 1.0000000
## B4    0.0623700 0.926960 1.00000      NA 0.003570 1.000000 1.00000 1.0000000
## C4_C5 0.0000280 0.000220 0.06215 0.00357       NA 0.008020 0.00073 0.0058300
## C5_D5 0.0000030 0.000014 1.00000 1.00000 0.008020       NA 0.07650 1.0000000
## D4    1.0000000 1.000000 1.00000 1.00000 0.000730 0.076500      NA 0.0706200
## D5    0.0000034 0.000062 1.00000 1.00000 0.005830 1.000000 0.07062        NA
# Generate significance letters
signif_letters <- multcompLetters(matrix_p_values, threshold = 0.05)$Letters
print(signif_letters)
##    A3 A3_A4    B2    B4 C4_C5 C5_D5    D4    D5 
##   "a"   "a" "abc"  "ab"   "c"   "b"  "ab"   "b"
Fishing_area_only <- c("A3", "A3/A4", "B2", "B4", "C4/C5", "C5/D5", "D4", "D5")
signif_letters_only <- c("a", "a", "abc",  "ab", "c", "b","ab", "b")

# Create a data frame with the significance letters
signif_df <- data.frame(x = Fishing_area_only, y = signif_letters)
signif_df
##           x   y
## A3       A3   a
## A3_A4 A3/A4   a
## B2       B2 abc
## B4       B4  ab
## C4_C5 C4/C5   c
## C5_D5 C5/D5   b
## D4       D4  ab
## D5       D5   b
# Make x labels
fishing_area_x_labels <- c("A3 (n=140)", "A3/A4 (n=432)", "B2 (n=29)", "B4 (n=66)", "C4/C5 (n=11)", "C5/D5 (n=407)", "D4 (n=156)"," D5 (n=289)")

# Make a plot
plot_area_lengths <- ggplot(filtered_area_df, 
                            aes(x = Fishing_area,
                                y = Length)) +
  geom_boxplot(aes(fill = Fishing_area, color = Fishing_area)) +
  theme_classic() +
  coord_flip() +
  scale_fill_viridis_d(option = "C", 
                        guide = "none", 
                        begin = 0.10, 
                        end = 0.90,
                       alpha = 0.5,
                       direction = -1) +
  scale_color_viridis_d(option = "C", 
                        guide = "none", 
                        begin = 0.10, 
                        end = 0.90,
                        direction = -1) +
  geom_text(data = signif_df, aes(x = x, y = max(filtered_area_df$Length) + 5, label = signif_letters_only), 
            vjust = 0) +
  labs(x = "Saba Bank Quadrant", 
       y = "Fork length in cm", 
       title = str_wrap(c("Snapper lengths in different Saba Bank quadrants"), width = 50)) +
  ylim(0,75) +
  scale_x_discrete(limits = rev, labels = rev(fishing_area_x_labels))

plot_area_lengths

Save plot

ggsave("area_lengths_KW.png", plot = plot_area_lengths, width = 7.2, height = 4, dpi = 400)

#LP Area-length correlation

Filter by gear

#filter by area
df_area_lp <- df_area%>%
  filter(Fishing_gear == "LP")
summary(df_area_lp)
##      date                year         month                    Boat_name 
##  Length:54          Min.   :2024   Length:54          Bridgette     :11  
##  Class :character   1st Qu.:2024   Class :character   Highliner     : 0  
##  Mode  :character   Median :2024   Mode  :character   Lady Carolina :14  
##                     Mean   :2024                      Mr Fish       : 1  
##                     3rd Qu.:2024                      Navigator     :28  
##                     Max.   :2024                      Second Wind   : 0  
##                                                       Spirit of Saba: 0  
##  Trip_ID        Fishing_gear  Fishing_area  Depth_m_min     Depth_m_max   
##  Mode:logical   LP   :54     B2     :28    Min.   : 8.00   Min.   :14.00  
##  NA's:54        LP/MP: 0     B4     :24    1st Qu.:12.00   1st Qu.:20.00  
##                 RP   : 0     C5     : 2    Median :20.00   Median :20.00  
##                                     : 0    Mean   :16.59   Mean   :20.52  
##                              A3     : 0    3rd Qu.:20.00   3rd Qu.:22.00  
##                              A3/A4  : 0    Max.   :20.00   Max.   :23.00  
##                              (Other): 0                                   
##                    Species_sn              Species_cn    Trap_no      landed  
##  Lutjanus buccanella    :24   Blackfin Snapper  :24          :54   Landed:54  
##  Lutjanus synagris      :15   Lane Snapper      :15   1      : 0              
##  Rhomboplites aurorubens:12   Vermillion Snapper:12   10     : 0              
##  Lutjanus vivanus       : 3   Yelloweye Snapper : 3   11     : 0              
##  Apsilus dentatus       : 0   Black snapper     : 0   12     : 0              
##  Etelis oculatus        : 0   Black Snapper     : 0   13     : 0              
##  (Other)                : 0   (Other)           : 0   (Other): 0              
##  catch_contents     Length            study      Comments        
##  Partial:54     Min.   :21.00   GRIDBOARD:54   Length:54         
##  Whole  : 0     1st Qu.:25.25   ONBOARD  : 0   Class :character  
##                 Median :28.00                  Mode  :character  
##                 Mean   :28.26                                    
##                 3rd Qu.:30.75                                    
##                 Max.   :45.00                                    
## 

Kruskal-wallis test length-area

KWtest_length_area_lp <- kruskal.test(Length ~ Fishing_area, data = df_area_lp)
KWtest_length_area_lp
## 
##  Kruskal-Wallis rank sum test
## 
## data:  Length by Fishing_area
## Kruskal-Wallis chi-squared = 4.9772, df = 2, p-value = 0.08302

pairwise Wilcoxon tests with Monte Carlo simulations

pairwilcox_length_area_lp <- pairwise.wilcox.test(df_area_lp$Length, 
                                               df_area_lp$Fishing_area, 
                                               p.adjust.method = "bonferroni", 
                                               exact = FALSE, 
                                               simulate.p.value = TRUE, 
                                               B = 10000) # B is the number of simulations
pairwilcox_length_area_lp
## 
##  Pairwise comparisons using Wilcoxon rank sum test with continuity correction 
## 
## data:  df_area_lp$Length and df_area_lp$Fishing_area 
## 
##    B2   B4  
## B4 1.00 -   
## C5 0.11 0.24
## 
## P value adjustment method: bonferroni

A3 - C4/C5 A3 - C5/D5 A3 - D5 A3/A4 - C4/C5 A3/A4 - C5/D5 A3/A4 - D5 B4 - C4/C5 C4/C5 - C5/D5 C4/C5 - D4/D5

# Extract p-values and generate significance letters
p_values <- pairwilcox_length_area$p.value

# Create the initial data frame
p_values <- data.frame(
  A3 = c(NA, 1.00000, 0.31322, 0.06237, 2.8e-05, 3.0e-06, 1.00000, 3.4e-06),
  A3_A4 = c(1.00000, NA, 1.00000, 0.92696, 0.00022, 1.4e-05, 1.00000, 6.2e-05),
  B2 = c(0.31322, 1.00000, NA, 1.00000, 0.06215, 1.00000, 1.00000, 1.00000),
  B4 = c(0.06237, 0.92696, 1.00000, NA, 0.00357, 1.00000, 1.00000, 1.00000),
  C4_C5 = c(2.8e-05, 0.00022, 0.06215, 0.00357, NA, 0.00802, 0.00073, 0.00583),
  C5_D5 = c(3.0e-06, 1.4e-05, 1.00000, 1.00000, 0.00802, NA, 0.07650, 1.00000),
  D4 = c(1.00000, 1.00000, 1.00000, 1.00000, 0.00073, 0.07650, NA, 0.07062),
  D5 = c(3.4e-06, 6.2e-05, 1.00000, 1.00000, 0.00583, 1.00000, 0.07062, NA)
)

# Set row names
rownames(p_values) <- c("A3", "A3_A4", "B2", "B4", "C4_C5", "C5_D5", "D4", "D5")

# Convert to matrix
matrix_p_values <- as.matrix(p_values)

# Fill the lower triangle to make it symmetric
matrix_p_values[lower.tri(matrix_p_values)] <- t(matrix_p_values)[lower.tri(matrix_p_values)]

# Print the symmetric matrix
print(matrix_p_values)
##              A3    A3_A4      B2      B4    C4_C5    C5_D5      D4        D5
## A3           NA 1.000000 0.31322 0.06237 0.000028 0.000003 1.00000 0.0000034
## A3_A4 1.0000000       NA 1.00000 0.92696 0.000220 0.000014 1.00000 0.0000620
## B2    0.3132200 1.000000      NA 1.00000 0.062150 1.000000 1.00000 1.0000000
## B4    0.0623700 0.926960 1.00000      NA 0.003570 1.000000 1.00000 1.0000000
## C4_C5 0.0000280 0.000220 0.06215 0.00357       NA 0.008020 0.00073 0.0058300
## C5_D5 0.0000030 0.000014 1.00000 1.00000 0.008020       NA 0.07650 1.0000000
## D4    1.0000000 1.000000 1.00000 1.00000 0.000730 0.076500      NA 0.0706200
## D5    0.0000034 0.000062 1.00000 1.00000 0.005830 1.000000 0.07062        NA
# Generate significance letters
signif_letters <- multcompLetters(matrix_p_values, threshold = 0.05)$Letters
print(signif_letters)
##    A3 A3_A4    B2    B4 C4_C5 C5_D5    D4    D5 
##   "a"   "a" "abc"  "ab"   "c"   "b"  "ab"   "b"
Fishing_area_only <- c("A3", "A3/A4", "B2", "B4", "C4/C5", "C5/D5", "D4", "D5")
signif_letters_only <- c("a", "a", "abc",  "ab", "c", "b","ab", "b")

# Create a data frame with the significance letters
signif_df <- data.frame(x = Fishing_area_only, y = signif_letters)
signif_df
##           x   y
## A3       A3   a
## A3_A4 A3/A4   a
## B2       B2 abc
## B4       B4  ab
## C4_C5 C4/C5   c
## C5_D5 C5/D5   b
## D4       D4  ab
## D5       D5   b
# Make x labels
fishing_area_x_labels <- c("A3 (n=140)", "A3/A4 (n=432)", "B2 (n=29)", "B4 (n=66)", "C4/C5 (n=11)", "C5/D5 (n=407)", "D4 (n=156)"," D5 (n=289)")

# Make a plot
plot_area_lengths <- ggplot(filtered_area_df, 
                            aes(x = Fishing_area,
                                y = Length)) +
  geom_boxplot(aes(fill = Fishing_area, color = Fishing_area)) +
  theme_classic() +
  coord_flip() +
  scale_fill_viridis_d(option = "C", 
                        guide = "none", 
                        begin = 0.10, 
                        end = 0.90,
                       alpha = 0.5,
                       direction = -1) +
  scale_color_viridis_d(option = "C", 
                        guide = "none", 
                        begin = 0.10, 
                        end = 0.90,
                        direction = -1) +
  geom_text(data = signif_df, aes(x = x, y = max(filtered_area_df$Length) + 5, label = signif_letters_only), 
            vjust = 0) +
  labs(x = "Saba Bank Quadrant", 
       y = "Fork length in cm", 
       title = str_wrap(c("Snapper lengths in different Saba Bank quadrants"), width = 50)) +
  ylim(0,75) +
  scale_x_discrete(limits = rev, labels = rev(fishing_area_x_labels))

plot_area_lengths

### Save plot

ggsave("area_lengths_KW.png", plot = plot_area_lengths, width = 7.2, height = 4, dpi = 400)

Length-min_m_depth correlation

Kruskal-wallis test length-gear

KWtest_length_mindepth <- kruskal.test(Length ~ Depth_m_min, data = df_allsnappers)
KWtest_length_mindepth 
## 
##  Kruskal-Wallis rank sum test
## 
## data:  Length by Depth_m_min
## Kruskal-Wallis chi-squared = 56.629, df = 11, p-value = 3.895e-08

pairwise Wilcoxon tests with Monte Carlo simulations

pairwilcox_length_mindepth  <- pairwise.wilcox.test(df_allsnappers$Length, 
                                               df_allsnappers$Depth_m_min, 
                                               p.adjust.method = "bonferroni", 
                                               exact = FALSE, 
                                               simulate.p.value = TRUE, 
                                               B = 10000) # B is the number of simulations
pairwilcox_length_mindepth
## 
##  Pairwise comparisons using Wilcoxon rank sum test with continuity correction 
## 
## data:  df_allsnappers$Length and df_allsnappers$Depth_m_min 
## 
##    8       11      12      14      15      19      20      21      40     
## 11 1.00000 -       -       -       -       -       -       -       -      
## 12 1.00000 1.00000 -       -       -       -       -       -       -      
## 14 1.00000 1.00000 1.00000 -       -       -       -       -       -      
## 15 1.00000 1.00000 1.00000 1.00000 -       -       -       -       -      
## 19 1.00000 1.00000 1.00000 1.00000 1.00000 -       -       -       -      
## 20 1.00000 1.00000 1.00000 1.00000 1.00000 1.00000 -       -       -      
## 21 1.00000 1.00000 1.00000 1.00000 0.03594 1.00000 1.00000 -       -      
## 40 1.00000 1.00000 1.00000 1.00000 0.79096 1.00000 1.00000 0.78641 -      
## 50 1.00000 1.00000 1.00000 1.00000 1.00000 1.00000 1.00000 0.00230 1.00000
## 82 1.00000 1.00000 1.00000 1.00000 0.00546 1.00000 0.73831 1.00000 0.06534
## 91 1.00000 1.00000 1.00000 1.00000 1.00000 1.00000 1.00000 0.25114 1.00000
##    50      82     
## 11 -       -      
## 12 -       -      
## 14 -       -      
## 15 -       -      
## 19 -       -      
## 20 -       -      
## 21 -       -      
## 40 -       -      
## 50 -       -      
## 82 0.00024 -      
## 91 1.00000 0.03446
## 
## P value adjustment method: bonferroni
# Extract p-values and generate significance letters
p_values_lengthgear <- pairwilcox_length_mindepth$p.value
p_values_lengthgear
##    8 11 12 14          15 19        20          21        40           50
## 11 1 NA NA NA          NA NA        NA          NA        NA           NA
## 12 1  1 NA NA          NA NA        NA          NA        NA           NA
## 14 1  1  1 NA          NA NA        NA          NA        NA           NA
## 15 1  1  1  1          NA NA        NA          NA        NA           NA
## 19 1  1  1  1 1.000000000 NA        NA          NA        NA           NA
## 20 1  1  1  1 1.000000000  1        NA          NA        NA           NA
## 21 1  1  1  1 0.035943817  1 1.0000000          NA        NA           NA
## 40 1  1  1  1 0.790963850  1 1.0000000 0.786408598        NA           NA
## 50 1  1  1  1 1.000000000  1 1.0000000 0.002304588 1.0000000           NA
## 82 1  1  1  1 0.005458853  1 0.7383129 1.000000000 0.0653351 0.0002373001
## 91 1  1  1  1 1.000000000  1 1.0000000 0.251138698 1.0000000 1.0000000000
##            82
## 11         NA
## 12         NA
## 14         NA
## 15         NA
## 19         NA
## 20         NA
## 21         NA
## 40         NA
## 50         NA
## 82         NA
## 91 0.03445688
# Create the initial data frame
p_values_lengthgear <- data.frame(
  LP = c(NA, 0.0001805328, 1.0000000000),
  LPMP = c(0.0001805328, NA, 1.0000000000),
  RP = c(1.0000000000, 0.0001292177, NA))

# Set row names
rownames(p_values_lengthgear) <- c("LP", "LPMP", "RP")

# Convert to matrix
matrix_p_values_lengthgear <- as.matrix(p_values_lengthgear)

# Fill the lower triangle to make it symmetric
matrix_p_values_lengthgear[lower.tri(matrix_p_values_lengthgear)] <- t(matrix_p_values_lengthgear)[lower.tri(matrix_p_values_lengthgear)]

# Print the symmetric matrix
print(matrix_p_values_lengthgear)
##                LP         LPMP           RP
## LP             NA 0.0001805328 1.0000000000
## LPMP 0.0001805328           NA 0.0001292177
## RP   1.0000000000 0.0001292177           NA
# Generate significance letters
signif_letters_lengthgear <- multcompLetters(matrix_p_values_lengthgear, threshold = 0.05)$Letters
print(signif_letters_lengthgear)
##   LP LPMP   RP 
##  "a"  "b"  "a"
Fishing_gear_only <- c("LP", "LP/MP", "RP")
signif_letters_only_lengthgear <- c("a", "b", "a")

# Create a data frame with the significance letters
signif_df_lengthgear <- data.frame(x = Fishing_gear_only, y = signif_letters_only_lengthgear)
signif_df_lengthgear
##       x y
## 1    LP a
## 2 LP/MP b
## 3    RP a
# Make x labels
fishing_gear_x_labels <- str_wrap(c("Lobster (n=63)", "Lobster and mixed fish (n=11)", "Redfish (n=1603)"), width = 16)

# Make a plot
plot_length_gear <- ggplot(df_allsnappers, 
                            aes(x = Fishing_gear,
                                y = Length)) +
  geom_boxplot(aes(fill = Fishing_gear, color = Fishing_gear)) +
  theme_classic() +
  coord_flip() +
  scale_fill_viridis_d(option = "C", 
                        guide = "none", 
                        begin = 0.10, 
                        end = 0.90,
                       alpha = 0.5,
                       direction = -1) +
  scale_color_viridis_d(option = "C", 
                        guide = "none", 
                        begin = 0.10, 
                        end = 0.90,
                        direction = -1) +
  geom_text(data = signif_df_lengthgear, aes(x = x, y = max(df_allsnappers$Length) + 5, label = signif_letters_lengthgear), 
            vjust = 0) +
  labs(x = "Fishing gear", 
       y = "Fork length in cm", 
       title = str_wrap(c("Snapper lengths from different fishing methods"), width = 30)) +
  ylim(0,75) +
  scale_x_discrete(limits = rev, labels = rev(fishing_gear_x_labels))

plot_length_gear

Save plot

ggsave("length_gear_KW.png", plot = plot_length_gear, width = 4, height = 4, dpi = 400)

Length-min_m_depth correlation

recode Depth_m_min into factorial data

# Recode Depth_m_min into a factor variable with specified ranges
df_allsnappers$Depth_m_min_factor <- cut(df_allsnappers$Depth_m_min,
                                       breaks = c(-Inf, 19, 39, 59, 79, Inf),
                                       labels = c("<20", "20-39", "40-59", "60-79", ">80"),
                                       right = TRUE)

# Check the result
summary(df_allsnappers)
##      date                year         month                    Boat_name   
##  Length:1677        Min.   :2024   Length:1677        Bridgette     :  13  
##  Class :character   1st Qu.:2024   Class :character   Highliner     :  50  
##  Mode  :character   Median :2024   Mode  :character   Lady Carolina :  17  
##                     Mean   :2024                      Mr Fish       :   1  
##                     3rd Qu.:2024                      Navigator     :  29  
##                     Max.   :2024                      Second Wind   :1425  
##                                                       Spirit of Saba: 142  
##  Trip_ID        Fishing_gear  Fishing_area  Depth_m_min     Depth_m_max   
##  Mode:logical   LP   :  63   A3/A4  :432   Min.   : 8.00   Min.   : 12.0  
##  NA's:1677      LP/MP:  11   C5/D5  :407   1st Qu.:40.00   1st Qu.: 60.0  
##                 RP   :1603   D5     :289   Median :50.00   Median :150.0  
##                              D4     :156   Mean   :47.39   Mean   :107.3  
##                                     :143   3rd Qu.:50.00   3rd Qu.:150.0  
##                              A3     :140   Max.   :91.00   Max.   :150.0  
##                              (Other):110   NA's   :566     NA's   :566    
##                       Species_sn               Species_cn     Trap_no   
##  Lutjanus buccanella       :802   Blackfin Snapper  :738          :349  
##  Lutjanus vivanus          :712   Yelloweye Snapper :636   10     :109  
##  Rhomboplites aurorubens   :108   Vermillion Snapper: 94   14     : 73  
##  Lutjanus synagris         : 26   Yelloweye snapper : 72   17     : 65  
##  Pristipomoides aquilonaris:  9   Blackfin snapper  : 64   12     : 61  
##  Etelis oculatus           :  6   Lane Snapper      : 26   4      : 61  
##  (Other)                   : 14   (Other)           : 47   (Other):959  
##     landed     catch_contents     Length            study     
##  Landed:1677   Partial: 349   Min.   :12.00   GRIDBOARD: 349  
##                Whole  :1328   1st Qu.:25.00   ONBOARD  :1328  
##                               Median :28.00                   
##                               Mean   :28.68                   
##                               3rd Qu.:31.00                   
##                               Max.   :70.00                   
##                                                               
##    Comments         Depth_m_min_factor
##  Length:1677        <20  : 42         
##  Class :character   20-39:218         
##  Mode  :character   40-59:672         
##                     60-79:  0         
##                     >80  :179         
##                     NA's :566         
## 

Kruskal-wallis test length-gear

KWtest_length_mindepth <- kruskal.test(Length ~ Depth_m_min_factor, data = df_allsnappers)
KWtest_length_mindepth
## 
##  Kruskal-Wallis rank sum test
## 
## data:  Length by Depth_m_min_factor
## Kruskal-Wallis chi-squared = 21.901, df = 3, p-value = 6.839e-05

pairwise Wilcoxon tests with Monte Carlo simulations

pairwilcox_length_mindepth <- pairwise.wilcox.test(df_allsnappers$Length, 
                                               df_allsnappers$Depth_m_min_factor, 
                                               p.adjust.method = "bonferroni", 
                                               exact = FALSE, 
                                               simulate.p.value = TRUE, 
                                               B = 10000) # B is the number of simulations
pairwilcox_length_mindepth
## 
##  Pairwise comparisons using Wilcoxon rank sum test with continuity correction 
## 
## data:  df_allsnappers$Length and df_allsnappers$Depth_m_min_factor 
## 
##       <20    20-39  40-59 
## 20-39 0.4358 -      -     
## 40-59 1.0000 0.0018 -     
## >80   0.4677 1.0000 0.0018
## 
## P value adjustment method: bonferroni
# Extract p-values and generate significance letters
p_values_lengthmindepth <- pairwilcox_length_mindepth$p.value
p_values_lengthmindepth
##             <20       20-39       40-59
## 20-39 0.4358439          NA          NA
## 40-59 1.0000000 0.001785524          NA
## >80   0.4676624 1.000000000 0.001773863
# Create the initial data frame
p_values_lengthmindepth <- data.frame(
  t20 = c(NA, 0.4358439, 1.0000000, 0.4676624),
  f20t39 = c(0.4358439, NA, 0.001785524, 1.000000000),
  f40t59 = c(1.0000000, 0.001785524, NA, 0.001773863),
  f80 = c(0.4676624, 1.000000000, 0.001773863, NA))

# Set row names
rownames(p_values_lengthmindepth) <- c("<20", "20-39", "40-59", ">80")

# Convert to matrix
matrix_p_values_lengthmindepth <- as.matrix(p_values_lengthmindepth)

# Fill the lower triangle to make it symmetric
matrix_p_values_lengthmindepth[lower.tri(matrix_p_values_lengthmindepth)] <- t(matrix_p_values_lengthmindepth)[lower.tri(matrix_p_values_lengthmindepth)]

# Print the symmetric matrix
print(matrix_p_values_lengthmindepth)
##             t20      f20t39      f40t59         f80
## <20          NA 0.435843900 1.000000000 0.467662400
## 20-39 0.4358439          NA 0.001785524 1.000000000
## 40-59 1.0000000 0.001785524          NA 0.001773863
## >80   0.4676624 1.000000000 0.001773863          NA
# Generate significance letters
signif_letters_lengthmindepth <- multcompLetters(matrix_p_values_lengthmindepth, threshold = 0.05)$Letters
print(signif_letters_lengthmindepth)
##   <20 20-39 40-59   >80 
##  "ab"   "a"   "b"   "a"
Fishing_mindepth_only <- c("<20", "20-39", "40-59", ">80")
signif_letters_only_lengthmindepth <- c("ab", "a", "b", "a")

# Create a data frame with the significance letters
signif_df_lengthmindepth <- data.frame(x = Fishing_mindepth_only, y = signif_letters_only_lengthmindepth)
signif_df_lengthmindepth
##       x  y
## 1   <20 ab
## 2 20-39  a
## 3 40-59  b
## 4   >80  a
# Make x labels
mindepth_x_labels <- str_wrap(c("<20 (n=42)", "20-39 (n=218)", "40-59 (n=672)", ">80 (n=179)"), width = 16)

# remove NA values
df_mindepth <- df_allsnappers %>% drop_na(Depth_m_min_factor)

# Make a plot
plot_length_mindepth <- ggplot(df_mindepth, 
                            aes(x = Depth_m_min_factor,
                                y = Length)) +
  geom_boxplot(aes(fill = Depth_m_min_factor, color = Depth_m_min_factor)) +
  theme_classic() +
  coord_flip() +
  scale_fill_viridis_d(option = "C", 
                        guide = "none", 
                        begin = 0.10, 
                        end = 0.90,
                       alpha = 0.5,
                       direction = -1) +
  scale_color_viridis_d(option = "C", 
                        guide = "none", 
                        begin = 0.10, 
                        end = 0.90,
                        direction = -1) +
  geom_text(data = signif_df_lengthmindepth, aes(x = x, y = max(df_allsnappers$Length) + 5, label = signif_letters_lengthmindepth), 
            vjust = 0) +
  labs(x = "Minimum depth in m", 
       y = "Fork length in cm", 
       title = str_wrap(c("Snapper lengths at different minimum fishing depths"), width = 30)) +
  ylim(0,75) +
  scale_x_discrete(limits = rev, labels = rev(mindepth_x_labels))

plot_length_mindepth

Save plot

ggsave("length_mindepth_KW.png", plot = plot_length_mindepth, width = 4, height = 4, dpi = 400)

Length-Depth_m_max correlation

recode Depth_m_max into factorial data

# Recode Depth_m_max into a factor variable with specified ranges
df_allsnappers$Depth_m_max_factor <- cut(df_allsnappers$Depth_m_max,
                                       breaks = c(-Inf, 19, 39, 59, 79, 99, 119, 139, Inf),
                                       labels = c("<20", "20-39", "40-59", "60-79", "80-99", "100-119", "120-139", ">140"),
                                       right = TRUE)

# Check the result
summary(df_allsnappers$Depth_m_max_factor)
##     <20   20-39   40-59   60-79   80-99 100-119 120-139    >140    NA's 
##       5     255       0     110      39       0     140     562     566

Kruskal-wallis test length-gear

KWtest_length_maxdepth <- kruskal.test(Length ~ Depth_m_max_factor, data = df_allsnappers)
KWtest_length_maxdepth
## 
##  Kruskal-Wallis rank sum test
## 
## data:  Length by Depth_m_max_factor
## Kruskal-Wallis chi-squared = 35.106, df = 5, p-value = 1.433e-06

pairwise Wilcoxon tests with Monte Carlo simulations

pairwilcox_length_maxdepth <- pairwise.wilcox.test(df_allsnappers$Length, 
                                               df_allsnappers$Depth_m_max_factor, 
                                               p.adjust.method = "bonferroni", 
                                               exact = FALSE, 
                                               simulate.p.value = TRUE, 
                                               B = 10000) # B is the number of simulations
pairwilcox_length_maxdepth
## 
##  Pairwise comparisons using Wilcoxon rank sum test with continuity correction 
## 
## data:  df_allsnappers$Length and df_allsnappers$Depth_m_max_factor 
## 
##         <20    20-39  60-79  80-99  120-139
## 20-39   0.4654 -      -      -      -      
## 60-79   0.0521 1.0000 -      -      -      
## 80-99   0.0714 0.4220 1.0000 -      -      
## 120-139 0.4440 0.8553 0.0148 0.0078 -      
## >140    0.0969 0.0527 1.0000 1.0000 5.4e-05
## 
## P value adjustment method: bonferroni
# Extract p-values and generate significance letters
p_values_lengthmaxdepth <- pairwilcox_length_maxdepth$p.value
p_values_lengthmaxdepth
##                <20      20-39      60-79       80-99      120-139
## 20-39   0.46543322         NA         NA          NA           NA
## 60-79   0.05214866 1.00000000         NA          NA           NA
## 80-99   0.07144477 0.42198508 1.00000000          NA           NA
## 120-139 0.44402894 0.85531674 0.01484889 0.007831109           NA
## >140    0.09691018 0.05266864 1.00000000 1.000000000 5.393184e-05
# Create the initial data frame
p_values_lengthmaxdepth <- data.frame(
  t20 = c(NA, 0.46543322, 0.05214866, 0.07144477, 0.44402894, 0.09691018),
  f20t39 = c(0.46543322, NA, 1.00000000, 0.42198508, 0.85531674, 0.05266864),
  f60t79 = c(0.05214866, 1.00000000, NA, 1.00000000, 0.01484889, 1.00000000),
  f80t99 = c(0.07144477, 0.42198508, 1.00000000, NA, 0.007831109, 1.000000000),
  f120t139 = c(0.44402894, 0.85531674, 0.01484889, 0.007831109, NA, 5.393184e-05),
  f140 = c(0.09691018, 0.05266864, 1.00000000, 1.000000000, 5.393184e-05, NA))

# Set row names
rownames(p_values_lengthmaxdepth) <- c("<20", "20-39", "60-79", "80-99", "120-139", ">140")

# Convert to matrix
matrix_p_values_lengthmaxdepth <- as.matrix(p_values_lengthmaxdepth)

# Fill the lower triangle to make it symmetric
matrix_p_values_lengthmaxdepth[lower.tri(matrix_p_values_lengthmaxdepth)] <- t(matrix_p_values_lengthmaxdepth)[lower.tri(matrix_p_values_lengthmaxdepth)]

# Print the symmetric matrix
print(matrix_p_values_lengthmaxdepth)
##                t20     f20t39     f60t79      f80t99     f120t139         f140
## <20             NA 0.46543322 0.05214866 0.071444770 4.440289e-01 9.691018e-02
## 20-39   0.46543322         NA 1.00000000 0.421985080 8.553167e-01 5.266864e-02
## 60-79   0.05214866 1.00000000         NA 1.000000000 1.484889e-02 1.000000e+00
## 80-99   0.07144477 0.42198508 1.00000000          NA 7.831109e-03 1.000000e+00
## 120-139 0.44402894 0.85531674 0.01484889 0.007831109           NA 5.393184e-05
## >140    0.09691018 0.05266864 1.00000000 1.000000000 5.393184e-05           NA
# Generate significance letters
signif_letters_lengthmaxdepth <- multcompLetters(matrix_p_values_lengthmaxdepth, threshold = 0.05)$Letters
print(signif_letters_lengthmaxdepth)
##     <20   20-39   60-79   80-99 120-139    >140 
##    "ab"    "ab"     "a"     "a"     "b"     "a"
Fishing_maxdepth_only <- c("<20", "20-39", "60-79", "80-99", "120-139", ">140")
signif_letters_only_lengthmaxdepth <- c("ab", "ab", "a", "a", "b", "a")

# Create a data frame with the significance letters
signif_df_lengthmaxdepth <- data.frame(x = Fishing_maxdepth_only, y = signif_letters_only_lengthmaxdepth)
signif_df_lengthmaxdepth
##         x  y
## 1     <20 ab
## 2   20-39 ab
## 3   60-79  a
## 4   80-99  a
## 5 120-139  b
## 6    >140  a
# Make x labels
max_depth_x_labels <- str_wrap(c("<20 (n=5)", "20-39 (n=255)", "60-79 (n=110)", "80-99 (n=39)", "120-139 (n=140)", ">140 (n=562)"), width = 16)

# remove NA values
df_maxdepth <- df_allsnappers %>% drop_na(Depth_m_max_factor)

Make a plot

plot_length_maxdepth <- ggplot(df_maxdepth, 
                            aes(x = Depth_m_max_factor,
                                y = Length)) +
  geom_boxplot(aes(fill = Depth_m_max_factor, color = Depth_m_max_factor)) +
  theme_classic() +
  coord_flip() +
  scale_fill_viridis_d(option = "C", 
                        guide = "none", 
                        begin = 0.10, 
                        end = 0.90,
                       alpha = 0.5,
                       direction = -1) +
  scale_color_viridis_d(option = "C", 
                        guide = "none", 
                        begin = 0.10, 
                        end = 0.90,
                        direction = -1) +
  geom_text(data = signif_df_lengthmaxdepth, aes(x = x, y = max(df_allsnappers$Length) + 5, label = signif_letters_lengthmaxdepth), 
            vjust = 0) +
  labs(x = "Maximum depth in m", 
       y = "Fork length in cm", 
       title = str_wrap(c("Snapper lengths at different maximum fishing depths"), width = 30)) +
  ylim(0,75) +
  scale_x_discrete(limits = rev, labels = rev(max_depth_x_labels))

plot_length_maxdepth

Save plot

ggsave("length_maxdepth_KW.png", plot = plot_length_maxdepth, width = 4, height = 4, dpi = 400)

E. oculatus

subset the data

qsdf_onboard <- filter(df_allsnappers, Species_sn == "Etelis oculatus")
View(qsdf_onboard)

summary(qsdf_onboard)
##      date                year         month                    Boat_name
##  Length:6           Min.   :2024   Length:6           Bridgette     :0  
##  Class :character   1st Qu.:2024   Class :character   Highliner     :0  
##  Mode  :character   Median :2024   Mode  :character   Lady Carolina :0  
##                     Mean   :2024                      Mr Fish       :0  
##                     3rd Qu.:2024                      Navigator     :0  
##                     Max.   :2024                      Second Wind   :0  
##                                                       Spirit of Saba:6  
##  Trip_ID        Fishing_gear  Fishing_area  Depth_m_min   Depth_m_max 
##  Mode:logical   LP   :1             :6     Min.   : NA   Min.   : NA  
##  NA's:6         LP/MP:0      A3     :0     1st Qu.: NA   1st Qu.: NA  
##                 RP   :5      A3/A4  :0     Median : NA   Median : NA  
##                              B2     :0     Mean   :NaN   Mean   :NaN  
##                              B4     :0     3rd Qu.: NA   3rd Qu.: NA  
##                              C4/C5  :0     Max.   : NA   Max.   : NA  
##                              (Other):0     NA's   :6     NA's   :6    
##                Species_sn            Species_cn    Trap_no     landed 
##  Etelis oculatus    :6    Queen Snapper   :6    5      :2   Landed:6  
##  Apsilus dentatus   :0    Black snapper   :0    14     :1             
##  Lutjanus buccanella:0    Black Snapper   :0    15     :1             
##  Lutjanus jocu      :0    Blackfin snapper:0    3      :1             
##  Lutjanus synagris  :0    Blackfin Snapper:0    7      :1             
##  Lutjanus vivanus   :0    Dog Snapper     :0           :0             
##  (Other)            :0    (Other)         :0    (Other):0             
##  catch_contents     Length            study     Comments        
##  Partial:0      Min.   :26.00   GRIDBOARD:0   Length:6          
##  Whole  :6      1st Qu.:27.25   ONBOARD  :6   Class :character  
##                 Median :28.50                 Mode  :character  
##                 Mean   :28.33                                   
##                 3rd Qu.:29.75                                   
##                 Max.   :30.00                                   
##                                                                 
##  Depth_m_min_factor Depth_m_max_factor
##  <20  :0            <20    :0         
##  20-39:0            20-39  :0         
##  40-59:0            40-59  :0         
##  60-79:0            60-79  :0         
##  >80  :0            80-99  :0         
##  NA's :6            (Other):0         
##                     NA's   :6
sd(qsdf_onboard$Length)
## [1] 1.632993

length at first capture (Lc)

# Ensure the length column is numeric
qsdf_onboard$Length <- as.numeric(qsdf_onboard$Length)

# Create a histogram with breaks at each centimeter
qs_onboard_hist <- hist(qsdf_onboard$Length, breaks = seq(floor(min(qsdf_onboard$Length)), ceiling(max(qsdf_onboard$Length)), by = 1), plot = FALSE)

# Convert histogram data to a data frame
qs_onboard_hist_df <- data.frame(length = qs_onboard_hist$mids, count = qs_onboard_hist$counts)

# Calculate cumulative frequency
qs_onboard_hist_df <- qs_onboard_hist_df %>%
  arrange(length) %>%
  mutate(cumulative_count = cumsum(count),
         cumulative_percentage = cumulative_count / sum(count) * 100)

# Find the length at 50% cumulative frequency
qs_onboard_Lc <- qs_onboard_hist_df %>%
  filter(cumulative_percentage >= 50) %>%
  slice(1) %>%
  pull(length)

qs_onboard_Lc
## [1] 27.5

CPUE

number of traps per trip found in the FisheriesWorkbook July file in the short interviews page

total number of redfish and lobster pots on trips where the whole catch was measured between March and June 2024

14/03 SOS - 39 RP 08/05 SW - 21 RP 14/05 SW - 22 RP 29/05 SW - 39 RP 05/06 SW - 45 RP 19/06 SW - 24 RP

14/03 SOS - 5 LP 19/03 SOS - 76 LP 20/03 RH - 52 LP 25/03 MF - 95 LP 23/04 RH - 60 LP 27/03 SW - 86 LP 30/04 SW - 79 LP 15/07 HL - 17 LP 16/07 RH - 59 LP

rp_total_no <- 39+86+51+21+22+39+45+24+17

lp_total_no <- 5+76+52+95+60+86+79+17+59

E. oculatus caught on: 14/03/2024 - 39 RP, 5 LP

1 fish in LP 5 in RP

#CPUE = total catch/total effort
qs_CPUE_rp <- 5/rp_total_no
qs_CPUE_rp
## [1] 0.01453488
qs_CPUE_lp <- 1/lp_total_no
qs_CPUE_lp
## [1] 0.001890359

L. buccanella

subset the data

bsdf_onboard <- filter(df_allsnappers, Species_sn == "Lutjanus buccanella")
View(bsdf_onboard)

summary(bsdf_onboard)
##      date                year         month                    Boat_name  
##  Length:802         Min.   :2024   Length:802         Bridgette     :  0  
##  Class :character   1st Qu.:2024   Class :character   Highliner     :  3  
##  Mode  :character   Median :2024   Mode  :character   Lady Carolina :  2  
##                     Mean   :2024                      Mr Fish       :  0  
##                     3rd Qu.:2024                      Navigator     : 22  
##                     Max.   :2024                      Second Wind   :771  
##                                                       Spirit of Saba:  4  
##  Trip_ID        Fishing_gear  Fishing_area  Depth_m_min    Depth_m_max   
##  Mode:logical   LP   : 24    A3/A4  :393   Min.   :12.0   Min.   : 20.0  
##  NA's:802       LP/MP:  0    D5     :110   1st Qu.:21.0   1st Qu.: 28.0  
##                 RP   :778    C5/D5  :105   Median :40.0   Median : 60.0  
##                              A3     : 99   Mean   :43.8   Mean   : 87.2  
##                              D4     : 64   3rd Qu.:50.0   3rd Qu.:150.0  
##                              B2     : 22   Max.   :91.0   Max.   :150.0  
##                              (Other):  9   NA's   :234    NA's   :234    
##                Species_sn             Species_cn     Trap_no       landed   
##  Lutjanus buccanella:802   Blackfin Snapper:738          :223   Landed:802  
##  Apsilus dentatus   :  0   Blackfin snapper: 64   10     : 49               
##  Etelis oculatus    :  0   Black snapper   :  0   12     : 45               
##  Lutjanus jocu      :  0   Black Snapper   :  0   14     : 31               
##  Lutjanus synagris  :  0   Dog Snapper     :  0   37     : 30               
##  Lutjanus vivanus   :  0   Lane Snapper    :  0   2      : 29               
##  (Other)            :  0   (Other)         :  0   (Other):395               
##  catch_contents     Length            study       Comments        
##  Partial:223    Min.   :20.00   GRIDBOARD:223   Length:802        
##  Whole  :579    1st Qu.:26.00   ONBOARD  :579   Class :character  
##                 Median :28.00                   Mode  :character  
##                 Mean   :28.97                                     
##                 3rd Qu.:31.00                                     
##                 Max.   :45.00                                     
##                                                                   
##  Depth_m_min_factor Depth_m_max_factor
##  <20  :  2          20-39  :200       
##  20-39:198          >140   :169       
##  40-59:266          120-139: 99       
##  60-79:  0          60-79  : 97       
##  >80  :102          80-99  :  3       
##  NA's :234          (Other):  0       
##                     NA's   :234
sd(bsdf_onboard$Length)
## [1] 4.689004

length at first capture (Lc)

# Ensure the length column is numeric
bsdf_onboard$Length <- as.numeric(bsdf_onboard$Length)

# Create a histogram with breaks at each centimeter
bs_onboard_hist <- hist(bsdf_onboard$Length, breaks = seq(floor(min(bsdf_onboard$Length)), ceiling(max(bsdf_onboard$Length)), by = 1), plot = FALSE)

# Convert histogram data to a data frame
bs_onboard_hist_df <- data.frame(length = bs_onboard_hist$mids, count = bs_onboard_hist$counts)

# Calculate cumulative frequency
bs_onboard_hist_df <- bs_onboard_hist_df %>%
  arrange(length) %>%
  mutate(cumulative_count = cumsum(count),
         cumulative_percentage = cumulative_count / sum(count) * 100)

# Find the length at 50% cumulative frequency
bs_onboard_Lc <- bs_onboard_hist_df %>%
  filter(cumulative_percentage >= 50) %>%
  slice(1) %>%
  pull(length)

bs_onboard_Lc
## [1] 27.5

CPUE

number of traps per trip (whole catch measured) found in the FisheriesWorkbook July file in the short interviews page L. buccanella caught on: 14/03/2024 - 39 RP 08/05/2024 - 21 RP 14/05/2024 - 22 RP 29/05/2024 - 39 RP 05/06/2024 - 45 RP 19/06/2024 - 24 RP

579 fish caught in RP

#CPUE = total catch/total effort
bs_CPUE_rp <- 579/rp_total_no
bs_CPUE_rp
## [1] 1.68314

L. synagris

subset the data

lsdf_onboard <- filter(df_allsnappers, Species_sn == "Lutjanus synagris")
View(lsdf_onboard)

summary(lsdf_onboard)
##      date                year         month                    Boat_name 
##  Length:26          Min.   :2024   Length:26          Bridgette     : 8  
##  Class :character   1st Qu.:2024   Class :character   Highliner     : 0  
##  Mode  :character   Median :2024   Mode  :character   Lady Carolina : 6  
##                     Mean   :2024                      Mr Fish       : 1  
##                     3rd Qu.:2024                      Navigator     : 0  
##                     Max.   :2024                      Second Wind   : 0  
##                                                       Spirit of Saba:11  
##  Trip_ID        Fishing_gear  Fishing_area  Depth_m_min     Depth_m_max   
##  Mode:logical   LP   :15     B4     :15    Min.   :12.00   Min.   :21.00  
##  NA's:26        LP/MP: 0            :11    1st Qu.:12.00   1st Qu.:22.00  
##                 RP   :11     A3     : 0    Median :15.00   Median :23.00  
##                              A3/A4  : 0    Mean   :14.07   Mean   :22.47  
##                              B2     : 0    3rd Qu.:15.00   3rd Qu.:23.00  
##                              C4/C5  : 0    Max.   :19.00   Max.   :23.00  
##                              (Other): 0    NA's   :11      NA's   :11     
##                Species_sn            Species_cn    Trap_no      landed  
##  Lutjanus synagris  :26   Lane Snapper    :26          :15   Landed:26  
##  Apsilus dentatus   : 0   Black snapper   : 0   13     : 9              
##  Etelis oculatus    : 0   Black Snapper   : 0   5      : 1              
##  Lutjanus buccanella: 0   Blackfin snapper: 0   7      : 1              
##  Lutjanus jocu      : 0   Blackfin Snapper: 0   1      : 0              
##  Lutjanus vivanus   : 0   Dog Snapper     : 0   10     : 0              
##  (Other)            : 0   (Other)         : 0   (Other): 0              
##  catch_contents     Length            study      Comments        
##  Partial:15     Min.   :25.00   GRIDBOARD:15   Length:26         
##  Whole  :11     1st Qu.:27.00   ONBOARD  :11   Class :character  
##                 Median :29.50                  Mode  :character  
##                 Mean   :29.85                                    
##                 3rd Qu.:32.75                                    
##                 Max.   :39.00                                    
##                                                                  
##  Depth_m_min_factor Depth_m_max_factor
##  <20  :15           20-39  :15        
##  20-39: 0           <20    : 0        
##  40-59: 0           40-59  : 0        
##  60-79: 0           60-79  : 0        
##  >80  : 0           80-99  : 0        
##  NA's :11           (Other): 0        
##                     NA's   :11
sd(lsdf_onboard$Length)
## [1] 4.006917

length at first capture (Lc)

# Ensure the length column is numeric
lsdf_onboard$Length <- as.numeric(lsdf_onboard$Length)

# Create a histogram with breaks at each centimeter
ls_onboard_hist <- hist(lsdf_onboard$Length, breaks = seq(floor(min(lsdf_onboard$Length)), ceiling(max(lsdf_onboard$Length)), by = 1), plot = FALSE)

# Convert histogram data to a data frame
ls_onboard_hist_df <- data.frame(length = ls_onboard_hist$mids, count = ls_onboard_hist$counts)

# Calculate cumulative frequency
ls_onboard_hist_df <- ls_onboard_hist_df %>%
  arrange(length) %>%
  mutate(cumulative_count = cumsum(count),
         cumulative_percentage = cumulative_count / sum(count) * 100)

# Find the length at 50% cumulative frequency
ls_onboard_Lc <- ls_onboard_hist_df %>%
  filter(cumulative_percentage >= 50) %>%
  slice(1) %>%
  pull(length)

ls_onboard_Lc
## [1] 28.5

CPUE

number of traps per trip (whole catch measured) found in the FisheriesWorkbook July file in the short interviews page L. synagris caught on: 14/03/2024 - 39 RP

11 fish caught in RP

#CPUE = total catch/total effort
ls_CPUE_rp <- 11/rp_total_no
ls_CPUE_rp
## [1] 0.03197674

L. vivanus

subset the data

ysdf_onboard <- filter(df_allsnappers, Species_sn == "Lutjanus vivanus")
View(ysdf_onboard)

summary(ysdf_onboard)
##      date                year         month                    Boat_name  
##  Length:712         Min.   :2024   Length:712         Bridgette     :  1  
##  Class :character   1st Qu.:2024   Class :character   Highliner     : 36  
##  Mode  :character   Median :2024   Mode  :character   Lady Carolina :  2  
##                     Mean   :2024                      Mr Fish       :  0  
##                     3rd Qu.:2024                      Navigator     :  0  
##                     Max.   :2024                      Second Wind   :589  
##                                                       Spirit of Saba: 84  
##  Trip_ID        Fishing_gear  Fishing_area  Depth_m_min     Depth_m_max   
##  Mode:logical   LP   :  3    C5/D5  :274   Min.   : 8.00   Min.   : 14.0  
##  NA's:712       LP/MP:  0    D5     :162   1st Qu.:50.00   1st Qu.:150.0  
##                 RP   :709           : 84   Median :50.00   Median :150.0  
##                              D4     : 74   Mean   :54.84   Mean   :136.7  
##                              A3     : 41   3rd Qu.:50.00   3rd Qu.:150.0  
##                              A3/A4  : 38   Max.   :91.00   Max.   :150.0  
##                              (Other): 39   NA's   :259     NA's   :259    
##                Species_sn              Species_cn     Trap_no       landed   
##  Lutjanus vivanus   :712   Yelloweye Snapper:636          : 93   Landed:712  
##  Apsilus dentatus   :  0   Yelloweye snapper: 72   10     : 56               
##  Etelis oculatus    :  0   YellowEye Snapper:  2   17     : 45               
##  Lutjanus buccanella:  0   yelloweye snapper:  1   16     : 44               
##  Lutjanus jocu      :  0   yelloweye Snapper:  1   4      : 44               
##  Lutjanus synagris  :  0   Black snapper    :  0   14     : 39               
##  (Other)            :  0   (Other)          :  0   (Other):391               
##  catch_contents     Length            study       Comments        
##  Partial: 93    Min.   :12.00   GRIDBOARD: 93   Length:712        
##  Whole  :619    1st Qu.:25.00   ONBOARD  :619   Class :character  
##                 Median :27.00                   Mode  :character  
##                 Mean   :28.69                                     
##                 3rd Qu.:31.00                                     
##                 Max.   :70.00                                     
##                                                                   
##  Depth_m_min_factor Depth_m_max_factor
##  <20  :  3          >140   :348       
##  20-39: 12          120-139: 41       
##  40-59:361          80-99  : 36       
##  60-79:  0          20-39  : 13       
##  >80  : 77          60-79  : 13       
##  NA's :259          (Other):  2       
##                     NA's   :259
sd(ysdf_onboard$Length)
## [1] 5.573843

length at first capture (Lc)

# Ensure the length column is numeric
ysdf_onboard$Length <- as.numeric(ysdf_onboard$Length)

# Create a histogram with breaks at each centimeter
ys_onboard_hist <- hist(ysdf_onboard$Length, breaks = seq(floor(min(ysdf_onboard$Length)), ceiling(max(ysdf_onboard$Length)), by = 1), plot = FALSE)

# Convert histogram data to a data frame
ys_onboard_hist_df <- data.frame(length = ys_onboard_hist$mids, count = ys_onboard_hist$counts)

# Calculate cumulative frequency
ys_onboard_hist_df <- ys_onboard_hist_df %>%
  arrange(length) %>%
  mutate(cumulative_count = cumsum(count),
         cumulative_percentage = cumulative_count / sum(count) * 100)

# Find the length at 50% cumulative frequency
ys_onboard_Lc <- ys_onboard_hist_df %>%
  filter(cumulative_percentage >= 50) %>%
  slice(1) %>%
  pull(length)

ys_onboard_Lc
## [1] 26.5

CPUE

number of traps per trip (whole catch) found in the FisheriesWorkbook July file in the short interviews page L. vivanus caught on: 14/03/2024 - 39 RP 24/04/2024 - 22 RP 08/05/2024 - 21 RP 14/05/2024 - 22 RP 29/05/2024 - 39 RP 05/06/2024 - 45 RP 19/06/2024 - 24 RP

619 fish caught in RP

#CPUE = total catch/total effort
ys_CPUE_rp <- 619/rp_total_no
ys_CPUE_rp
## [1] 1.799419

P. aquilonaris

subset the data

wndf_onboard <- filter(df_allsnappers, Species_sn == "Pristipomoides aquilonaris")
View(wndf_onboard)

summary(wndf_onboard)
##      date                year         month                    Boat_name
##  Length:9           Min.   :2024   Length:9           Bridgette     :0  
##  Class :character   1st Qu.:2024   Class :character   Highliner     :0  
##  Mode  :character   Median :2024   Mode  :character   Lady Carolina :0  
##                     Mean   :2024                      Mr Fish       :0  
##                     3rd Qu.:2024                      Navigator     :0  
##                     Max.   :2024                      Second Wind   :9  
##                                                       Spirit of Saba:0  
##  Trip_ID        Fishing_gear  Fishing_area  Depth_m_min  Depth_m_max 
##  Mode:logical   LP   :0      C5/D5  :5     Min.   :50   Min.   :150  
##  NA's:9         LP/MP:0      D5     :3     1st Qu.:50   1st Qu.:150  
##                 RP   :9      D4     :1     Median :50   Median :150  
##                                     :0     Mean   :50   Mean   :150  
##                              A3     :0     3rd Qu.:50   3rd Qu.:150  
##                              A3/A4  :0     Max.   :50   Max.   :150  
##                              (Other):0     NA's   :3    NA's   :3    
##                       Species_sn            Species_cn    Trap_no     landed 
##  Pristipomoides aquilonaris:9    Wenchman Snapper:8    26     :5   Landed:9  
##  Apsilus dentatus          :0    Wenchman snapper:1    21     :2             
##  Etelis oculatus           :0    Black snapper   :0    24     :1             
##  Lutjanus buccanella       :0    Black Snapper   :0    8      :1             
##  Lutjanus jocu             :0    Blackfin snapper:0           :0             
##  Lutjanus synagris         :0    Blackfin Snapper:0    1      :0             
##  (Other)                   :0    (Other)         :0    (Other):0             
##  catch_contents     Length            study     Comments        
##  Partial:0      Min.   :23.00   GRIDBOARD:0   Length:9          
##  Whole  :9      1st Qu.:27.00   ONBOARD  :9   Class :character  
##                 Median :28.00                 Mode  :character  
##                 Mean   :28.22                                   
##                 3rd Qu.:29.00                                   
##                 Max.   :34.00                                   
##                                                                 
##  Depth_m_min_factor Depth_m_max_factor
##  <20  :0            >140   :6         
##  20-39:0            <20    :0         
##  40-59:6            20-39  :0         
##  60-79:0            40-59  :0         
##  >80  :0            60-79  :0         
##  NA's :3            (Other):0         
##                     NA's   :3
sd(wndf_onboard$Length)
## [1] 3.308239

length at first capture (Lc)

# Ensure the length column is numeric
wndf_onboard$Length <- as.numeric(wndf_onboard$Length)

# Create a histogram with breaks at each centimeter
wn_onboard_hist <- hist(wndf_onboard$Length, breaks = seq(floor(min(wndf_onboard$Length)), ceiling(max(wndf_onboard$Length)), by = 1), plot = FALSE)

# Convert histogram data to a data frame
wn_onboard_hist_df <- data.frame(length = wn_onboard_hist$mids, count = wn_onboard_hist$counts)

# Calculate cumulative frequency
wn_onboard_hist_df <- wn_onboard_hist_df %>%
  arrange(length) %>%
  mutate(cumulative_count = cumsum(count),
         cumulative_percentage = cumulative_count / sum(count) * 100)

# Find the length at 50% cumulative frequency
wn_onboard_Lc <- wn_onboard_hist_df %>%
  filter(cumulative_percentage >= 50) %>%
  slice(1) %>%
  pull(length)

wn_onboard_Lc
## [1] 27.5

CPUE

number of traps per trip (whole catch) found in the FisheriesWorkbook July file in the short interviews page

P. aquilonaris caught on: 29/05/2024 - 39 RP 05/06/2024 - 45 RP 19/06/2024 - 24 RP

9 fish caught in RP

#CPUE = total catch/total effort
wn_CPUE_rp <- 9/rp_total_no
wn_CPUE_rp
## [1] 0.02616279

R. aurorubens

subset the data

vsdf_onboard <- filter(df_allsnappers, Species_sn == "Rhomboplites aurorubens")
View(vsdf_onboard)

summary(vsdf_onboard)
##      date                year         month                    Boat_name 
##  Length:108         Min.   :2024   Length:108         Bridgette     : 2  
##  Class :character   1st Qu.:2024   Class :character   Highliner     :11  
##  Mode  :character   Median :2024   Mode  :character   Lady Carolina : 4  
##                     Mean   :2024                      Mr Fish       : 0  
##                     3rd Qu.:2024                      Navigator     : 6  
##                     Max.   :2024                      Second Wind   :48  
##                                                       Spirit of Saba:37  
##  Trip_ID        Fishing_gear  Fishing_area  Depth_m_min     Depth_m_max   
##  Mode:logical   LP   :12            :37    Min.   :11.00   Min.   : 14.0  
##  NA's:108       LP/MP:11     C5/D5  :22    1st Qu.:15.00   1st Qu.: 30.0  
##                 RP   :85     D4     :14    Median :50.00   Median :150.0  
##                              D5     :12    Mean   :36.53   Mean   :101.1  
##                              C4/C5  :11    3rd Qu.:50.00   3rd Qu.:150.0  
##                              B2     : 6    Max.   :50.00   Max.   :150.0  
##                              (Other): 6    NA's   :49      NA's   :49     
##                    Species_sn               Species_cn    Trap_no  
##  Rhomboplites aurorubens:108   Vermillion Snapper:94   28     :20  
##  Apsilus dentatus       :  0   Vermillion snapper:14          :12  
##  Etelis oculatus        :  0   Black snapper     : 0   13     :12  
##  Lutjanus buccanella    :  0   Black Snapper     : 0   14/15  : 9  
##  Lutjanus jocu          :  0   Blackfin snapper  : 0   20     : 5  
##  Lutjanus synagris      :  0   Blackfin Snapper  : 0   25     : 5  
##  (Other)                :  0   (Other)           : 0   (Other):45  
##     landed    catch_contents     Length            study      Comments        
##  Landed:108   Partial:12     Min.   :18.00   GRIDBOARD:12   Length:108        
##               Whole  :96     1st Qu.:23.00   ONBOARD  :96   Class :character  
##                              Median :25.00                  Mode  :character  
##                              Mean   :25.43                                    
##                              3rd Qu.:28.00                                    
##                              Max.   :38.00                                    
##                                                                               
##  Depth_m_min_factor Depth_m_max_factor
##  <20  :17           >140   :36        
##  20-39: 6           20-39  :21        
##  40-59:36           <20    : 2        
##  60-79: 0           40-59  : 0        
##  >80  : 0           60-79  : 0        
##  NA's :49           (Other): 0        
##                     NA's   :49
sd(vsdf_onboard$Length)
## [1] 3.599594

length at first capture (Lc)

# Ensure the length column is numeric
vsdf_onboard$Length <- as.numeric(vsdf_onboard$Length)

# Create a histogram with breaks at each centimeter
vs_onboard_hist <- hist(vsdf_onboard$Length, breaks = seq(floor(min(vsdf_onboard$Length)), ceiling(max(vsdf_onboard$Length)), by = 1), plot = FALSE)

# Convert histogram data to a data frame
vs_onboard_hist_df <- data.frame(length = vs_onboard_hist$mids, count = vs_onboard_hist$counts)

# Calculate cumulative frequency
vs_onboard_hist_df <- vs_onboard_hist_df %>%
  arrange(length) %>%
  mutate(cumulative_count = cumsum(count),
         cumulative_percentage = cumulative_count / sum(count) * 100)

# Find the length at 50% cumulative frequency
vs_onboard_Lc <- vs_onboard_hist_df %>%
  filter(cumulative_percentage >= 50) %>%
  slice(1) %>%
  pull(length)

vs_onboard_Lc
## [1] 24.5

CPUE

number of traps per trip (whole catch) found in the FisheriesWorkbook July file in the short interviews page

R. aurorubens caught on: 14/03/2024 - 39 RP 29/05/2024 - 39 RP 05/06/2024 - 45 RP 19/06/2024 - 24 RP 15/07/2024 - 17 LP

85 fish caught in RP 11 fish caught in LP

#CPUE = total catch/total effort
vs_CPUE_rp <- 85/rp_total_no
vs_CPUE_rp
## [1] 0.247093
vs_CPUE_lp <- 11/lp_total_no
vs_CPUE_lp
## [1] 0.02079395

port sampling interview data

df_portinterviews <- read.csv("portinterviews.csv")

#change data type
df_portinterviews$Boat_name <- factor(df_portinterviews$Boat_name)
df_portinterviews$Fishing_gear <- factor(df_portinterviews$Fishing_gear)
df_portinterviews$Fishing_area <- factor(df_portinterviews$Fishing_area)
df_portinterviews$Depth_m_min <- as.numeric(df_portinterviews$Depth_m_min)
## Warning: NAs introduced by coercion
df_portinterviews$Depth_m_max <- as.numeric(df_portinterviews$Depth_m_max)
## Warning: NAs introduced by coercion
df_portinterviews$Traps_no <- as.numeric(df_portinterviews$Traps_no)
## Warning: NAs introduced by coercion
summary(df_portinterviews)
##  Date..d.m.y.            Year         Month                    Boat_name 
##  Length:176         Min.   :2024   Length:176         Second Wind   :30  
##  Class :character   1st Qu.:2024   Class :character   Spirit of Saba:25  
##  Mode  :character   Median :2024   Mode  :character   Bridgette     :23  
##                     Mean   :2024                      Lady Carolina :22  
##                     3rd Qu.:2024                      Rhiannon      :21  
##                     Max.   :2024                      Navigator     :18  
##                                                       (Other)       :37  
##  Trip_ID        Fishing_gear  Fishing_area  N.17.          W.63.        
##  Mode:logical   HL/LL:  1    B4     :44    Mode:logical   Mode:logical  
##  NA's:176       LP   :113    D4     :21    NA's:176       NA's:176      
##                 RP   : 58    B5     :19                                 
##                 RP/LP:  4    C5     :14                                 
##                              B3     :10                                 
##                                     : 9                                 
##                              (Other):59                                 
##  Column1        Column2         Depth_m_min     Depth_m_max    
##  Mode:logical   Mode:logical   Min.   :  7.0   Min.   :  7.00  
##  NA's:176       NA's:176       1st Qu.: 12.0   1st Qu.: 15.00  
##                                Median : 16.0   Median : 25.00  
##                                Mean   : 28.8   Mean   : 48.57  
##                                3rd Qu.: 43.0   3rd Qu.: 70.00  
##                                Max.   :150.0   Max.   :183.00  
##                                NA's   :19      NA's   :19      
##     Traps_no      Soaking_time_days   Line_hook_no Lines_pulled_no
##  Min.   :  5.00   Length:176         Min.   :3     Min.   :3      
##  1st Qu.: 24.00   Class :character   1st Qu.:3     1st Qu.:3      
##  Median : 60.50   Mode  :character   Median :3     Median :3      
##  Mean   : 59.14                      Mean   :3     Mean   :3      
##  3rd Qu.: 87.25                      3rd Qu.:3     3rd Qu.:3      
##  Max.   :177.00                      Max.   :3     Max.   :3      
##  NA's   :4                           NA's   :175   NA's   :175    
##     Lines_no        FAD            Duration..hr.    Lobster_no       
##  Min.   :2.00   Length:176         Min.   : 5.00   Length:176        
##  1st Qu.:2.25   Class :character   1st Qu.: 8.75   Class :character  
##  Median :2.50   Mode  :character   Median :12.50   Mode  :character  
##  Mean   :2.50                      Mean   :12.50                     
##  3rd Qu.:2.75                      3rd Qu.:16.25                     
##  Max.   :3.00                      Max.   :20.00                     
##  NA's   :174                       NA's   :174                       
##  Mixed_Fish_lbs    Redfish_lbs      Lionfish_no     Lobster_berried_no
##  Min.   :  0.00   Min.   :  0.00   Min.   : 0.000   Min.   :  0.00    
##  1st Qu.: 10.00   1st Qu.:  0.00   1st Qu.: 0.000   1st Qu.:  0.00    
##  Median : 20.00   Median :  0.00   Median : 0.000   Median :  5.00    
##  Mean   : 37.12   Mean   : 53.59   Mean   : 1.006   Mean   : 10.75    
##  3rd Qu.: 50.00   3rd Qu.:100.00   3rd Qu.: 1.000   3rd Qu.: 20.00    
##  Max.   :250.00   Max.   :440.00   Max.   :20.000   Max.   :150.00    
##  NA's   :3        NA's   :4        NA's   :3        NA's   :4         
##  Lobster_undersized_no Traps_lost_no   Nurse.Shark     Caribbean.Reef.Shark
##  Min.   : 0.000        Min.   : 0.0   Min.   : 0.000   Min.   :0           
##  1st Qu.: 0.000        1st Qu.: 0.0   1st Qu.: 0.000   1st Qu.:0           
##  Median : 2.500        Median : 0.0   Median : 0.000   Median :0           
##  Mean   : 7.541        Mean   : 0.6   Mean   : 1.756   Mean   :0           
##  3rd Qu.:10.000        3rd Qu.: 0.0   3rd Qu.: 2.000   3rd Qu.:0           
##  Max.   :50.000        Max.   :21.0   Max.   :28.000   Max.   :0           
##  NA's   :4             NA's   :16     NA's   :4        NA's   :4           
##      Other           comments        
##  Min.   : 0.0000   Length:176        
##  1st Qu.: 0.0000   Class :character  
##  Median : 0.0000   Mode  :character  
##  Mean   : 0.1337                     
##  3rd Qu.: 0.0000                     
##  Max.   :23.0000                     
##  NA's   :4
# get a summary of onboard vs gridboard measurements
area_effort <- df_portinterviews %>%
  filter(Fishing_gear == "RP" | Fishing_gear == "RP/LP") %>%
  filter(Fishing_area!="")

x <- 1

area_effort$x <- x
View(area_effort)
fishing_area_effort_plot <- ggplot(area_effort, aes(x = Fishing_area, y = Traps_no)) +
  geom_col(aes(fill = Fishing_gear)) +
    labs(x = "Quadrant", 
       y = "Fishing effort in number of traps pulled", 
       title = str_wrap(c("Fishing effort per Saba Bank quadrant"), width = 60),
       fill = "Fishing gear") +
  theme_classic() +
  scale_fill_viridis_d(option = "D", 
                       begin = 0.2, 
                       end = 0.8)

ggplot(area_effort, aes(x = Month, y = Traps_no)) +
  geom_col(aes(fill = Fishing_area)) +
    labs(x = "Quadrant", 
       y = "Fishing effort in number of traps pulled", 
       title = str_wrap(c("Fishing effort per Saba Bank quadrant"), width = 60),
       fill = "Fishing gear") +
  theme_classic()

fishing_area_effort_plot2 <- ggplot(area_effort, aes(x = x, y = Traps_no, fill = Fishing_area)) +
  geom_bar(stat = "identity", 
           position = "fill") +
    labs(x = "Quadrant", 
       y = "Fishing effort in number of traps pulled", 
       title = str_wrap(c("Fishing effort per Saba Bank quadrant"), width = 60),
       fill = "Fishing gear") +
  theme_classic()
fishing_area_effort_plot2

#save plot
ggsave("area_lengths_KW.png", plot = plot_area_lengths, width = 7.2, height = 4, dpi = 400)