Skip to contents

Pulls cruise, haul, catch, and stratum information for the region, years, and species of interest.

Usage

get_data(
  year_set = c(1996, 1999),
  survey_set = c("GOA"),
  spp_codes = c(21720, 30060, 10110),
  haul_type = 3,
  abundance_haul = c("Y", "N")[1],
  taxonomic_source = c("RACEBASE.SPECIES", "GAP_PRODUCTS.TAXONOMIC_CLASSIFICATION")[1],
  na_rm_strata = FALSE,
  sql_channel = NULL,
  pull_lengths = FALSE
)

Arguments

year_set

numeric or integer vector of years

survey_set

character string. One of c("GOA", "AI", "EBS", "NBS", "BSS").

spp_codes

two-column dataframe of species codes (column name SPECIES_CODE) and GROUP name (column name GROUP). For single-species, the GROUP and species codes can be the same. Examples: 1) data.frame("SPECIES_CODE" = c(21720, 21220, 21230, 21232), "GROUP" = c(21720, "Grenadiers", "Grenadiers", "Grenadiers")) # for taxon groups 2) c(21720, 21740, 10110) # for single taxa 3) NULL # for all species present in within the combination of survey_set and year_set

haul_type

integer. Defaults to haul type "3" for Standard bottom sample (preprogrammed station) used for biomass estimation

abundance_haul

character string. "Y" are abundance hauls and "N" are other hauls.

taxonomic_source

character string. Table used to source taxonomic information. One of two options: "RACEBASE.SPECIES" (default) or "GAP_PRODUCTS.TAXONOMIC_CLASSIFICATION". "GAP_PRODUCTS.TAXONOMIC_CLASSIFICATION" is still a provisional table is an option for testing only.

na_rm_strata

boolean. Remove hauls with NA stratum information. Defaults to FALSE.

sql_channel

connection created via gapindex::get_connected()

pull_lengths

boolean T/F. Should lengths and specimen data be pulled? Defaults to FALSE for speed.

Value

a named list containing survey, cruise, haul, catch, specimen (if pull_lengths == TRUE), length (if pull_lengths == TRUE), species, stratum information for the survey, years, and species of interest.