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 2 forks source link

Data request for species rougheye/blackspotted rockfish #129

Closed gertsevv closed 3 weeks ago

gertsevv commented 1 month ago

Identify the common name(s) or PacFIN species code(s)

BSPR BLACKSPOTTED ROCKFISH REYE ROUGHEYE ROCKFISH RBR1 NOM. ROUGHEYE + BLACKSPOT UDW1 SHORTRAKER+ROUGHEYE

Type of data needed

catch, biological data

Additional information

Catch (landings) to be included in the model as two fleets - trawl and non trawl. Trawl includes bottom and midwater trawl gears, and non trawl would include the rest.

Do you you have clearance to access these data?

kellijohnson-NOAA commented 1 month ago

@gertsevv I pulled the data that are available using a script that I placed on the server Assessments\CurrentAssessments\blackspotted_rougheye_2025\data\pacfin But, there are no catches for "UDW1", is this expected or something that should be looked into more? Additionally, the duplicated records should be looked into more and the respective state agencies should be notified. The data are in the previously mentioned folder. I will leave the issue open for you to either close or leave comments if you need anything additional from me.

# Pull data for blackspotted and rougheye from PacFIN
# Author: Kelli F. Johnson

actual_codes <- c("BSPR", "REYE")
vlada_F <- PacFIN.Utilities::PullCatch.PacFIN(
  pacfin_species_code = c(actual_codes, "RBR1", "UDW1"),
  addnominal = FALSE
)

# The following PACFIN_SPECIES_CODE(s) were found:
#   PACFIN_SPECIES_CODE      n
# 1              'BSPR'   8992
# 2              'RBR1'   1987
# 3              'REYE' 276108

vlada_T <- PacFIN.Utilities::PullCatch.PacFIN(
  pacfin_species_code = c(actual_codes),
  addnominal = TRUE
)
# The following nominal species codes were added: BSP1 and REY1

# The following PACFIN_SPECIES_CODE(s) were found:
#   PACFIN_SPECIES_CODE      n
# 1              'BSP1'     17
# 2              'BSPR'   8992
# 3              'REY1'     98
# 4              'REYE' 276108

# No need to include nominal codes here
vlada_bds <- PacFIN.Utilities::PullBDS.PacFIN(
  pacfin_species_code = c(actual_codes)
)
# The following PACFIN_SPECIES_CODE(s) were found:
#   PACFIN_SPECIES_CODE     n
# 1              'BSPR'   853
# 2              'REYE' 56039

# Warning: The downloaded data contains duplicated entries that will be
# removed prior to returning the data. Please notify the agency that
# provided the following duplicated samples:
# # A tibble: 14 × 4
# # Groups:   AGENCY_CODE, SAMPLE_YEAR, SAMPLE_NUMBER [14]
#    AGENCY_CODE SAMPLE_YEAR SAMPLE_NUMBER     n
#    <chr>             <int> <chr>         <int>
#  1 C                  2021 2021220270187     5
#  2 C                  2021 2021220270188     3
#  3 C                  2021 2021220270192     2
#  4 C                  2021 2021220370229     1
#  5 C                  2021 2021220370251     3
#  6 C                  2021 2021220470353     1
#  7 C                  2021 2021220470367     1
#  8 C                  2021 2021220470370     6
#  9 C                  2022 2022220170081     1
# 10 C                  2022 2022220270163     1
# 11 C                  2022 2022220370284     3
# 12 C                  2022 2022220470297    12
# 13 C                  2022 2022220470299     1
# 14 C                  2022 2022223160024     1
gertsevv commented 1 month ago

Thank you, Kelli! I will go over data and will let you know in case of questions.

Vlada —

On Sunday, October 6, 2024, Kelli Johnson @.***> wrote:

@gertsevv https://github.com/gertsevv I pulled the data that are available using a script that I placed on the server Assessments\CurrentAssessments\blackspotted_rougheye_2025\data\pacfin But, there are no catches for "UDW1", is this expected or something that should be looked into more? Additionally, the duplicated records should be looked into more and the respective state agencies should be notified. The data are in the previously mentioned folder. I will leave the issue open for you to either close or leave comments if you need anything additional from me.

Pull data for blackspotted and rougheye from PacFIN

Author: Kelli F. Johnson

actual_codes <- c("BSPR", "REYE") vlada_F <- PacFIN.Utilities::PullCatch.PacFIN( pacfin_species_code = c(actual_codes, "RBR1", "UDW1"), addnominal = FALSE )

The following PACFIN_SPECIES_CODE(s) were found:

PACFIN_SPECIES_CODE n

1 'BSPR' 8992

2 'RBR1' 1987

3 'REYE' 276108

vlada_T <- PacFIN.Utilities::PullCatch.PacFIN( pacfin_species_code = c(actual_codes), addnominal = TRUE )

The following nominal species codes were added: BSP1 and REY1

The following PACFIN_SPECIES_CODE(s) were found:

PACFIN_SPECIES_CODE n

1 'BSP1' 17

2 'BSPR' 8992

3 'REY1' 98

4 'REYE' 276108

No need to include nominal codes here

vlada_bds <- PacFIN.Utilities::PullBDS.PacFIN( pacfin_species_code = c(actual_codes) )

The following PACFIN_SPECIES_CODE(s) were found:

PACFIN_SPECIES_CODE n

1 'BSPR' 853

2 'REYE' 56039

Warning: The downloaded data contains duplicated entries that will be

removed prior to returning the data. Please notify the agency that

provided the following duplicated samples:

A tibble: 14 × 4

Groups: AGENCY_CODE, SAMPLE_YEAR, SAMPLE_NUMBER [14]

AGENCY_CODE SAMPLE_YEAR SAMPLE_NUMBER n

1 C 2021 2021220270187 5

2 C 2021 2021220270188 3

3 C 2021 2021220270192 2

4 C 2021 2021220370229 1

5 C 2021 2021220370251 3

6 C 2021 2021220470353 1

7 C 2021 2021220470367 1

8 C 2021 2021220470370 6

9 C 2022 2022220170081 1

10 C 2022 2022220270163 1

11 C 2022 2022220370284 3

12 C 2022 2022220470297 12

13 C 2022 2022220470299 1

14 C 2022 2022223160024 1

— Reply to this email directly, view it on GitHub https://github.com/pfmc-assessments/PacFIN.Utilities/issues/129#issuecomment-2395985512, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFPYW3A46HYKV6YSZMQKYFDZ2IQQTAVCNFSM6AAAAABPMQ6RS2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGOJVHE4DKNJRGI . You are receiving this because you were mentioned.Message ID: @.***>

-- Vladlena Gertseva, Ph.D. https://www.fisheries.noaa.gov/contact/vladlena-gertseva-phd Research Fishery Biologist

Northwest Fisheries Science Center | NOAA Fisheries

Associate Editor Ecological Modelling | Elsevier Associate Affiliate Professor School of Aquatic and Fishery Science | University of Washington

https://www.fisheries.noaa.gov/

aliwhitman commented 1 month ago

I thought UWD1 might be from our URCK/POP category reconstruction, but it's not. So unfortunately, I can't offer any ideas on the UWD1 - it's not listed as a current PacFIN code?

kellijohnson-NOAA commented 1 month ago

@gertsevv did you mean UDW1, which is for shortraker and rougheye?

gertsevv commented 1 month ago

Correct. These are all categories where rougheye can be landed. I received them from John Wallace (copied here).

Vlada

On Wed, Oct 9, 2024 at 9:05 PM Kelli Johnson @.***> wrote:

@gertsevv https://github.com/gertsevv did you mean UDW1, which is for shortraker and rougheye?

— Reply to this email directly, view it on GitHub https://github.com/pfmc-assessments/PacFIN.Utilities/issues/129#issuecomment-2403909396, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFPYW3HLC6XMIBE64ZNXVYLZ2X4HFAVCNFSM6AAAAABPMQ6RS2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMBTHEYDSMZZGY . You are receiving this because you were mentioned.Message ID: @.***>

-- Vladlena Gertseva, Ph.D. https://www.fisheries.noaa.gov/contact/vladlena-gertseva-phd Research Fishery Biologist

Northwest Fisheries Science Center | NOAA Fisheries

Associate Editor Ecological Modelling | Elsevier Associate Affiliate Professor School of Aquatic and Fishery Science | University of Washington

https://www.fisheries.noaa.gov/