Closed EmilyMarkowitz-NOAA closed 3 months ago
Questions: 1) What is the spatial scale at which these data were provided? Is it all regional estimates or is the idea to provide this by all the spatial scales (stratum, subarea, management area, region)? I think it's regional but just checking to make sure. 2) How many sample types are there? Shouldn't this table only be restricted to core collections? Special projects outside of the core collection are trickier because I don't think those data are in our database (although I would love to know where they live if so). 3) What is GENETICS? Is that like for special projects (e.g., eDNA, fin clips, eyeballs, etc.)? 4) In the wide-example, what is the difference between the NOTOLITH and NAGES fields? 5) Stomach Data: Is the stomach collection data in RACE_DATA somewhere? Would this table distinguish stomachs scanned at sea by stomach lab folks vs stomachs collected at sea by the stomach collector? Would this table tabulate how many stomachs have been processed either in lab or at sea? And would this include the target number of stomachs? Same questions for otoliths (tabulating target number and/or collected otoliths and/or read otoliths). Wouldn't the food habits lab already have/provide this information somewhere (idk shrug emoji). 6) I am also leaning towards providing this as a standalone materialized view that is queried along with the other AKFIN tables. It’s a non-standard request but it doesn’t take a whole lot of finagling to query unlike for example GOA_SPLIT_FRACTIONS. Do you think AKFIN would be able and/or willing to accommodate a table like this? 7) What is the timeline for development on this new table? Do we have a list of folks who have made this request so we can direct their feedback on the new table?
To build on Emily's table example, I would modify it to this:
<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
SURVEY_DEFINITION_ID | AREA_ID | SPECIES_CODE | YEAR | SPECIMEN_TYPE | N_SAMPLE | COUNT -- | -- | -- | -- | -- | -- | -- 98 | 99900 | 10110 | 2022 | LENGTH | | 98 | 99900 | 10110 | 2022 | STOMACH | | 98 | 99900 | 10110 | 2022 | OTOLITH | |
Issue
This year BS and GOA stock assessors requested summary tables of: 1) how many hauls a type of sample (e.g., lengths, otoliths) was collected at and 2) how many total samples were collected across a survey
In the past, we prepared summary "samplesize" tables with these values (
samplesize_nbs.csv
andsamplesize_ebs.csv
in the Bering Sea and possibly by request in GOA/AI(?)) from SQL scripts that relied onRACEBASE
andRACE_DATA
oracle schemata. Below is an excerpt fromsamplesize_nbs.csv
:Solution notes
Rewrite old samplesize scripts to use the
GAP_PRODUCTS.AKFIN_*
tablesWe need to modernize these scripts to use the
GAP_PRODUCTS.AKFIN_*
tables to ensure that only data from standard hauls that have been approved for stock assessments are incorporated into these summary values (aka make sure all data products match). Note that even after updating these summaries, not all summary calculations will be able to be summarized from theGAP_PRODUCTS.AKFIN_*
tables and still require a few reference and data tables inRACE_DATA
(especially for calculating the number of lengths that were collected).Decide on sharing platform** for these summary values
Options:
RACE_DATA
(not recommended)RACE_DATA
tables.AKFIN_SAMPLESIZE
(name negotiable) tableRACE_DATA
tables. This table could additionally be useful for preparing data reports and end-of-year ADFG report summaries.Decide on the table layout (wide or long) and column names
N_
for summary values to show that these are count_H
and_S
to say if the value was the number of hauls samples were collected at or total samples that were collected, respectively. Open to suggestions.GAP_PRODUCTS.AKFIN_BIOMASS
but are included here, at least temporarily, to match with old tables. We could remove these from here or move them from AKFIN_BIOMASS, depending on opinion.Tasklist
First steps
I've started the summary-tbl-ex branch to work on this issue. I've added some initial code for developing long tables with sharing options 1 (documentation example) and 3 (new
GAP_PRODUCTS.AKFIN_SAMPLESIZE
table).