Skip to contents

Processes validated survey data from WorldFish sources, filtering out flagged submissions and generating two key datasets:

  1. Indicators dataset with aggregated catch metrics

  2. Taxa dataset with species-specific catch information

Usage

export_wf_data(log_threshold = logger::DEBUG)

Arguments

log_threshold

The logging level threshold for the logger package (e.g., DEBUG, INFO) See logger::log_levels for available options.

Value

Two data frames (invisible):

  • indicators_df: Aggregated catch metrics by submission

  • taxa_df: Species-specific catch information

Details

The function performs the following operations:

  • Retrieves validated WF survey data

  • Pulls submission flags from MongoDB

  • Filters out submissions with alert flags

  • For the indicators dataset:

    • Aggregates catch data by submission

    • Calculates price per kg, CPUE, and RPUE metrics

  • For the taxa dataset:

    • Preserves taxonomic information

    • Calculates catch metrics by species

The metrics calculated include:

  • Total catch weight per submission

  • Price per kg of catch

  • CPUE (Catch Per Unit Effort)

  • RPUE (Revenue Per Unit Effort)

See also

Examples

if (FALSE) { # \dontrun{
# Export WF data with default debug logging
export_wf_data()

# Export with info-level logging only
export_wf_data(logger::INFO)
} # }