q_catch_foreign | R Documentation |
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)
year |
max year to retrieve data from |
species |
common name (e.g., "sablefish" or "all flounders") - can call multiple species |
area |
numeric area digit code - multiples is ok |
db |
data server to connect to (akfin) |
print_sql |
outputs the sql query instead of calling the data (default: false) - save must be false |
save |
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.
## Not run:
db <- afscdata::connect()
q_catch_foreign(year=2022, species="sablefish", area = 54:57, db = db)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.