assign_stocks: Function to assign ICES stocks to data.

View source: R/FleetSegmentation.R

assign_stocksR Documentation

Function to assign ICES stocks to data.

Description

This function assigns ICES stocks to catch data based on the caught species and the FAO fishing area where it was caught. Due to limits in available data, especially on a fine spatial resolution, not all ICES-stocks can be taken into account. Therefore, stocks of Nephrops norvegicus and Ammodytes spp. are based on EU definitions, not on ICES definitions. Additionally, the function automatically creates stocks based on species name and FAO area for species which are caught in larger quantities (> 10000 kg) but are not part of defined ICES-stock. This feature can be shut off if the user decides not to apply the procedure and use only defined ICES-stocks.

Usage

assign_stocks(
  data,
  reduce = T,
  auto.generate = T,
  threshold.auto.generate = 100,
  min.share = 0
)

Arguments

data

A basic catchdata frame consisting of 4 columns: 1) A unique ID for each ship. 2) The 3-letter species code for the caught species as specified by ICES. 3) The full area code of the division where the fish was caught. The area can be an FAO area, e.g. "27.4.b" for Central North Sea or "27.5.b.1" for Faroe Plateau. If the fishing area is one of the Mediterranean Management area, please indicate "GSA", e.g. "GSA 17". 4) The catch weight of the respective species in the respective area, in kg.

reduce

Indicates, whether or not the resulting data frame is reduced to Ship ID, ICES stock and catch weight. Defaults to TRUE. Turned to FALSE, the resulting data frame will resemble the original data with the ICES-Stock column added. This format is used for control and correction purposes, but not for further calculations.

auto.generate

Indicates whether or stocks should be automatically generated for a) species, which are not assessed in ICES-Stocks or b) assessed by ICES, but caught out of stock-managed areas. The automatically generated stocks comprise the species name and the FAO area. The relevant quantity is defined by the argument threshold.auto.generate

threshold.auto.generate

Threshold of automatic generation of ICES stocks. Only relevant if auto.generate = T. Defaults to 100.

min.share

The minimal share a stock has to have on at least one vessels catch to be included in the stock dataframe. Defaults to 0, i.e. every stock is retained by default.

Examples

data <- example_catchdata
stockdata <- assign_stocks(data=data)
stockdata <- assign_stocks(data=data, reduce=FALSE, auto.generate=FALSE)

ESulanke/FleetSegmentation documentation built on March 27, 2023, 10:13 p.m.