Preprocess Lurio Landings Data
preprocess_landings_lurio.RdThis function preprocesses raw Lurio survey data from Google Cloud Storage. It performs data cleaning, transformation, catch weight calculations using length-weight relationships, and uploads processed data back to GCS.
Usage
preprocess_landings_lurio(log_threshold = logger::DEBUG)Details
The function performs the following main operations:
Downloads ASFIS species data and Airtable form assets from GCS
Downloads raw survey data from GCS as Parquet file
Extracts and processes general trip information (dates, location, GPS)
Extracts and processes trip details (vessel, gear, fishers, duration)
Processes catch data using
process_species_group()to reshape from wide to long formatCalculates catch weights via
calculate_catch_lurio()using length-weight coefficientsProcesses market information (catch use and price)
Joins all datasets and filters for active surveys
Maps survey codes to standardized names using Airtable assets
Uploads preprocessed data as versioned Parquet file to GCS