PacFIN.BDS.Extraction: PacFIN Biological Data Sample (BDS) Extraction

Description Usage Arguments Value Author(s) Examples

View source: R/PacFIN.BDS.Extraction.R

Description

Extract commercial fisheries BDS data recorded by port samplers deployed at fish processing plants. This data is archived in the Comprehensive_BDS_Comm table contained within the PacFIN (https://pacfin.psmfc.org/) database.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
PacFIN.BDS.Extraction(
  PACFIN_SPECIES_CODE = "'CNRY'",
  UID = PacFIN.Login,
  PWD = PacFIN.PW,
  minYr = 1900,
  maxYr = 2100,
  verbose = TRUE,
  PacFIN.Catch.Dahl = NULL,
  addColsWithLegacyNames = TRUE
)

Arguments

PACFIN_SPECIES_CODE

A character vector for the main PacFIN species code of a species e.g.: PACFIN_SPECIES_CODE = "'SABL'". (Nominal species codes are not used in BDS.)

UID

A character vector of for the PacFIN login. The default is 'PacFIN.Login', which can be set prior to running this function.

PWD

A character vector of for the PacFIN password. The default is 'PacFIN.PW', which can be set prior to running this function.

minYr

The minimum year for which data is to be extracted.

maxYr

The maximum year for which data is to be extracted.

verbose

When TRUE (the default), verbose output will be printed.

PacFIN.Catch.Dahl

An R data frame with FTID, catch, and Dahl sector information for the species given in the PACFIN_SPECIES_CODE argument. This is normally supplied via the CompFT data frame in the output R list from the PacFIN.Catch.Extraction() function run using the same species. The Dahl sector information will be matched onto the BDS data using FTID.

addColsWithLegacyNames

When TRUE, historically used columns will be copied and given legacy names from tables used before the creation of the Comprehensive_BDS_Comm table. The default is currently TRUE.

Value

An R data frame containing BDS information for the species given in the PACFIN_SPECIES_CODE argument.

Author(s)

John R. Wallace

Examples

1
2
3
4
PacFIN.Login <- "jonesj" 
PacFIN.PW <- "????????"   
CNRY.Catch <- PacFIN.Catch.Extraction("('CNRY','CNR1')", minYr = 2015, maxYr = 2017)
CNRY.BDS <- PacFIN.BDS.Extraction("'CNRY'", minYr = 2015, maxYr = 2017, PacFIN.Catch.Dahl = CNRY.Catch$CompFT, verbose = FALSE)

John-R-Wallace-NOAA/PacFIN.Data.Extraction documentation built on March 2, 2021, 12:12 a.m.