afsc-assessments / afscdata

An R package for data extraction of AFSC survey and fishery data
https://afsc-assessments.github.io/afscdata/
Other
2 stars 0 forks source link

add query for lls rpns/rpws #18

Closed JaneSullivan-NOAA closed 1 year ago

JaneSullivan-NOAA commented 1 year ago

addresses #17, also fixes typo in setup_folders()

tested with:

species = '20510'
species2 = 10110
year = 2022
area = 'GOA'
db = akfin

afscdata::setup_folders(year = year)

q_lls_rpn(year = year, species = species, by = 'akwide', db = akfin, save = FALSE) # testing sablefish and ignore area msgs
q_lls_rpn(year = year, species = species2, by = 'akwide', db = akfin, save = FALSE) # supposed to be an error, no akwide rpns for non-sabie
q_lls_rpn(year = year, species = species, area = "bsai", by = 'fmpsubarea', db = akfin, save = FALSE) 
q_lls_rpn(year = year, species = species2, area = c("goop", "bsai"), by = 'fmpsubarea', db = akfin, save = FALSE) # supposed to be an error
q_lls_rpn(year = year, species = species2, area = "ai", by = 'goop', db = akfin, save = FALSE) # supposed to be an error
q_lls_rpn(year = year, species = species, area = c("goa", "bsai"), by = 'fmpsubarea', db = akfin, save = FALSE) 
q_lls_rpn(year = year, species = species2, area = c("bs"), by = 'councilarea', db = akfin, save = FALSE)
q_lls_rpn(year = year, species = species, area = c("goa"), by = 'geoarea', db = akfin, save = FALSE)
q_lls_rpn(year = year, species = species2, area = "bs", by = 'depth', db = akfin, save = FALSE)
BenWilliams-NOAA commented 1 year ago

merged ll query to main - previously addressed same comments - so brought straight in to avoid merge conflicts. nice work!