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"
)

Arguments

dataframe

data.frame expected. Csv or output of the function data_extraction, which must be done before using the fishing_activity() function.

data_type

character expected. 'tunabio' or 'observe'.

graph_type

character expected. "number" or "table." Number by default.

reported_year

integer expected. Write the wanted year of the report.

start_date

character expected. if reported_year is not given. Write the start date of the time range of the report.

end_date

character expected. if reported_year is not given. Write the end date of the time range of the report

selected_country

integer expected. Country code to select the list of boat to count. If NULL give all the vessel for the given year.

selected_ocean

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'

selected_harbour

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'

selected_variable

character expected. Write the variable of the PSU. Can be "trip", "vessel" or "well". "trip" by default.

Value

The function return a table.

Details

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

  • sampling_year

  • fish_sampling_date

  • landing_date

  • vessel_label

  • boat_code

  • fleet

  • vessel_well_number

add these columns to select the country and ocean (optional):

  • country_code

  • ocean_code