Skip to contents

Search through fishery and stock lookup tables.

Usage

fishery_search(pattern, species)

stock_search(pattern, species)

Arguments

pattern

Character string of pattern to search for, case insensitive. If numeric instead, function will return the row with the corresponding stock or fishery ID.

species

"CHINOOK" or "COHO

Examples

fishery_search("kmz", "COHO")
#> # A tibble: 2 × 5
#>   species version_number fishery_id fishery_name fishery_title
#>   <chr>            <int>      <int> <chr>        <chr>        
#> 1 COHO                 1          5 Ca KMZ Spt   KMZ Sport    
#> 2 COHO                 1          6 Ca KMZ Trl   KMZ Troll    
fishery_search(50, "COHO")
#> # A tibble: 1 × 5
#>   species version_number fishery_id fishery_name fishery_title           
#>   <chr>            <int>      <int> <chr>        <chr>                   
#> 1 COHO                 1         50 GryHbr Net   Grays Harbor Estuary Net
stock_search("nooksack", "CHINOOK")
#> # A tibble: 6 × 7
#>   species stock_version stock_id production_region_number management_unit_number
#>   <chr>           <int>    <int>                    <int>                  <int>
#> 1 CHINOOK             5        4                        1                      6
#> 2 CHINOOK             5        6                        1                     10
#> 3 CHINOOK             5        2                        1                      2
#> 4 CHINOOK             5        3                        1                      5
#> 5 CHINOOK             5        5                        1                      9
#> 6 CHINOOK             5        1                        1                      1
#> # ℹ 2 more variables: stock_name <chr>, stock_long_name <chr>
stock_search(21, "CHINOOK")
#> # A tibble: 1 × 7
#>   species stock_version stock_id production_region_number management_unit_number
#>   <chr>           <int>    <int>                    <int>                  <int>
#> 1 CHINOOK             5       21                        4                      1
#> # ℹ 2 more variables: stock_name <chr>, stock_long_name <chr>