q_bts_length.Rd
query bottom trawl survey length data from the AFSC server
q_bts_length(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) - save must be 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=10110, area = "goa", db = db)
}