Control to verify the availability of logbook, observer and vms data.

data_availability(
  dataframe_observe,
  dataframe_logbook,
  dataframe_vms,
  reported_year,
  ocean = "Atlantic",
  graph_type = "plot",
  path_to_png = NULL
)

Arguments

dataframe_observe

data.frame expected. Dataframe from the Observe database. Csv or output of the function data_extraction, which must be done before using the data_availability() function.

dataframe_logbook

data.frame expected. Dataframe from the logbook database. Csv or output of the function data_extraction, which must be done before using the data_availability() function.

dataframe_vms

data.frame expected. Dataframe from the Vms database. Csv or output of the function data_extraction, which must be done before using the data_availability() function.

reported_year

integer expected. Year of the report.

ocean

character expected. Atlantic or Indian Atlantic by default.

graph_type

character expected. plot or plotly. Plot by default.

path_to_png

character expected. Add a link to the path to save the figure as a png.

Value

The function return ggplot R plot.

Details

The input dataframe must contain all these columns for the function to work [see referentials]: Dataframe observe:


   vessel_label  |  observation_date |
   ----------------------------------
   AVEL VAD      |  2022-04-13       |
   BELLE ISLE    |  2022-04-13       |
   BELLE RIVE    |  2022-04-13       |

Dataframe logbook:


   vessel_label |  date        |
   -----------------------------
   AVEL VAD     |  2022-04-13  |
   BELLE ISLE   |  2022-04-13  |
   BELLE RIVE   |  2022-04-13  |

Dataframe vms:


   vessel_label |  date        | longitude |
   -----------------------------------------
   AVEL VAD     |  2022-04-13  | 59.197    |
   BELLE ISLE   |  2022-04-13  | 59.654    |
   BELLE RIVE   |  2022-04-13  | 59.951    |