q_catch_foreign.Rd
something about the species names and area codes, since they are so different from everything else? pulls data from AKFIN pre1991.foreign_blend table
q_catch_foreign(year, species, area, db, print_sql = FALSE, save = TRUE)
max year to retrieve data from
common name (e.g., "sablefish" or "all flounders") - can call multiple species
numeric area digit code - multiples is ok
data server to connect to (akfin)
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 catch data as data/raw/for_catch_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()
q_catch_foreign(year=2022, species="sablefish", area = 54:57, db = db)
}