Validate Fisheries Data
validate_landings.Rd
This function imports and validates preprocessed fisheries data from a MongoDB collection. It performs a series of validation checks to ensure data integrity, including checks on dates, fisher counts, boat numbers, catch weights, and IMEI numbers. The function then compiles the validated data and corresponding alert flags, which are subsequently uploaded back to MongoDB.
Usage
validate_landings(log_threshold = logger::DEBUG)
Value
This function does not return a value. It processes the data and uploads the validated results to a MongoDB collection in the pipeline database.
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 weights and prices
IMEI numbers
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.