Package 'sfdSAR'

Title: Functions to calculate Swept area ratio and Surface and subsurface abrasion from VMS data
Description: Functions to calculate Swept area ratio and Surface and subsurface abrasion from VMS data. The data is expected to conform to the ICES WGSFD data call format.
Authors: Colin Millar [aut, cre], Carlos Pinto [aut]
Maintainer: Colin Millar <[email protected]>
License: MIT + file LICENSE
Version: 1.0.0
Built: 2024-11-01 11:16:36 UTC
Source: https://github.com/ices-tools-dev/sfdSAR

Help Index


Functions to calculate Swept area ratio and Surface and subsurface abrasion from VMS data

Description

Functions to calculate Swept area ratio and Surface and subsurface abrasion from VMS data. The data is expected to conform to the ICES WGSFD data call format.

Author(s)

Colin Millar, ICES WGSFD.

References

ICES Working Group on Spatial Fisheries Data: http://www.ices.dk/community/groups/Pages/WGSFD.aspx.


Get information related to a C-Square

Description

Extract the surface area, latitude or longitude of a 0.05 resolution C-Square.

Usage

csquare_area(csquare)

csquare_lat(csquare)

csquare_lon(csquare)

Arguments

csquare

the name of a 0.05 resolution C-Square.

Value

A vector of numeric values: latitudes, longitudes or areas.

Examples

csquare_area("1501:370:370:1")
csquare_lat("1501:370:370:1")
csquare_lon("1501:370:370:1")

Gear width models

Description

Predict the gear with of a fishing gear from its benthis classification.

Usage

linear(firstFactor, secondFactor, x)

power(firstFactor, secondFactor, x)

Arguments

firstFactor

the 'first' parameter for the model

secondFactor

the 'second' parameter for the model

x

the covariate used in the model: avg_oal (average overall length) or avg_kw (average kilo-wats engine power)

Value

A vector of predicted gear widths.

Examples

linear(1, 1, 1)

Calculate gear width from vessel characteristics

Description

Predict gear width using vessel length or engine size.

Usage

predict_gear_width(model, coefficient, data)

Arguments

model

vector of characters defining a model (see ?linear or ?power)

coefficient

coefficient names, must be columns names in data

data

a data.frame with the columns, a, b, model, .

Value

A vector of predicted gear widths.

Examples

# very simple example of how to apply this helper function
predict_gear_width("power", "avg_aol", data.frame(firstFactor = 1, secondFactor = 1, avg_aol = 1))

# use the dummy vms dataset
data(test_vms)


# get gear widths and metier lookup from ICES DB
library(icesVMS)
metier_lookup <- get_metier_lookup()
gear_widths <- get_benthis_parameters()

# join widths and lookup
library(dplyr)
aux_lookup <-
  gear_widths %>%
  right_join(metier_lookup, by = c("benthisMet" = "benthisMetiers"))

# add aux data to vms
vms <-
  aux_lookup %>%
  right_join(test_vms, by = c("leMetLevel6" = "LE_MET_level6"))

# calculate the gear width model
vms$gearWidth_model <-
  predict_gear_width(vms$gearModel, vms$gearCoefficient, vms)

Calculate surface contact

Description

Predict surface contact.

Usage

predict_surface_contact(model, fishing_hours, gear_width, fishing_speed)

Arguments

model

vector of characters defining a model (see ?surface_contact_models)

fishing_hours

the total number of hours fished.

gear_width

the average gear width.

fishing_speed

the average fishing speed.

Value

A vector of predicted gear widths.

Examples

# compute surface contact for a trawl gear, fishing for 1 hour, with
# a 85 metres trawl width, at 3 knots.
predict_surface_contact("trawl_contact", 1, 85, 3)

Surface contact models

Description

Predict the surface contact of a fishing gear

Usage

trawl_contact(fishing_hours, gear_width, fishing_speed)

danish_seine_contact(fishing_hours, gear_width, fishing_speed)

scottish_seine_contact(fishing_hours, gear_width, fishing_speed)

Arguments

fishing_hours

the number of hours of fishing

gear_width

(average) gear width in metres

fishing_speed

(average) fishing speed in knots

Value

A vector of predicted gear widths.

Examples

# compute surface contact for a trawl gear, fishing for 1 hour, with
# a 85 metres trawl width, at 3 knots.
trawl_contact(fishing_hours = 1,
              gear_width = 85,
              fishing_speed = 3)

Lookup table to aggregate metier level 6 gear groupings

Description

A table.

Usage

test_vms

Format

Data frame with containing 17 columns:

recordtype Metier level 6 gear code
country Benthis metier used to define bottom fishing pressure
year Metier level 5 gear codes
month Metier level 5 gear codes
c_square JNCC gear groupings
vessel_length_category Vessel length category
gear_code Text description of the gear code
LE_MET_level6 Metier level 6 gear code
avg_fishing_speed description ...
fishing_hours description ...
avg_oal description ...
avg_kw description ...
kw_fishinghours description ...
totweight description ...
totvalue description ...
ICES_avg_fishing_speed description ...
avg_gearWidth description ...

Details

Copmletely made up VMS data to allow SAR functions to be demonstrated.

Source

Reference to ices data call and format?

See Also

sfdSAR-package gives an overview of the package.

Examples

head(test_vms)