Give the number of trip, vessel or well sampled for a given year. Need to define your goal in the parameter.
sample_summary(
dataframe,
data_type,
graph_type = "number",
reported_year = NULL,
start_date = NULL,
end_date = NULL,
selected_country = NULL,
selected_ocean = NULL,
selected_harbour = NULL,
selected_variable = "trip"
)
data.frame expected. Csv or output of the function data_extraction, which must be done before using the sample_summary() function.
character expected. 'tunabio' or 'observe'.
character expected. 'number' or 'table'. Number by default.
integer expected. Write the wanted year of the report.
character expected. if reported_year is not given. Write the start date of the time range of the report.
character expected. if reported_year is not given. Write the end date of the time range of the report
integer expected. Country code to select the list of boat to count. If NULL give all the vessel for the given year.
integer expected. Ocean code to select the list of boat to count. If NULL give all the vessel for the given year, works only for 'data_type' == 'observe'
integer expected. Harbour code to select the list of boat to count. If NULL give all the vessel for the given year, works only for 'data_type' == 'observe'
character expected. Write the variable of the PSU. Can be "trip", "vessel" or "well". "trip" by default.
The function return a table.
The input dataframe frome sql must contain all these columns for the function to work [see referentials]:
ocean_label | fleet | vessel_type_code | vessel_label | landing_year | departure | port_departure | arrival | port_arrival | total_landing
------------------------------------------------------------------------------------------------------------------------------------------
Atlantic | FRA | 6 | VIA AVENIR | 2022 | 2022-01-13 | ABIDJAN | 2022-02-03 | ABIDJAN |
Atlantic | FRA | 6 | VIA AVENIR | 2022 | 2022-01-13 | ABIDJAN | 2022-02-03 | ABIDJAN |
Atlantic | FRA | 6 | VIA AVENIR | 2022 | 2022-01-16 | ABIDJAN | 2022-10-05 | ABIDJAN |
add these columns to select the country and ocean (optional):
country_code
ocean_code