get_codelist: Get a list of available options, e.g., code_list, from PacFIN

View source: R/get_codelist.R

get_codelistR Documentation

Get a list of available options, e.g., code_list, from PacFIN

Description

Get a data frame with options available in PacFIN and their descriptions. PacFIN documentation refers to these data frames as code_lists, thus the function name get_codelist helps explain what we are getting.

Usage

get_codelist(x = c("GRID", "INPFC", "PORT"))

Arguments

x

A character value specifying which code_list you want. See the function call for the available lists or utils::methods("get_codelist") for a list of all of the available .S3methods.

Details

S3: This is an S3 class object, of which I am not very familiar with. Thus, feel free to provide comments on the code or submit an issue if you have ideas or corrections.

source: All PacFIN code lists are publicly available. As time progresses, I hope to have all lists available within R through code_lists. If you have time to add any of this functionality, feel free to submit a pull request and thank you in advance for collaborating.

Value

A data frame with the following potential columns, where the column names are always in all caps:

  • TYPE : integer value of 1 (gear code), 2 (gear group), or 3 (all)

  • GRID : three letter grid or gear type code

  • GROUP : three letter gear grouping code

  • ARID : mapping of sub area to areas

  • INPFC : International North Pacific Fisheries Commission (INPFC) Area code used in PacFIN

  • TYPE : classification of tree structure, i.e., if it is a subarea

  • COUNCIL : the management council that the area falls within

  • PCID : character port code

  • AGID : agency code, e.g., "W" for Washington

  • PORT : numberic port code

  • SHORT : short description

  • DESCRIPTION : long, detailed description

Examples

availablegrids <- get_codelist("GRID")
availableports <- get_codelist("PORT")


nwfsc-assess/PacFIN.Utilities documentation built on July 20, 2024, 8:42 a.m.