Reconciles ship codes between datasets using exact matching on ship_nodc and ship_name, followed by word-overlap fuzzy matching against CalCOFI UNOLS, NODC WOD, and optionally ICES reference sources. Manual overrides can be provided via a CSV file.
Arguments
- unmatched_ships
tibble with columns: ship_code, ship_name (ships needing reconciliation from bottle casts)
- reference_ships
tibble with columns: ship_key, ship_nodc, ship_name (known ships from swfsc database)
- ship_renames_csv
optional path to manual overrides CSV with columns: csv_name, csv_code, csv_name_new, csv_code_new
- fetch_ices
logical; if TRUE, also query ICES ship API (default TRUE)
Value
tibble with match results: ship_code, ship_name, match_type, matched_ship_key, matched_ship_nodc, matched_ship_name, confidence