Package 'framrosetta'

Title: What the Package Does (Title Case)
Description: More about what it does (maybe more than one line) Use four spaces when indenting paragraphs within the Description.
Authors: Who wrote it
Maintainer: The package maintainer <[email protected]>
License: MIT + file LICENSE
Version: 0.1.0
Built: 2024-11-01 17:17:48 UTC
Source: https://github.com/FRAMverse/framrosetta

Help Index


Lookup table for Chinook stock IDs from BkFRAM to normal FRAM

Description

This table is based on Chinook stock tables from pre-season 2024. Additional stock may be added in the future (splitting out stock aggregates). The 'bk_lookupfun_chin()' function accommodates this.

Usage

bk_lookup_chin

Format

A data frame with 116 rows and 3 columns:

stock_name_bk

Stock name

bk_stock_id

Stock ID in the BackwardsFRAM table

stock_id

Stock ID anywhere else in FRAM and TAMM


Generate Chinook bk_fram look-up table

Description

At present the FRAM databases use a differents stock_id numbering system in the BackwardsFRAM table than everywhere else. The dataframe 'bk_lookup_chin' provides a lookup table based on the stocks used in Preseason 2024. However, we are working to modify FRAM to support splitting Chinook stock aggregates, which will lead to increased numbers of StockIDs. 'bk_lookupfun_chin' provides an appropruate lookup table based on the 'max_stock' argument, either returning ‘bk_lookup_chin' (if max_stock is not provided or doesn’t exceed the stocks in 'bk_lookup_chin') or extending the dataframe with new stock ids based on the numbering conventions of the bk_stock_id.

Usage

bk_lookupfun_chin(max_stock = NA)

Arguments

max_stock

Positive integer representing the largest *Normal* stock id (stock ids outside of the BackwardsFram table). As of Preseason 2024, there are 78 stocks; splitting stocks might increase this (e.g. 80, 82, 84). Defaults to NA.

Value

Tibble of lookup table. '$stock_name_bk' gives numan-readable stock names; '$bk_stock_id' gives the "StockID" used in backwards FRAM; '$stock_id' gives the StockID used everywhere else. NAs in '$stock_id' correspond to "totalled" stocks, which are used in backwards FRAM and nowhere else.

Examples

temp = bk_lookupfun_chin(80)
tail(temp)

Chinook fishery information

Description

Mapping of fishery_id to fishery name for Chinook salmon, taken from the 'Fishery' table of the Chinook FRAM database.

Usage

fishery_chinook_fram

Format

A data frame with 74 rows and 5 columns:

species

Species name

version_number
fishery_id

Chinook fishery id number in FRAM

fishery_name

Chinook fishery name in FRAM

fishery_title

consistent and more human readable version of 'fishery_name'

Source

2024 Pre-Season Chinook DB.mdb


Coho fishery information

Description

Mapping of fishery_id to fishery name for Coho salmon, taken from the 'Fishery' table of the Coho FRAM database.

Usage

fishery_coho_fram

Format

A data frame with 198 rows and 5 columns:

species

Species name

version_number
fishery_id

Coho fishery id number in FRAM

fishery_name

Coho fishery name in FRAM

fishery_title

consistent and more human readable version of 'fishery_name'

Source

2024NOF_CohoFRAMdatabase_distribution.mdb


Lookup table for FRAM to RMIS recoveries

Description

For more about the Regional Mark Information System (RMIS), see https://www.rmpc.org/.

Usage

rmis_fram

Format

## 'rmis_fram' A data frame with 225,390 rows and 4 columns:

psc_code

RMIS PSC Recovery Location

gear

Gear Code

fishery_id

FRAM fishery ID

fishery_name

FRAM fishery name

Source

<https://github.com/FRAMverse/framr/blob/master/xlsx/lu_coho.xlsx


Chinook stock information

Description

Mapping of stock_id to stock name for Chinook salmon, taken from the 'Stock' table of the Chinook FRAM database.

Usage

stock_chinook_fram

Format

A data frame with 78 rows and 7 columns:

species

Species name

stock_version
stock_id

Chinook stock id number in FRAM

production_region_number
management_unit_number
stock_name

Chinook stock name in FRAM

stock_long_name

'stock_name' but more human readable

Source

2024 Pre-Season Chinook DB.mdb


Coho stock information

Description

Mapping of stock_id to stock name for Coho salmon, taken from the 'Stock' table of the Coho FRAM database.

Usage

stock_coho_fram

Format

A data frame with 78 rows and 7 columns:

species

Species name

stock_version
stock_id

Coho stock id number in FRAM

production_region_number
management_unit_number
stock_name

Coho stock name in FRAM

stock_long_name

'stock_name' but more human readable

Source

2024NOF_CohoFRAMdatabase_distribution.mdb


Chinook timestep information stock information

Description

Mapping of timestep numbers to dates in the year, taken from the 'TimeStep' table of the Chinook FRAM database

Usage

timestep_chinook_fram

Format

A data frame with 4 rows and 5 columns:

species

Species name

version_number
time_step_id

id number for the time step

time_step_name

Span of each timestep. Timesteps start on the first of the month, and end on the last of the month. Note that 'Oct-Apr-2' is highlighting that timestep 4 runs from October of the current year to April of the NEXT year (equivalent to timestep 1 of the following year).

time_step_title

'time_step_name', but months are written out

Source

2024 Pre-Season Chinook DB.mdb


Coho timestep information stock information

Description

Mapping of timestep numbers to dates in the year, taken from the 'TimeStep' table of the Chinook FRAM database

Usage

timestep_coho_fram

Format

A data frame with 5 rows and 5 columns:

species

Species name

version_number
time_step_id

id number for the time step

time_step_name

Span of each timestep. Timesteps start on the first of the month, and end on the last of the month.

time_step_title

'time_step_name', but months are written out consistently

Source

2024NOF_CohoFRAMdatabase_distribution.mdb


Lookup table for FRAM to TOCAS

Description

Lookup table for FRAM to TOCAS

Usage

tocas_fram

Format

## 'tocas_fram' A data frame with 10,462 rows and 6 columns:

fisher_type

1 = Non-Treaty / 2 = Treaty

gear

Gear Code

dispostion

Dispostion. "COMM" = Commercial, "C&SF" = Ceremonial and Subsistence fishing, "ORGN" = , "Test" and "TEST" = Test fishery (?), TKHM = ??

catch_area

Catch area code, not zero-padded

fishery_id

FRAM fishery ID

fishery_name

FRAM fishery name

Source

<https://github.com/FRAMverse/framr/blob/master/xlsx/lu_coho.xlsx


Lookup table for FRAM to WAFT

Description

Lookup table for FRAM to WAFT

Usage

waft_fram

Format

## 'waft_fram' A data frame with 10,462 rows and 6 columns:

fishery_type

1 = Non-Treaty / 2 = Treaty

gear

Gear Code

dispostion

Dispostion. "COMM" = Commercial, "C&SF" = Ceremonial and Subsistence fishing, "ORGN" = , "Test" and "TEST" = Test fishery (?), TKHM = ??

catch_area

Catch area code, zero-padded

fishery_id

FRAM fishery ID

fishery_name

FRAM fishery name

Source

<https://github.com/FRAMverse/framr/blob/master/xlsx/lu_coho.xlsx