Use facets in the GBIF connector#110
Draft
jacquesfize wants to merge 7 commits intomainfrom
Draft
Conversation
Collaborator
Author
|
Since a lot of data are fetched from Wikidata, maybe all data (vernacular names, scientific name) should also be fetch from Wikidata ! Some other interesting variables could be added (habitat, weight, etc.) |
888c9fe to
dffbc6b
Compare
🚀 Déploiement Netlify réussiURL de prévisualisation: https://facet-connector-gbif--bam-widget.netlify.app
Cette URL restera stable pour tous les futurs déploiements de cette branche. |
Facet, the second to fetch vernacularName, scientificName from Wikidata and the last one to fetch taxonomic info from iNaturalist API
Open
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of PR #32
This PR proposes using the facet feature in the GBIF API, which offers several key advantages:
occurrences/searchquery.However, the GBIF API only returns GBIF taxon identifiers. To avoid making N separate queries (where N = number of taxa) to fetch missing data for each taxon, we query the Wikidata API. This allows us to retrieve, in a single request, information such as:
Wikidata was chosen because it can fetch data for multiple taxa at once and includes links to other data sources.
SPARQL Query to Fetch Taxon Information
Why the iNaturalist ID?
Wikidata does not always provide all taxonomic ranks. To fill in these gaps without making too many queries, we use the iNaturalist API, which allows us to fetch information for up to 30 taxa in a single request.