Convert a datras_raw / DATRASraw object into a data frame structured to
match the FishGlob data set format.
Details
The function aggregates length-based catch information in HL to the
haul-species level, merges the result with haul-level metadata from HH,
computes abundance and biomass standardization metrics, and renames selected
fields to match FishGlob naming conventions.
The function first aggregates HL records by haul and taxon using:
total weight (
wgt), calculated as the sum ofWgt_total,total number (
num), calculated as the sum ofCount.
These aggregated values are merged with the HH table and used to compute:
wgt_cpue: biomass per hour trawled,wgt_cpua: biomass per swept area,num_cpue: abundance per hour trawled,num_cpua: abundance per swept area.
Haul duration is converted from minutes to hours before calculating CPUE metrics.
The returned data frame follows FishGlob naming conventions where possible,
including fields such as survey, haul_id, latitude, longitude,
accepted_name, and aphia_id.
Some output fields are created as placeholders with missing values when the corresponding information is not available in the input data.
Country and survey-unit fields are assigned using survey-specific rules that approximate the FishGlob workflow.
