Trip data consistency control
control_trip(
dataframe_observe,
dataframe_logbook,
reported_year,
flag_selected,
table = "vessel_set",
ocean = "Atlantic",
path_to_csv = NULL
)
data.frame expected. Dataframe from the Observe database. Csv or output of the function data_extraction, which must be done before using the control_trip() function.
data.frame expected. Dataframe from the logbook database. Csv or output of the function data_extraction, which must be done before using the control_trip() function.
integer expected. Year of the report.
character expected. Flag of the country; isocode.
character expected. code_case, controltrip or vessel_set. vessel_set by default.
character expected. Atlantic or Indian. Atlantic by default.
character expected. Path to save the csv file. NULL by default.
The function return ggplot R plot.
The input dataframe must contain all these columns for the function to work [see referentials]: Dataframe observe:
program | vessel_code | trip_end_date | observation_date | observation_time | ocean_label | trip_id | flag | set_id
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------
DCF Senne (IRD) | 887 | 2022-05-03 | 2022-04-13 | 14:45:00 | Indian | fr.ird.data.ps.common.Trip#164984 | FRA | fr.ird.data.ps.observation.Set
DCF Senne (IRD) | 887 | 2022-05-03 | 2022-04-13 | 02:15:00 | Indian | fr.ird.data.ps.common.Trip#164984 | FRA |
DCF Senne (IRD) | 887 | 2022-05-03 | 2022-04-13 | 10:18:00 | Indian | fr.ird.data.ps.common.Trip#164984 | FRA |
Dataframe logbook:
vessel_code | ocean_label | flag | school_type | trip_id | vessel_activity_code | activity_id | departure_date | landing_date
------------------------------------------------------------------------------------------------------------------------------------------------------------------------
AVEL VAD | Indian | FRA | FOB | fr.ird.data.ps.common.Trip#17 | 6 | fr.ird.data.ps.logbook.Activity#170 | 2021-12-18 | 2022-01-26
AVEL VAD | Indian | FRA | NA | fr.ird.data.ps.common.Trip#18 | 13 | fr.ird.data.ps.logbook.Activity#171 | 2021-12-18 | 2022-01-26
AVEL VAD | Indian | FRA | FSC | fr.ird.data.ps.common.Trip#19 | 13 | fr.ird.data.ps.logbook.Activity#172 | 2021-12-18 | 2022-01-26