GBIF scientific name matching

Stijn Van Hoey

2017-12-08

Introduction

Working with different partners/institutes/researchers results in a diversity of taxonomic names to define species. This hardens comparison amongst datasets, as in many occasions, aggregation is aimed for or filtering on specific species. By translating all species names to a common taxonomic backbone (ensuring unique ID’s for each species name), this can be done. The gbif_species_name_match function supports matching with the GBIF taxonomic backbone.

Aim

This function provides the functionality to add the species information from the GBIF backbone to any data table (data.frame) by requesting this information via the GBIF API. For each match, the corresponding accepted name is looked for. Nevertheless there will always be errors and control is still required!

Functionality

The gbif_species_name_match function extends the matching function provided by Rgbif to be compatible with a data.frame data structure.

Loading the functionality can be done by loading the inborutils package:

library(inborutils)

Consider the example data set species_example:

knitr::kable(species_example)
scientificName kingdom euConcernStatus
Alopochen aegyptiaca Animalia under consideration
Cotoneaster ganghobaensis Plantae
Cotoneaster hylmoei Plantae

To add the species information, using the scientificName column, and the default fields:

my_data_update <- gbif_species_name_match(species_example, 
                                          name_col = "scientificName")
## [1] "All column names present"
knitr::kable(my_data_update)
usageKey scientificName rank order matchType phylum kingdom genus class confidence synonym status family scientificName1 kingdom1 euConcernStatus
2498252 Alopochen aegyptiaca (Linnaeus, 1766) SPECIES Anseriformes EXACT Chordata Animalia Alopochen Aves 98 FALSE ACCEPTED Anatidae Alopochen aegyptiaca Animalia under consideration
3025989 Cotoneaster ganghobaensis J. Fryer & B. Hylmö SPECIES Rosales EXACT Tracheophyta Plantae Cotoneaster Magnoliopsida 98 TRUE SYNONYM Rosaceae Cotoneaster ganghobaensis Plantae
3025758 Cotoneaster hylmoei K.E. Flinck & J. Fryer SPECIES Rosales EXACT Tracheophyta Plantae Cotoneaster Magnoliopsida 98 TRUE SYNONYM Rosaceae Cotoneaster hylmoei Plantae

When not satisfied by the default fields provided ´(‘usageKey’,‘scientificName’,‘rank’,‘order’,‘matchType’,‘phylum’, ‘kingdom’,‘genus’, ‘class’,‘confidence’, ‘synonym’, ‘status’,‘family’)´, you can alter these by the gbif_terms argument, for example:

gbif_terms_to_use <- c('scientificName', 'order')
my_data_update <- gbif_species_name_match(species_example, 
                                              name_col = "scientificName" , 
                                              gbif_terms = gbif_terms_to_use)
## [1] "All column names present"
knitr::kable(my_data_update)
scientificName order scientificName1 kingdom euConcernStatus
Alopochen aegyptiaca (Linnaeus, 1766) Anseriformes Alopochen aegyptiaca Animalia under consideration
Cotoneaster ganghobaensis J. Fryer & B. Hylmö Rosales Cotoneaster ganghobaensis Plantae
Cotoneaster hylmoei K.E. Flinck & J. Fryer Rosales Cotoneaster hylmoei Plantae