q_fish_obs.Rd
currently setup for pulling haul level detail for age or length compositions
q_fish_obs(year, species, area, db, print_sql = FALSE, save = TRUE)
max year to retrieve data from
numeric agency values e.g. c("131", "132") - must be 3 digit codes (norpac species codes)
fmp_area (GOA, BSAI) or fmp_subarea (BS, AI, WG, CG, WY, EY, SE) - also available (SEI, PWSI), can use all fmp_areas or all fmp_subareas, but don't mix the two
data server to connect to (akfin)
outputs the sql query instead of calling the data - save must be false
saves a file to the data/raw folder, otherwise sends output to global enviro (default: TRUE)
saves observer data as data/raw/fish_obs_data.csv or outputs to the global environment, save 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()
q_fish_obs(year=2022, species=301, area="goa", db=db)
}