Function that connects to AKFIN database (using afscdata package) and pulls catch per-unit-effort (cpue), length frequency (lfreq), age-length specimen (specimen), survey strata (strata), and species information (species) data from the GAP_PRODUCTS tables

query_data(survey, region, species, yrs = NULL)

Arguments

survey

survey number for gap_products survey_definition_id (ai = 52, goa = 47, ebs = 98, nbs = 143, ebs slope = 78, ebs & nbs = c(98, 143))

region

region description for output data file (i.e., 'goa')

species

species_codes, i.e., c(10110, 21740)

yrs

minimum survey year to consider (default = NULL)

Value

a list of necessary data sources, dataframes are also written to csv files within the 'data/region' folder.