R/get_event.R
get_event.Rd
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
)
Type of event to get data of. One of "port_visit", "encounter", "loitering, or "fishing"
VesselID. How to get this?
Whether to include regions? Ask engineering if this can always be false
Start of date range to search events
End of date range to search events
Confidence levels (1-4) of events (port visits only).
Authorization token. Can be obtained with gfw_auth function
Boolean. Whether to print the number of events returned by the request.
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.