## Background

The Southeast Area Monitoring and Assessment Program (SEAMAP) is a fisheries-independent data collection program that in the Gulf of Mexico was initiated in 1981 and includes the continental shelf of the U.S. waters. Sampling off Florida started later (2009). Our study examines data from the Groundfish Bottom Trawl surveys.


##Import Data

#cache=TRUE
setwd("~/oss/Synthesis/Seamap")
invrec <-read.table("INVREC.txt", header=TRUE,sep=",")
starec <-read.table("STAREC.txt", header=TRUE,sep=",")
bgsrec <-read.table("BGSREC.txt", header=TRUE,sep=",")
glfrec<- read.table("GLFREC.txt", header=TRUE,sep=",")

head(invrec)
##   INVRECID STATIONID CRUISEID VESSEL CRUISE_NO P_STA_NO GEAR_SIZE
## 1        1         4      581      4       256        4        40
## 2        2         5      581      4       256        5        40
## 3        3         6      581      4       256        6        40
## 4        4         7      581      4       256        7        40
## 5        5         8      581      4       256        8        40
## 6        6         9      581      4       256        9        40
##   GEAR_TYPE MESH_SIZE OP MIN_FISH WBCOLOR BOT_TYPE BOT_REG TOT_LIVE
## 1        ST      1.63          38                             150.1
## 2        ST      1.63          12                              31.4
## 3        ST      1.63          10                              27.2
## 4        ST      1.63          25                              14.7
## 5        ST      1.63          15                              24.1
## 6        ST      1.63          12                               7.9
##   FIN_CATCH CRUS_CATCH OTHR_CATCH T_SAMPLEWT T_SELECTWT FIN_SMP_WT
## 1     149.0        0.4        0.7      14.65       2.77      14.54
## 2      29.6        0.4        1.4      14.98       1.87      14.23
## 3      26.8        0.3        0.2      12.45       0.16      12.30
## 4      12.1        1.9        0.8       0.00      14.74       0.00
## 5      23.5        0.4        0.3      11.57       0.37      11.28
## 6       7.3        0.3        0.3       0.00       7.89       0.00
##   FIN_SEL_WT CRU_SMP_WT CRU_SEL_WT OTH_SMP_WT OTH_SEL_WT COMBIO
## 1       2.75       0.04       0.02       0.06       0.00       
## 2       1.48       0.03       0.38       0.71       0.00       
## 3       0.00       0.04       0.16       0.10       0.00       
## 4      12.08       0.00       1.86       0.00       0.78       
## 5       0.29       0.14       0.07       0.14       0.00       
## 6       7.26       0.00       0.34       0.00       0.28
head(starec)
##   STATIONID CRUISEID VESSEL CRUISE_NO P_STA_NO TIME_ZN TIME_MIL S_LATD
## 1         1      581      4       256        1       8      249     26
## 2         2      581      4       256        2       8      619     26
## 3         3      581      4       256        3       8     1029     25
## 4         4      581      4       256        4       8     1337     26
## 5         5      581      4       256        5       8     1519     26
## 6         6      581      4       256        6       8     1659     26
##   S_LATM S_LATH S_LOND S_LONM S_LONH DEPTH_SSTA S_STA_NO
## 1  29.67      N     96  30.29      W      147.2    B239 
## 2   2.92      N     96  28.26      W      119.4    B316 
## 3  59.33      N     96  59.07      W       51.8    B36  
## 4   5.15      N     97   5.63      W       18.3    TD06 
## 5   7.27      N     97   8.41      W       13.4    TD03 
## 6  13.29      N     97   9.30      W       13.5    TD02 
##            MO_DAY_YR TIME_EMIL E_LATD E_LATM E_LATH E_LOND E_LONM E_LONH
## 1 10/11/2003 0:00:00       257     26  29.43      N     96  30.16      W
## 2 10/11/2003 0:00:00       628     26   2.91      N     96  27.99      W
## 3 10/11/2003 0:00:00      1034     25  59.27      N     96  58.92      W
## 4 10/11/2003 0:00:00      1415     26   6.43      N     97   4.29      W
## 5 10/11/2003 0:00:00      1531     26   7.68      N     97   8.11      W
## 6 10/11/2003 0:00:00      1709     26  13.48      N     97   8.87      W
##   DEPTH_ESTA                          GEARS TEMP_SSURF TEMP_BOT TEMP_SAIR
## 1      147.0 BGPNNN                              27.62    20.98      25.3
## 2      120.2 BGPNNN                              27.56    24.08      19.3
## 3       52.9 BGPNNN                              27.27    27.21      26.5
## 4       20.3 STBG                                27.32    27.00      27.7
## 5       15.2 STBG                                27.28    26.84      27.7
## 6       15.4 STBG                                27.37    26.69      27.8
##   B_PRSSR WIND_SPD WIND_DIR WAVE_HT SEA_COND DBTYPE DATA_CODE VESSEL_SPD
## 1  1011.2       10      125     0.3        3      S        US        2.0
## 2  1011.1        2      120     0.3        1      S        US        1.7
## 3  1014.4        7      198     0.3        3      S        US        1.8
## 4  1007.5        4      156     0.2        2      S        US        2.8
## 5  1008.5        5      140     0.2        2      S        US        2.6
## 6  1008.9        6      124     0.2        2      S        US        2.7
##   FAUN_ZONE STAT_ZONE TOW_NO NET_NO COMSTAT DECSLAT DECSLON DECELAT
## 1         7        21     NA     NA           26.49  -96.50   26.49
## 2         7        21     NA     NA           26.04  -96.47   26.04
## 3         7        22     NA     NA           25.98  -96.98   25.98
## 4         7        21      1      1           26.08  -97.09   26.10
## 5         7        21      1      1           26.12  -97.14   26.12
## 6         7        21      1      1           26.22  -97.15   26.22
##   DECELON          START_DATE            END_DATE HAULVALUE
## 1  -96.50  10/11/2003 2:49:00  10/11/2003 2:57:00         G
## 2  -96.46  10/11/2003 6:19:00  10/11/2003 6:28:00         G
## 3  -96.98 10/11/2003 10:29:00 10/11/2003 10:34:00         G
## 4  -97.07 10/11/2003 13:37:00 10/11/2003 14:15:00         G
## 5  -97.13 10/11/2003 15:19:00 10/11/2003 15:31:00         G
## 6  -97.14 10/11/2003 16:59:00 10/11/2003 17:09:00         G
head(bgsrec)
##   BGSID CRUISEID STATIONID VESSEL CRUISE_NO P_STA_NO CATEGORY GENUS_BGS
## 1     1      581         4      4       256        4        3   RHIZOPR
## 2     2      581         4      4       256        4        3   SPHYRNA
## 3     3      581         4      4       256        4        3   HARENGU
## 4     4      581         4      4       256        4        3   OPISTHO
## 5     5      581         4      4       256        4        3   SARDINE
## 6     6      581         4      4       256        4        3    ANCHOA
##   SPEC_BGS BGSCODE CNT CNTEXP SAMPLE_BGS SELECT_BGS   BIO_BGS NODC_BGS
## 1   TERRAE           1      1         NA       0.71 108021802        0
## 2   TIBURO           5      5         NA       0.95 108040104        0
## 3   JAGUAN           9     91       0.15       1.55 121052004        0
## 4   OGLINU           2     20       0.04       0.49 121053002        0
## 5   AURITA           1     10       0.02       0.21 121053801        0
## 6   HEPSET           4     40       0.05       0.58 121060101        0
##   IS_SAMPLE TAXONID INVRECID
## 1         N      NA       NA
## 2         N      NA       NA
## 3         Y      NA       NA
## 4         Y      NA       NA
## 5         Y      NA       NA
## 6         Y      NA       NA
head(glfrec)
##   GLFID CRUISEID BGSID STATIONID VESSEL CRUISE_NO P_STA_NO   BIO_GLF
## 1     1      581     1         4      4       256        4 108021802
## 2     2      581     2         4      4       256        4 108040104
## 3     3      581     2         4      4       256        4 108040104
## 4     4      581     2         4      4       256        4 108040104
## 5     5      581     2         4      4       256        4 108040104
## 6     6      581     2         4      4       256        4 108040104
##   NODC_GLF GENUS_GLF SPEC_GLF INDVL_WT MEASCD_GLF LEN_GLF SEX_GLF MAT_GLF
## 1        0   RHIZOPR   TERRAE       NA         18     526       F       1
## 2        0   SPHYRNA   TIBURO       NA         18     356       M       1
## 3        0   SPHYRNA   TIBURO       NA         18     378              NA
## 4        0   SPHYRNA   TIBURO       NA         18     347              NA
## 5        0   SPHYRNA   TIBURO       NA         18     360              NA
## 6        0   SPHYRNA   TIBURO       NA         18     384              NA

Clean Data

Fish Data

head(fishdata)
##   STATIONID GENUS_BGS SPEC_BGS CNTEXP
## 1         4   RHIZOPR   TERRAE      1
## 2         4   SPHYRNA   TIBURO      5
## 3         4   HARENGU   JAGUAN     91
## 4         4   OPISTHO   OGLINU     20
## 5         4   SARDINE   AURITA     10
## 6         4    ANCHOA   HEPSET     40

Location Data

head(location)
##   STATIONID DECSLAT DECSLON HAULVALUE year month day
## 1         1   26.49  -96.50         G 2003    10  11
## 2         2   26.04  -96.47         G 2003    10  11
## 3         3   25.98  -96.98         G 2003    10  11
## 4         4   26.08  -97.09         G 2003    10  11
## 5         5   26.12  -97.14         G 2003    10  11
## 6         6   26.22  -97.15         G 2003    10  11

Gear Data

head(gear)
##   STATIONID GEAR_SIZE GEAR_TYPE MESH_SIZE MIN_FISH
## 1         4        40        ST      1.63       38
## 2         5        40        ST      1.63       12
## 3         6        40        ST      1.63       10
## 4         7        40        ST      1.63       25
## 5         8        40        ST      1.63       15
## 6         9        40        ST      1.63       12

Size Data

head(size)
##   STATIONID GLFID SPEC_GLF LEN_GLF
## 1         4    56   CAMPEC     100
## 2         4    57   CAMPEC      97
## 3         4    58   CAMPEC      89
## 4         4    59   CAMPEC      99
## 5         4    60   CAMPEC     104
## 6         4    61   CAMPEC      87

Select Gear Type

Number of different gear combinations

## [1] 24

gearshrimptrawl <- dplyr::filter(gear, GEAR_TYPE=="ST", GEAR_SIZE==40, MESH_SIZE==1.63) 
head(gearshrimptrawl)
##   STATIONID GEAR_SIZE GEAR_TYPE MESH_SIZE MIN_FISH
## 1         4        40        ST      1.63       38
## 2         5        40        ST      1.63       12
## 3         6        40        ST      1.63       10
## 4         7        40        ST      1.63       25
## 5         8        40        ST      1.63       15
## 6         9        40        ST      1.63       12

Are We Catching Adults or Juveniles?

length_freq<- left_join(select(size, STATIONID, LEN_GLF), select(gear, STATIONID, GEAR_TYPE, GEAR_SIZE, MESH_SIZE), by="STATIONID")

#Check freqency of each gear type
length_freq<- length_freq %>% dplyr::filter(GEAR_TYPE=="ST", GEAR_SIZE==40, MESH_SIZE==1.63, !is.na(LEN_GLF)) 

Lm= 230 #Length at maturity Red Snapper
        #Maturity obtained at year 2, but estimate for size at year 2 is greater than 230cm

Percent Juveniles
sum(length_freq$LEN_GLF<230)/length(length_freq$LEN_GLF)*100
## [1] 94.30103

Join Gear and Location

Gear

head(gearshrimptrawl)
##   STATIONID GEAR_SIZE GEAR_TYPE MESH_SIZE MIN_FISH
## 1         4        40        ST      1.63       38
## 2         5        40        ST      1.63       12
## 3         6        40        ST      1.63       10
## 4         7        40        ST      1.63       25
## 5         8        40        ST      1.63       15
## 6         9        40        ST      1.63       12

Location

head(location)
##   STATIONID DECSLAT DECSLON HAULVALUE year month day
## 1         1   26.49  -96.50         G 2003    10  11
## 2         2   26.04  -96.47         G 2003    10  11
## 3         3   25.98  -96.98         G 2003    10  11
## 4         4   26.08  -97.09         G 2003    10  11
## 5         5   26.12  -97.14         G 2003    10  11
## 6         6   26.22  -97.15         G 2003    10  11

Gear + Location

location_gearST <- dplyr::inner_join(location,gearshrimptrawl,by="STATIONID")
head(location_gearST)
##   STATIONID DECSLAT DECSLON HAULVALUE year month day GEAR_SIZE GEAR_TYPE
## 1         4   26.08  -97.09         G 2003    10  11        40        ST
## 2         5   26.12  -97.14         G 2003    10  11        40        ST
## 3         6   26.22  -97.15         G 2003    10  11        40        ST
## 4         7   26.11  -96.90         G 2003    10  11        40        ST
## 5         8   26.29  -97.03         G 2003    10  11        40        ST
## 6         9   26.35  -96.96         G 2003    10  11        40        ST
##   MESH_SIZE MIN_FISH
## 1      1.63       38
## 2      1.63       12
## 3      1.63       10
## 4      1.63       25
## 5      1.63       15
## 6      1.63       12

Join Fish Data

Gear + Location

location_gearST <- dplyr::inner_join(location,gearshrimptrawl,by="STATIONID")
head(location_gearST)
##   STATIONID DECSLAT DECSLON HAULVALUE year month day GEAR_SIZE GEAR_TYPE
## 1         4   26.08  -97.09         G 2003    10  11        40        ST
## 2         5   26.12  -97.14         G 2003    10  11        40        ST
## 3         6   26.22  -97.15         G 2003    10  11        40        ST
## 4         7   26.11  -96.90         G 2003    10  11        40        ST
## 5         8   26.29  -97.03         G 2003    10  11        40        ST
## 6         9   26.35  -96.96         G 2003    10  11        40        ST
##   MESH_SIZE MIN_FISH
## 1      1.63       38
## 2      1.63       12
## 3      1.63       10
## 4      1.63       25
## 5      1.63       15
## 6      1.63       12

Gear + Location + Fish

location_gearST_fish <- dplyr::left_join(location_gearST,fishdata,by="STATIONID")
head(location_gearST_fish)
##   STATIONID DECSLAT DECSLON HAULVALUE year month day GEAR_SIZE GEAR_TYPE
## 1         4   26.08  -97.09         G 2003    10  11        40        ST
## 2         4   26.08  -97.09         G 2003    10  11        40        ST
## 3         4   26.08  -97.09         G 2003    10  11        40        ST
## 4         4   26.08  -97.09         G 2003    10  11        40        ST
## 5         4   26.08  -97.09         G 2003    10  11        40        ST
## 6         4   26.08  -97.09         G 2003    10  11        40        ST
##   MESH_SIZE MIN_FISH GENUS_BGS SPEC_BGS CNTEXP
## 1      1.63       38   RHIZOPR   TERRAE      1
## 2      1.63       38   SPHYRNA   TIBURO      5
## 3      1.63       38   HARENGU   JAGUAN     91
## 4      1.63       38   OPISTHO   OGLINU     20
## 5      1.63       38   SARDINE   AURITA     10
## 6      1.63       38    ANCHOA   HEPSET     40

Get sites where Red Snapper data was present

Filter Fish Data for Red Snapper

redsnapper <- dplyr::filter(fishdata,GENUS_BGS=="LUTJANU",SPEC_BGS=="CAMPEC")
head(redsnapper)
##   STATIONID GENUS_BGS SPEC_BGS CNTEXP
## 1         4   LUTJANU   CAMPEC     26
## 2         5   LUTJANU   CAMPEC      1
## 3         7   LUTJANU   CAMPEC     21
## 4         8   LUTJANU   CAMPEC     22
## 5         9   LUTJANU   CAMPEC     17
## 6        11   LUTJANU   CAMPEC     23

Join Red Snapper

Gear + Location + Fish +Red Snapper

location_gearST_redsnapper <- dplyr::left_join(location_gearST,redsnapper,by="STATIONID")
head(location_gearST_redsnapper)
##   STATIONID DECSLAT DECSLON HAULVALUE year month day GEAR_SIZE GEAR_TYPE
## 1         4   26.08  -97.09         G 2003    10  11        40        ST
## 2         5   26.12  -97.14         G 2003    10  11        40        ST
## 3         6   26.22  -97.15         G 2003    10  11        40        ST
## 4         7   26.11  -96.90         G 2003    10  11        40        ST
## 5         8   26.29  -97.03         G 2003    10  11        40        ST
## 6         9   26.35  -96.96         G 2003    10  11        40        ST
##   MESH_SIZE MIN_FISH GENUS_BGS SPEC_BGS CNTEXP
## 1      1.63       38   LUTJANU   CAMPEC     26
## 2      1.63       12   LUTJANU   CAMPEC      1
## 3      1.63       10      <NA>     <NA>     NA
## 4      1.63       25   LUTJANU   CAMPEC     21
## 5      1.63       15   LUTJANU   CAMPEC     22
## 6      1.63       12   LUTJANU   CAMPEC     17

Why didn’t we filter for Red Snapper earlier in Fish Data?

To detect true absence

NA’s represent areas where shrimp trawl was used but red snapper not caught
head(location_gearST_redsnapper)
##   STATIONID DECSLAT DECSLON HAULVALUE year month day GEAR_SIZE GEAR_TYPE
## 1         4   26.08  -97.09         G 2003    10  11        40        ST
## 2         5   26.12  -97.14         G 2003    10  11        40        ST
## 3         6   26.22  -97.15         G 2003    10  11        40        ST
## 4         7   26.11  -96.90         G 2003    10  11        40        ST
## 5         8   26.29  -97.03         G 2003    10  11        40        ST
## 6         9   26.35  -96.96         G 2003    10  11        40        ST
##   MESH_SIZE MIN_FISH GENUS_BGS SPEC_BGS CNTEXP
## 1      1.63       38   LUTJANU   CAMPEC     26
## 2      1.63       12   LUTJANU   CAMPEC      1
## 3      1.63       10      <NA>     <NA>     NA
## 4      1.63       25   LUTJANU   CAMPEC     21
## 5      1.63       15   LUTJANU   CAMPEC     22
## 6      1.63       12   LUTJANU   CAMPEC     17

How many absences?

sum(is.na(location_gearST_redsnapper$SPEC_BGS))
## [1] 15556

Add zeros and genus/species

location_gearST_redsnapper$GENUS_BGS <-"LUTJANU"
location_gearST_redsnapper$SPEC_BGS <-"CAMPEC"
location_gearST_redsnapper[is.na(location_gearST_redsnapper$CNTEXP),"CNTEXP"] <-0
head(location_gearST_redsnapper)
##   STATIONID DECSLAT DECSLON HAULVALUE year month day GEAR_SIZE GEAR_TYPE
## 1         4   26.08  -97.09         G 2003    10  11        40        ST
## 2         5   26.12  -97.14         G 2003    10  11        40        ST
## 3         6   26.22  -97.15         G 2003    10  11        40        ST
## 4         7   26.11  -96.90         G 2003    10  11        40        ST
## 5         8   26.29  -97.03         G 2003    10  11        40        ST
## 6         9   26.35  -96.96         G 2003    10  11        40        ST
##   MESH_SIZE MIN_FISH GENUS_BGS SPEC_BGS CNTEXP
## 1      1.63       38   LUTJANU   CAMPEC     26
## 2      1.63       12   LUTJANU   CAMPEC      1
## 3      1.63       10   LUTJANU   CAMPEC      0
## 4      1.63       25   LUTJANU   CAMPEC     21
## 5      1.63       15   LUTJANU   CAMPEC     22
## 6      1.63       12   LUTJANU   CAMPEC     17

Remove Bad Hauls

location_gearST_redsnapper <- dplyr::filter(location_gearST_redsnapper,HAULVALUE!="B")
summary(location_gearST_redsnapper$HAULVALUE)
##           B     G 
##  6411     0 18513

Check for and remove missing data

colSums(is.na(location_gearST_redsnapper))
## STATIONID   DECSLAT   DECSLON HAULVALUE      year     month       day 
##         0         0         0         0         0         0         0 
## GEAR_SIZE GEAR_TYPE MESH_SIZE  MIN_FISH GENUS_BGS  SPEC_BGS    CNTEXP 
##         0         0         0         3         0         0         0
location_gearST_redsnapper<- na.omit(location_gearST_redsnapper)

Calculate Catch Per Unit Effort (CPUE)

CPUE=Count/Minutes Trawled

location_gearST_redsnapper<- location_gearST_redsnapper %>% dplyr::mutate(CPUE=CNTEXP/MIN_FISH)
head(location_gearST_redsnapper)
##   STATIONID DECSLAT DECSLON HAULVALUE year month day GEAR_SIZE GEAR_TYPE
## 1         4   26.08  -97.09         G 2003    10  11        40        ST
## 2         5   26.12  -97.14         G 2003    10  11        40        ST
## 3         6   26.22  -97.15         G 2003    10  11        40        ST
## 4         7   26.11  -96.90         G 2003    10  11        40        ST
## 5         8   26.29  -97.03         G 2003    10  11        40        ST
## 6         9   26.35  -96.96         G 2003    10  11        40        ST
##   MESH_SIZE MIN_FISH GENUS_BGS SPEC_BGS CNTEXP       CPUE
## 1      1.63       38   LUTJANU   CAMPEC     26 0.68421053
## 2      1.63       12   LUTJANU   CAMPEC      1 0.08333333
## 3      1.63       10   LUTJANU   CAMPEC      0 0.00000000
## 4      1.63       25   LUTJANU   CAMPEC     21 0.84000000
## 5      1.63       15   LUTJANU   CAMPEC     22 1.46666667
## 6      1.63       12   LUTJANU   CAMPEC     17 1.41666667

Which months were the Red Snapper collected the most?

counts<-table(location_gearST_redsnapper$month)
barplot(counts, xlab="Month", ylab = "Sampling Effort", main="Red Snapper Sampling Effort vs Month")

June-July and October-November

Select Data in those windows

location_gearST_redsnapper_sumfall<- location_gearST_redsnapper %>% dplyr::filter(month==6:11)
head(location_gearST_redsnapper_sumfall)
##   STATIONID DECSLAT DECSLON HAULVALUE year month day GEAR_SIZE GEAR_TYPE
## 1         8   26.29  -97.03         G 2003    10  11        40        ST
## 2        14   26.39  -97.00         G 2003    10  12        40        ST
## 3        20   26.86  -97.06         G 2003    10  13        40        ST
## 4        26   26.83  -96.64         G 2003    10  13        40        ST
## 5        32   27.13  -96.59         G 2003    10  14        40        ST
## 6        38   27.23  -97.32         G 2003    10  14        40        ST
##   MESH_SIZE MIN_FISH GENUS_BGS SPEC_BGS CNTEXP     CPUE
## 1      1.63       15   LUTJANU   CAMPEC     22 1.466667
## 2      1.63       28   LUTJANU   CAMPEC      0 0.000000
## 3      1.63       25   LUTJANU   CAMPEC     37 1.480000
## 4      1.63       55   LUTJANU   CAMPEC      0 0.000000
## 5      1.63       50   LUTJANU   CAMPEC      0 0.000000
## 6      1.63       10   LUTJANU   CAMPEC      0 0.000000

Select Summer Data

location_gearST_redsnapper_summer<- location_gearST_redsnapper %>% dplyr::filter(month==c(6,7))
head(location_gearST_redsnapper_summer)
##   STATIONID DECSLAT DECSLON HAULVALUE year month day GEAR_SIZE GEAR_TYPE
## 1       505   30.18  -88.31         G 1997     6   4        40        ST
## 2       507   30.03  -88.46         G 1997     6   4        40        ST
## 3       509   30.00  -88.25         G 1997     6   4        40        ST
## 4       511   30.10  -88.09         G 1997     6   4        40        ST
## 5      2493   30.18  -88.05         G 1991     6   3        40        ST
## 6      2495   30.22  -88.28         G 1991     6   3        40        ST
##   MESH_SIZE MIN_FISH GENUS_BGS SPEC_BGS CNTEXP CPUE
## 1      1.63       18   LUTJANU   CAMPEC      0    0
## 2      1.63       14   LUTJANU   CAMPEC      0    0
## 3      1.63       10   LUTJANU   CAMPEC      0    0
## 4      1.63       17   LUTJANU   CAMPEC      0    0
## 5      1.63       14   LUTJANU   CAMPEC      0    0
## 6      1.63       10   LUTJANU   CAMPEC      0    0

SEAMAP Effort

The total sampling effort between 1882 and 2017 was 11,000 hours.

Summer CPUE Over Time

NOAA Data Munging