summarize_grid: Summarize vessel grid by type, month, diel, and grid_id

View source: R/summarize_grid.R

summarize_gridR Documentation

Summarize vessel grid by type, month, diel, and grid_id

Description

This function is not typically called by the user. This is essentially a wrapper for a ⁠dplyr::group_by() ... summarize()⁠ sequence.

Usage

summarize_grid(vgrid)

Arguments

vgrid

An interpolated record of vessel position fixes, as produced by shipstrike::vessel_grid().

Value

A list with two slots:

  • grid holds a data.frame in which each row corresponds to a single grid cell within a single month within a single diel period, and the columns speed, length, width, and draft record the metrics for each vessel that enters the cell, with the metric for each transit separated by an underscore (⁠_⁠). The column n indicates the number of transits that intersected the grid cell.

  • params.ship holds a data.frame in which each row corresponds to vessel parameters during the transit of a single grid cell; there is a row for each grid cell intersected across all transits, such that this data.frame represents the spatially weighted distribution of characteristics to pass to the encounter_simulator(). This dataset has three columns: v.ship (speed, in knots), l.ship (length, in meters), and w.ship (beam width, in meters). Pass this slot to the params.ship input in encounter_simulator().


ericmkeen/shipstrike documentation built on May 21, 2023, 7:05 a.m.