summarizer: summarizer

View source: R/summarizer.R

summarizerR Documentation

summarizer

Description

This is a tool that quickly breaks down the results of any of the fleet wrappers to provide information on the number of trips, unique vessels, unique licences, and total catch. These results can be further aggregated by Year, NAFO area, Species code, GEAR TYPE, as well as by any fields that exist in the TRIPS or SETS object of the marfis or isdb results (or both).

Usage

summarizer(
  data = NULL,
  units = "KGS",
  bySpp = TRUE,
  byYr = FALSE,
  byQuarter = FALSE,
  byGr = TRUE,
  byNAFO = FALSE,
  byCust = NULL,
  specMARF = NULL,
  specISDB = NULL,
  doMARF = T,
  doISDB = T,
  quietly = F
)

Arguments

data

default is NULL. This is the entire output from any of the fleet wrappers.

units

default is "KGS". This is the units you want weights returned in. Valid options are any of "KGS", "TONNES", "LBS".

bySpp

default is TRUE. If TRUE, the summed weights and numbers of unique trips and licence_ids will will be broken down by all identified landed species. If FALSE,aggregations will ignore differences in landed species.

byYr

default is FALSE. If TRUE, the summed weights and numbers of unique trips and licence_ids will will be broken down by each year in which a landing was identified. If FALSE, aggregations will ignore differences in year. "Year" is taken from the end date of the associated trip record (i.e. <data>$marf$MARF_SETS$T_DATE2 for MARF, and <data>$isdb$ISDB_SETS$DATE_TIME for ISDB).

byQuarter

default is FALSE. If TRUE, the summed weights and numbers of unique trips and licence_ids will will be broken down by each quarter in which a landing was identified. If FALSE, aggregations will ignore differences in year. "Year" is taken from the end date of the associated trip record (i.e. <data>$marf$MARF_SETS$T_DATE2 for MARF, and <data>$isdb$ISDB_SETS$DATE_TIME for ISDB).

byGr

default is TRUE. If TRUE, the summed weights and numbers of unique trips and licence_ids will will be broken down by all identified gear types. If FALSE, aggregations will ignore differences in gear types.

byNAFO

default is FALSE. If TRUE, the summed weights and numbers of unique trips and licence_ids will will be broken down by <reported> NAFO division in which a landing was identified. If FALSE, weights will be summed, irrespective of <reported> NAFO division.

byCust

default is NULL. This can be the name of any field found in <data>$marf$MARF_SETS by which you would like to see aggregated results

specMARF

default is NULL. If your data is for a fleet returns multiple species, you can enter an MARFIS species code here, and the MARF data will be limited to those species.

specISDB

default is NULL. If your data is for a fleet returns multiple species, you can enter an ISDB species code here, and the ISDB data will be limited to those species.

doMARF

default is TRUE. This indicates that the MARFIS results should be summarized.

doISDB

default is TRUE. This indicates that the ISDB results should be summarized.

quietly

default is FALSE. This specifies whether or not status messages should be output to the console while the scripts run.

Value

by default, a list containing an object with the results of both MARF and ISDB is returned. If either doMARF or doISDB is set to FALSE, than the returned object is a dataframe

Author(s)

Mike McMahon, Mike.McMahon@dfo-mpo.gc.ca

See Also

Other simpleproducts: get_vmstracks(), quick_map(), summarize_locations()

Examples

## Not run: 
summary <- summarizer(data = Halibut2017, byGr = TRUE)
       
## End(Not run)

Maritimes/Mar.fleets documentation built on Aug. 19, 2024, 4:42 a.m.