This function handles the automated ingestion of fisheries asset metadata from Airtable. It performs the following operations: 1. Retrieves metadata for taxa, gear types, vessel types, landing sites, and survey forms 2. Removes duplicate records from each asset type 3. Packages all assets into a versioned RDS file 4. 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_levels` for 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 - **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).
- package
Name of the package whose `inst/conf.yml` to 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