Greetings,
I’m researching approaches for a trait-based analysis of mosquito occurrences for the ohvbd (vector-borne diseases-focused data wrangling package), and I want to merge GBIF occurrence records with trait values from the VecTraits database. What workflow or tools do you recommend for linking traits to GBIF data? Has anyone successfully used the rgbif
R package or Python’s pygbif
to do this? Sample code snippets would be especially helpful!
Regards,
Stanley
Using dwc:measurementorfact to describe the traits is probably the best way to go. More info here (check Darwin Core extensions) Darwin Core :: GBIF IPT User Manual
See this record: Occurrence Detail 4504169952
"extensions": {
"http://rs.tdwg.org/dwc/terms/MeasurementOrFact": [
{
"http://rs.tdwg.org/dwc/terms/measurementValue": "77",
"http://rs.tdwg.org/dwc/terms/measurementID": "3506403",
"http://rs.tdwg.org/dwc/terms/measurementType": "wing.length",
"http://rs.tdwg.org/dwc/terms/measurementUnit": "mm"
},
{
"http://rs.tdwg.org/dwc/terms/measurementValue": "17.9",
"http://rs.tdwg.org/dwc/terms/measurementID": "7504270",
"http://rs.tdwg.org/dwc/terms/measurementType": "mass",
"http://rs.tdwg.org/dwc/terms/measurementUnit": "g"
}
]
},
WoRMS also has an implementation. See the snippet below where AphdiaID is a taxonID and measurementTypeID 15 is defined here.
"AphiaID": 165801,
"measurementTypeID": 15,
"measurementType": "Body size",
"measurementValue": "240",
"source_id": 197527,
"reference": "Vacelet, J.; Boury-Esnault, N. (1987). Taxonomy of Porifera from the N.E. Atlantic and Mediterranean Sea. NATO ASI Series G: Ecological sciences, 13. Springer: Berlin. ISBN 3-540-16091-4. VIII, 332 pp.",
"qualitystatus": "unreviewed",
Especially for numeric traits, such as body size and development time, the Darwin Core (DwC) Extension Measurement or Facts is indeed very efficient.
Possibly check some (Measurement-or-Fact) tables’ examples among the Best Practices in the IPT User Manual. A few categorical traits are also structured therein.
If you otherwise intend to share species descriptions on GBIF taxon pages - independently from occurrence records, but based on a Taxon Core - the DwC Extension Taxon Description particularly fits for categorical traits, such as voltinism, overwintering stage, diurnality, feeding guild, trophic range or habitat preferences, like in this data record: Leptarthrus brevirostris (Meigen, 1804)
Unfortunately, rgbif
and pygbif
do not have any special functions for dealing with trait data.