Validate Fisheries Data
validate_landings.Rd
This function imports and validates preprocessed fisheries data from a MongoDB collection. It conducts a series of validation checks to ensure data integrity, including checks on dates, fisher counts, boat numbers, and catch weights. The function then compiles the validated data and corresponding alert flags, which are subsequently uploaded back to MongoDB.
Value
This function does not return a value. Instead, it processes the data and uploads the validated results to a MongoDB collection in the pipeline databse.
Details
The function performs the following main operations:
Pulls preprocessed landings data from the preprocessed MongoDB collection.
Validates the data for consistency and accuracy, focusing on:
Date validation
Number of fishers
Number of boats
Catch weight
Generates a validated dataset that integrates the results of the validation checks.
Creates alert flags to identify and track any data issues discovered during validation.
Merges the validated data with additional metadata, such as survey details and landing site information.
Uploads the validated dataset to the validated MongoDB collection.