Rgbif: How to download Taxon Identifiers

I would like to download all Taxon Identifiers (e.g. Index Fungorum ID, NCBI taxonomy ID, EPPO Code, etc.) for given occurrences (e.g. Verticillium dahliae), using rgbif.
Can you help me?
Many thanks in advance.


1 Like

rgbif maintainer here. First, are you sure those other taxon identifiers are in GBIF’s data?

Yes. Search a fungal species, click on the species to open its page (e.g. Verticillium dahliae Kleb.), and you will see TAXON IDENTIFIERS at the bottom of the page

Hello giovabubi, since those taxon identifiers seem to be sourced from wikidata, wouldn’t it be a better approach to fetch them from their SPARQL endpoint instead? You could still use the gbif taxon identifier to link both sources.

I wrote a quick demo for this in R, this needs some work to make it more efficient. You are probably better off using WikidataR::extract_claims() to retrieve claims for a number of objects at the same time, but I opted to do it this way so it would be easier to read if you are not familiar with Wikidata.

Let me know if I can clarify anything

Dear Pieter,
this script is amazing. It is exactly what I want. Thank you so much! I have thousands of species to search, and I will implement your script within a For Loop.
Thank you again.