Base function to get event from API and convert response to data frame

get_event(
  event_type = "port_visit",
  vessel = NULL,
  include_regions = NULL,
  start_date = NULL,
  end_date = NULL,
  confidences = NULL,
  key = gfw_auth(),
  quiet = FALSE
)

Arguments

event_type

Type of event to get data of. One of "port_visit", "encounter", "loitering, or "fishing"

vessel

VesselID. How to get this?

include_regions

Whether to include regions? Ask engineering if this can always be false

start_date

Start of date range to search events

end_date

End of date range to search events

confidences

Confidence levels (1-4) of events (port visits only).

key

Authorization token. Can be obtained with gfw_auth function

quiet

Boolean. Whether to print the number of events returned by the request.

Details

There are currently four available event types and these events are provide for three vessel types - fishing, carrier, and support vessels. Fishing events (event_type = 'fishing') are specific to fishing vessels and loitering events (event_type = 'loitering') are specific to carrier vessels. Port visits (event_type = 'port_visit') and encounters (event_type = 'encounter') are available for all vessel types. For more details about the various event types, see the GFW API documentation.

Encounter events involve multiple vessels and one row is returned for each vessel involved in an encounter. For example, an encounter between a carrier and fishing vessel (carrier-fishing) will have one row for the fishing vessel and one for the carrier vessel. The id field for encounter events has two components separated by a .. The first component is the unique id for the encounter event and will be the same for all vessels involved in the encounter. The second component is an integer used to distinguish between different vessels in the encounter.