knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>"
)
library(magrittr)

After pulling the data (length sample data and the landings data) for a particular species a user can now use the aggregate_landings()` function to aggregate the landings and the length data. The user has several choices to make that determine how the data should be processed. All decision points are written to a logfile for the user to inspect. Many of the steps below are dictated by user inputs in the form of function arguments.

Gear

Gear is defined using the field NEGEAR which characterizes gear by a three character code. A list of gear types with their codes and descriptions can be found using comlandr::get_gears()

For example, using a value of 95% (landingsThresholdGear = .95) would select the distinct gear types, when ordered by landings, for which the cumulative sum > 95% of total landings. All other gear types (those comprising < 5% of total landings) would be combined into an otherGear category.

In the table, the gear types (050,010,100) would be retained. All other gear types would be combined together.

readr::read_csv("data/gearAgg.csv",col_names = T, show_col_types = F,skip=3) %>%
  dplyr::slice(1:8) %>% 
  kableExtra::kbl() %>%
  kableExtra::row_spec(1:3,color = "green") %>% 
  kableExtra::row_spec(4:8,color = "#d3d3d3") 

If a species_object is used the steps above are skipped since all gear aggregations are predetermined by the user

Market Category

Market categories are defined by the field MARKET_CODE which characterizes market codes by a two character code. A list of market codes for a species can be found using comlandr::get_species_itis()

If a species_object is used the steps above are skipped since all market code aggregations are predetermined by the user

The user has the option of stopping at this point (borrowLengths=F). The data returned will either be at the QTR or YEAR level depending on user inputs.

Time

The user supplies the level in which landings should be aggregated, (YEAR, QTR, or SEMESTER). All combinations of Time, NEGEAR, MARKET_CODE that do not have associated length samples borrow samples from the nearest neighbor in time. Future development: Include nearest neighbor based on spatial units and/or GEAR

Before the borrowing of length samples commences, any gear types found to not have any length samples are aggregated with the otherGear category (This does not occur if species_object is used)

The borrowing of length samples from one time interval to use in another time interval can be a subjective process that differs among species based on life history traits. To complicate matters length distributions sampled within MARKET_CODEs may have shifted over time. These issues will be dealt with at a future date. A generalized method is currently applied (Future development: Include additional options based on life history traits and fishing industry changes)

1 The method of borrowing length samples is complex and the user has several options. These methods are described below.

Aggregate to YEAR

The following are performed sequentially:

Aggregate to QTR

Aggregate to SEMESTER

All decisions made regarding where length samples are borrowed from are written to the logfile for later inspecition

Other Gear

In all methods above the otherGear category is by definition sparse. This gear type is always aggregated to annual data.

Unclassified Market Code

In all methods above the landings and length sample data for the unclassified market category, UN, are aggregated to the same level as other MARKET_CODEs.

The unclassified landings for a specific (YEAR, QTR, NEGEAR) are assumed to be a mixture of fish lengths similar to that in the observed MARKET_CODEs. Therefore the length distribution for the unclassified landings are assumed to have the same distribution as the length distributions of the landed fish in all of the known market codes combined.



NOAA-EDAB/neusCatch documentation built on Jan. 23, 2025, 3:29 a.m.