This function handles the automated ingestion of fisheries asset metadata from Airtable. It performs the following operations:
Retrieves metadata for taxa, gear types, vessel types, landing sites, and survey forms
Removes duplicate records from each asset type
Packages all assets into a versioned RDS file
Uploads the processed file to configured cloud storage
Usage
ingest_assets(log_threshold = logger::DEBUG, package = "coasts")Arguments
- log_threshold
The logging threshold to use. Default is logger::DEBUG. See
logger::log_levelsfor available options.The function retrieves the following asset types from Airtable:
Taxa: Species information including scientific names, alpha3 codes, and English names
Gear: Fishing gear types with standardized names
Gear groups and vessel groups: Each standardized gear's FAO ISSCFG main group (
fao_category) and each boat type'svessel_group, used by the FAO ARTFISH raising ingenerate_fleet_analysis()Frame units: The census by district, boat type and main gear, either left empty where a country does not count it, read by the FAO ARTFISH raising and
export_frame_data()Vessels: Vessel types with standardized classifications
Landing Sites: Site information with codes and names
Forms: Survey form metadata with form IDs and names
All assets are deduplicated and stored together in a single RDS file with a versioned filename (includes timestamp and git SHA), and uploaded to the shared coasts bucket — the one every reader of the snapshot resolves.
The snapshot is cross-country: 1,609 taxa rows, 96 gears, 49 vessels and 736 landing sites across four countries as of 2026-08-13.
taxa,gearandvesselstherefore carrycountry, so a downstream package can select its own rows without inferring them from form ids. Alpha-3 codes are not sufficient on their own: every one of Timor-Leste's 56 codes is also used by Kenya, Mozambique or Zanzibar, two of them against a differentscientific_name.- package
Name of the package whose
inst/conf.ymlto read. Defaults to"coasts". Pass your own package name when calling from a downstream package with a compatible configuration.
Value
None (invisible). The function performs its operations for side effects:
Creates a local RDS file containing a list of all asset data frames
Uploads file to configured cloud storage
Generates logs of the process
See also
fetch_asset()for details on how individual assets are retrievedadd_version()for details on the file versioning systemupload_cloud_file()for details on the cloud upload process
