Chapter 5 Summarize survey
Here we will summarize the 2017 & 2020 survey data we prepared on the previous page.
Summarize effort
The summarize_effort()
functions builds tables with total kilometers and days surveyed.
This function summarizes effort in several default tables:
effort %>% names()
[1] "total" "total_by_cruise" "total_by_year" "total_by_effort"
[5] "total_by_stratum"
Total surveyed
The slot $total
provides the grand total distance and unique dates surveyed:
library(DT)
effort$total %>%
DT::datatable(options=list(initComplete = htmlwidgets::JS(
"function(settings, json) {$(this.api().table().container()).css({'font-size': '9pt'});}")
))
The column days
shows the total unique dates of the year on which effort occurred, and the column cruise_days
accounts for the possibility that multiple cruises were at sea simultaneously.
Summarize by Beaufort
This function summarizes effort by Beaufort in four default tables:
Simple overall breakdown
The slot $overall
provides the total effort – and proportion of effort – occurring in each Beaufort state:
Detailed breakdown
The slot $details
provides the above for each cruise-year-study area-geostratum combination within the data:
Summarize sightings
The summarize_sightings()
function builds tables summarizing the sightings within each cohort-analysis. (Eventually, we may want to include an option to merge all sightings from all cohort-analyses into a single table.)
This function summarizes sightings in four default tables:
sightings %>% names()
[1] "simple_totals" "analysis_totals"
[3] "stratum_simple_totals" "stratum_analysis_totals"
Simple species totals
The slot $simple_totals
includes all sightings, even if they will not be included in analysis (i.e., even if the include
column is FALSE
):
Analysis totals
The slot $analysis_totals
only includes sightings that meet all inclusion criteria for the analysis:
Summarize certain species
To deep-dive into details for a ceratin species (or group of species), use the function summarize_species()
.
This functions a list with a variety of summaries:
species %>% names
[1] "species" "n_total" "n_analysis"
[4] "school_size" "yearly_total" "yearly_analysis"
[7] "regional_total" "regional_analysis" "detection_distances"
[10] "sightings"
The slots $n_total
and $n_analysis
provide the total number of sightings and the number eligible for inclusion in the analysis: