Processes validated survey data from WorldFish sources, filtering out flagged submissions and generating summary datasets for various dimensions: - Monthly summaries with aggregated catch metrics - Taxa summaries with species-specific information - District summaries with submission and effort metrics - Gear summaries with gear-specific performance metrics - Grid summaries from vessel tracking data
Usage
summarize_data(log_threshold = logger::DEBUG, package = "coasts")Arguments
- log_threshold
The logging level threshold for the logger package (e.g., DEBUG, INFO) See `logger::log_levels` for available options.
- package
Name of the package whose `inst/conf.yml` to read. Defaults to `"coasts"`. Pass your own package name when calling from a downstream package with a compatible configuration.
Details
The function performs the following operations: - Retrieves validated WF survey data - Filters for approved validation status - Creates multiple summary datasets: - Monthly summaries: Average catch, price, CPUE, and RPUE by district and month - Taxa summaries: Catch metrics by species, district, and month - District summaries: Submission counts and effort metrics by district - Gear summaries: Performance metrics by gear type - Grid summaries: Downloaded from cloud storage - Uploads all summaries to cloud storage as versioned parquet files
The metrics calculated include: - Total and mean catch weight - Price per kg of catch - CPUE (Catch Per Unit Effort) - both hourly and daily - RPUE (Revenue Per Unit Effort) - both hourly and daily - Number of submissions and fishers - Trip duration
See also
* [get_validated_surveys()] for details on the input data format * [get_validation_status()] for retrieving validation information * [upload_cloud_file()] for uploading results to cloud storage * [download_parquet_from_cloud()] for retrieving grid summaries
Examples
if (FALSE) { # \dontrun{
# Summarize WF data with default debug logging
summarize_data()
# Summarize with info-level logging only
summarize_data(logger::INFO)
} # }