
Validate Lurio Survey Data
validate_surveys_lurio.RdThis function validates preprocessed fisheries survey data using a comprehensive approach adapted from the Peskas Zanzibar pipeline. It performs both basic data quality checks and composite economic indicator validation to ensure data integrity.
Usage
validate_surveys_lurio(log_threshold = logger::DEBUG)Value
This function does not return a value. Instead, it processes the data and uploads both the validated results and validation flags to cloud storage.
Details
The validation process follows a two-stage approach:
Stage 1: Basic Data Quality Checks (Flags 1-7)
Form completeness: Catch outcome is "1" but catch_taxon is missing
Catch info completeness: Catch taxon exists but no weight or individuals
Length validation: Fish length below species minimum
Length validation: Fish length above species 75th percentile maximum
Bucket weight: Weight per bucket exceeds 50kg
Bucket count: Number of buckets exceeds 300
Individual count: Number of individuals exceeds 200 per record
Stage 2: Composite Economic Indicators (Flags 8-10 and 14)
Price per kg: Exceeds 1875 MZN/kg (~30 EUR/kg, following Zanzibar thresholds)
CPUE: Catch per unit effort exceeds 30 kg/fisher/day
RPUE: Revenue per unit effort exceeds 1875 MZN/fisher/day
Flag 14: price per kg below 10 MZN/kg (~0.15 USD/kg), on trips with revenue landed from 2023.
Submissions with any validation flags are excluded from the final validated dataset but the flags are preserved for data quality monitoring.
Note
This function requires a configuration file accessible via read_config()
providing cloud storage connection details.