pfmc-assessments / PacFIN.Utilities

R code to manipulate data from the PacFIN database for assessments
http://pfmc-assessments.github.io/PacFIN.Utilities
Other
7 stars 1 forks source link

Nominal species codes exist in the BDS data but were not checked for #97

Closed kellijohnson-NOAA closed 1 year ago

kellijohnson-NOAA commented 1 year ago

Describe the bug Nominal species codes exist in the BDS data but were not previously checked for. For the 2023 assessment cycle this pertains to Longspine Thornyhead with 30 lengths attributed to LSP1 in 2013. I know this is not a large number of samples but it is more the process that I am worried about.

To Reproduce

test <- PullBDS.PacFIN(c("LSP1"), verbose = TRUE)
dplyr::count(test, SAMPLE_YEAR, FISH_LENGTH

I also went to Oracle and ran the following code to get a list of all species with BDS data in PacFIN

SELECT distinct PACFIN_SPECIES_CODE
FROM PACFIN_MARTS.COMPREHENSIVE_BDS_COMM

and the following species codes with numbers are present: "LSP1" "MSC2" "RBR1", which are longspine thornyhead, miscelaneous, and NOM. ROUGHEYE + BLACKSPOTTE

@okenk this pertains to the class data.

Proposed fix Add a addnomial option to the function call.

okenk commented 1 year ago

I think with respect to the class this is not a big deal since they were just using the longspine data to understand historically what fraction of thornyhead catch was longspine vs shortspine. It is not actually being assessed. @JaneSullivan-NOAA, correct me if I am wrong.

JaneSullivan-NOAA commented 1 year ago

@okenk your statement is accurate to the best of my knowledge.

kellijohnson-NOAA commented 1 year ago

Thanks @okenk and @JaneSullivan-NOAA

I decided against adding addnominal to the function call because I would like to explicitly add the species and make future checks to PacFIN on what species are available in each data set.