Preprocess Landings Data
preprocess_landings.Rd
This function preprocesses raw landings data from a MongoDB collection. It performs various data cleaning and transformation operations, including column renaming, data pivoting, and standardization of catch names.
Usage
preprocess_landings(log_threshold = logger::DEBUG)
Details
The function performs the following main operations:
Pulls raw data from the MongoDB collection
Renames columns and selects relevant fields
Generates unique survey IDs
Cleans and standardizes text fields
Pivots catch data from wide to long format
Standardizes catch names and separates size information
Converts data types and handles cases with no catch data
Uploads the processed data to the preprocessed MongoDB collection.