Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LLS length comps (all species) and age comps (just sablefish) #19

Open
JaneSullivan-NOAA opened this issue Mar 3, 2023 · 4 comments
Open

Comments

@JaneSullivan-NOAA
Copy link
Contributor

@BenWilliams-NOAA feel free to assign this to me once you've had a chance to review the lls PR. thank you

@BenWilliams-NOAA
Copy link
Contributor

added

@JaneSullivan-NOAA
Copy link
Contributor Author

@BenWilliams-NOAA I don't see the query in the list please be aware of the following:

# Methods to obtain RPN-weighted lengths were updated for 2021. Records with
# length = 999 now exist to account for instances when there was catch in a
# stratum but no lengths collected. The 999 lengths ensure RPNs sum properly to
# the area-level but should not be included in the length compositions.
# Currently, the user must join on `area_view_lls` in order to filter out areas
# not used in RPN calculations (i.e. `exploitable = 1`).

lens <- sqlQuery(channel_akfin, query = ("
                select    *
                from      afsc.lls_length_rpn_by_area_all_strata
                where     species_code = '21720' and 
                          country = 'United States' and 
                          year >= 1990 and
                          council_sablefish_management_area not in ('Bering Sea', 'Aleutians') and
                          length < 999
                order by  year asc
                ")) %>% 
  rename_all(tolower)

areaview <- sqlQuery(channel_akfin, query = ("
                select distinct   council_sablefish_management_area, council_management_area, 
                                  fmp_management_area, geographic_area_name, 
                                  exploitable, area_code
                from              afsc.lls_area_view
                ")) %>% 
  rename_all(tolower)

lens <- lens %>% 
  left_join(areaview, by = c("area_code", "geographic_area_name", "council_sablefish_management_area"))

# Filter out samples from areas that are not used in RPN calculations
lens <- lens %>% filter(exploitable == 1)

@BenWilliams-NOAA
Copy link
Contributor

BenWilliams-NOAA commented Mar 7, 2023

oops - got ahead of myself!

This looks to only apply to sablefish yeah?

@JaneSullivan-NOAA
Copy link
Contributor Author

JaneSullivan-NOAA commented Mar 7, 2023

@BenWilliams-NOAA LLS lengths are fit in a model or reported in the SAFE for sablefish, pcod, REBS, shortraker, thornyheads, and turbot... there's probably more that I'm forgetting about

@JaneSullivan-NOAA JaneSullivan-NOAA changed the title LLS length comps LLS length comps (all species) and age comps (just sablefish) Mar 8, 2023
@JaneSullivan-NOAA JaneSullivan-NOAA linked a pull request Mar 9, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants