q_bts_specimen.Rd
query bottom trawl survey specimen data from the AFSC server
q_bts_specimen(year, species, area, db, print_sql = FALSE, save = TRUE)
max year to retrieve data from
5 digit species code (e.g., 10110) - can place multiple in a vector c(10110, 10130)
bs, ai, goa, or hwc, wc, hg, hbs - can do multiples c("bs","ai")
data server to connect to (afsc)
outputs the sql query instead of calling the data (default: false)
saves a file to the data/raw folder, otherwise sends output to global enviro (default: true)
saves bts length data as data/raw/bts_length_data.csv or outputs to the global environment, also saves a copy of the SQL code used for the query and stores it in the data/sql folder.
if (FALSE) {
db <- afscdata::connect("afsc")
q_bts_length(year=2022, species=21921, area = "goa", db = db)
}