afsc-gap-products / gap_products

This repository supports code used to create tables in the GAP_PRODUCTS Oracle schema. These tables include the master production tables, tables shared with AKFIN, and tables publicly shared on FOSS.
https://afsc-gap-products.github.io/gap_products/
Creative Commons Zero v1.0 Universal
5 stars 5 forks source link

Negative agecomps #39

Closed MattCallahan-NOAA closed 2 months ago

MattCallahan-NOAA commented 2 months ago

Question

Why are there negative age values in the agecomp table? E.g. GOA arrowtooth flounder has a bunch of -9s and a -99.

zoyafuso-NOAA commented 2 months ago

There are cases in which a sex-size class is not represented in the age-length key. The abundance in those sex-size classes are totaled and reported with an AGE code of -9. Hi @MattCallahan-NOAA

The -9 and -99 codes are conventions that are used in both the legacy and GAP_PRODUCTS sizecomp and agecomp tables.

First, There are cases in which a sex-size class is not represented in the age-length key. The abundance in those sex-size classes are totaled and reported with an AGE code of -9. Second, there are cases where there are no stratum-level length data, and so the abundance in that stratum is not transformed into age classes. This is reported with an AGE value of -99 and SEX value of 3 (not sexed) and will not have values for LENGTH_MM_MEAN and LENGTH_MM_SD.

The value that these codes have are more for accounting purposes, they have little biological interpretation. When querying the agecomp table, add the filter WHERE AGE >= 0 and similarly in the sizecomp table, add the filter WHERE LENGTH_MM > 0.

MattCallahan-NOAA commented 2 months ago

Thanks Zack, it might be helpful to add that explanation to the GAP-Production-Data-Documentation.

zoyafuso-NOAA commented 2 months ago

Yeah that's a good idea, maybe the column descriptions or something. I'll close it when we update that. Thanks!

zoyafuso-NOAA commented 2 months ago

@EmilyMarkowitz-NOAA I amended the descriptions of the AGE and LENGTH_MM fields in the Future Oracle spreadsheet to include the information above. I think that's appropriate?