Skip to content

migrate to using the COL XR as the default taxonomy #895

Description

@jhnwllr

BREAKING CHANGES

Test dev version here:

# Using remotes
remotes::install_github("ropensci/rgbif", ref = "v3.9.0")
# Or using devtools
devtools::install_github("ropensci/rgbif", ref = "v3.9.0")

Default taxonomy changed from GBIF Backbone to COL (Catalogue of Life) Extended Release (#895)

Migration Guide

The following functions now use COL Extended Release (checklistKey = "7ddf754f-d193-4cc9-b351-99906754a03b") as the default taxonomy:

  • name_backbone() - Returns COL XR alpha-numeric taxon keys (e.g., "Q2M4") instead of numeric GBIF Backbone keys
  • name_backbone_checklist() - Matches names against COL XR by default
  • occ_search() - Searches using COL XR taxonomy
  • occ_download() - Creates downloads with COL XR taxonomy
  • occ_download_prep() - Prepares downloads with COL XR taxonomy
  • map_fetch() - Fetches maps using COL XR taxonomy
  • mvt_fetch() - Fetches map vector tiles using COL XR taxonomy

DEPRECATED

The following functions are deprecated because they use the GBIF Backbone taxonomy, and will not work with COL XR keys.

  • name_lookup() - use rcol::col_search() instead
  • name_suggest() - use rcol::col_suggest() instead
  • name_usage() - use rcol::col_usage() instead
  • name_issues() - use rcol::col_usage() to parse and examine name issues

NEW FEATURE

gbif_to_col() - Convert GBIF Backbone numeric taxon keys to COL Extended Release alpha-numeric keys. Returns the full API response including usage details, classification hierarchy, and match diagnostics.

MINOR IMPROVEMENTS

  • occ_search() now returns classifications as a named list of tibbles, with one tibble per checklistKey (taxonomy source). Each tibble contains one row per occurrence with taxonomic ranks pivoted into camelCase columns (checklistKey, kingdomName, kingdomKey, phylumName, phylumKey, className, classKey, etc.). This structure makes it easy to work with occurrences from different taxonomies separately while keeping the checklistKey information with the data. Known checklists (COL, backbone) are shown with friendly names, while unknown checklists use their UUID.
  • occ_search() now detects numeric taxonomic keys (taxonKey, speciesKey, kingdomKey, etc.) and automatically switches to the GBIF Backbone taxonomy checklistKey with a warning message. These numeric keys are legacy identifiers from the GBIF Backbone taxonomy. Users are advised to migrate to COL XR identifiers using gbif_to_col().
  • occ_download() and occ_download_prep() now detect numeric taxonomic keys in predicates and automatically inject the GBIF Backbone checklistKey at the predicate level with a warning message. This ensures existing code using numeric keys continues to work correctly.
  • name_usage() now warns when datasetKey parameter is ignored. When a key is provided, the GBIF API ignores the datasetKey parameter and returns data based solely on the key. A warning is now issued to alert users of this behavior (datasetKey ignored in name_usage() without issuing warning #899).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions