MargaretSiple-NOAA / goa-ai-data-reports

Automate data reports for GOA and AI surveys
1 stars 1 forks source link

Do we want to include diversity for diff species groups in the intro? #26

Closed MargaretSiple-NOAA closed 1 year ago

MargaretSiple-NOAA commented 1 year ago

From ned: My initial thought is that we can eliminate this phrase from the Abstract. My second is that this is some interesting information, but seems weird we'd only cite it for elasmos. This bears some thought. I think this is interesting information but begs the question, why not count species richness for flatfishes, roundfishes, and rockfishes? The bigger question is, do we want to compare species richness, species diversity, or some other community complexity measure as part of the data processed report? Given the likely audience for this document, I think we don't need to even though it bugs me to say it because a) I think it's interesting and b) I got a start on writing the SQLPlus script that would provide the answers (see below). I'd be happy to discuss this point though.

select a.cruise, decode(c.inpfc_area, 'Southern Bering Sea','Eastern Aleutians',c.inpfc_area) area_name, count(distinct b.species_code) elasmo_taxon_richness
from racebase.haul a, racebase.catch b, goa.goa_strata c
where a.region = 'AI'
and a.cruise >= 199101
and a.abundance_haul = 'Y'
and a.hauljoin = b.hauljoin
and b.species_code in (
select species_code
from racebase.species
where species_code between 150 and 711 -- sharks and skates
and species_name not like ('%egg%') -- eliminates records of egg cases
)
and a.region = c.survey
and a.stratum = c.stratum
group by a.cruise, decode(c.inpfc_area,'Southern Bering Sea','Eastern Aleutians',c.inpfc_area)
order by a.cruise, elasmo_taxon_richness desc

/ -- most years elasmo species richness is higher in the EAI/SBS but occasionally and recently it's been the CAI.

MargaretSiple-NOAA commented 1 year ago

I agree that it would be interesting and probably helpful to someone if we reported more community measures in the data report. As a first step, I have included a table that Sarah wrote the script for, which provides species richness by family and INPFC area for the current year (in the script it's called subregion_fam_div and is included in the first part of the results, I believe). I think when we get to things like Shannon diversity, those are more analytical indices that are probably the purview of the ESRs. So! I am including this SQL script in our check_values_against_legacy.Rmd file where I compare outputs between SQL and R, so we have it, and closing this issue for now -- feel free to reopen if you feel strongly about including them.