Skip to contents

Estimates the most likely vessel characteristics for each mmsi from AIS messages, including ship type, length, width, draught, IMO number, and vessel name. Estimates are based on the most frequent values, giving greater weight to records with more complete information. Warnings are printed if any value of length, draught, width, or IMO cannot be converted to numeric (and is therefore set to NA) or any value of ship type or name cannot be converted to character (set to NA).

Usage

AISinfos(
  ais_data,
  threshold_length = 475,
  threshold_draught = 30,
  threshold_width = 75,
  weight_complete_data = 10
)

Arguments

ais_data

AIS data frame containing the columns mmsi, shiptype, length, width, draught, imo, and name. Another vessel identifier may be used if the column is named mmsi.

threshold_length

Maximum valid vessel length (m). Larger values are set to NA.

threshold_draught

Maximum valid draught (m). Larger values are set to NA.

threshold_width

Maximum valid vessel width (m). Larger values are set to NA.

weight_complete_data

Weight assigned to records containing both vessel length and ship type.

Value

A list containing:

  • estimated_values: Estimated vessel characteristics for each mmsi.

  • summary: Summary statistics for each mmsi, including:

    • Number of AIS positions.

    • Number of non-missing values for length, shiptype, width, draught, imo, and name.

    • All valid values observed for each characteristic.

    • The most likely value for each characteristic.

Examples

data("ais")

out <- AISinfos(ais_data = ais)
#> Warning: There was 1 warning in `dplyr::mutate()`.
#>  In argument: `imo = as.numeric(imo)`.
#> Caused by warning:
#> ! NAs introduced by coercion