gbif / portal-feedback

User feedback for the GBIF API, website and published data. You can ask questions here. 🗨❓
30 stars 16 forks source link

Show occurrence associations #439

Open gbif-portal opened 7 years ago

gbif-portal commented 7 years ago

Show occurrence associations

This ABCD record contains a link to another occurrence. It would be great to show these occurrence relations

<UnitAssociation>
    <AssociatedUnitSourceInstitutionCode>SNSB-JME</AssociatedUnitSourceInstitutionCode>
    <AssociatedUnitSourceName>JMEpiscescoll</AssociatedUnitSourceName>
    <AssociatedUnitID>JME-ETT-03930 / 726794 / 374459</AssociatedUnitID>
    <AssociationType language="en">Predator/Food</AssociationType>
    <Comment language="en">http://biocase.snsb.info/wrapper/pywrapper.cgi?dsa=JMEpiscescoll</Comment>
</UnitAssociation>

fbitem-occurrence1265781112 User provided contact info: mdoering@gbif.org System: Chrome 60.0.3112 / Mac OS X 10.12.5 Referer: https://www.gbif.org/occurrence/1265781112 Window size: width 1564 - height 973 API log&_a=(columns:!(request,response,clientip),filters:!(),index:'prod-varnish-',interval:auto,query:(query_string:(analyze_wildcard:!t,query:'response:%3E499%20AND%20(request:%22%2F%2Fapi.gbif.org%22)')),sort:!('@timestamp',desc))&indexPattern=uat-varnish-&type=histogram) Site log&_a=(columns:!(request,response,clientip),filters:!(),index:'prod-varnish-',interval:auto,query:(query_string:(analyze_wildcard:!t,query:'response:%3E399%20AND%20(request:%22%2F%2Fdemo.gbif.org%22)')),sort:!('@timestamp',desc))&indexPattern=uat-varnish-&type=histogram) datasetKey: 44c26867-9738-4ac5-9213-f612b0ef3197 publishingOrgKey: 0674aea0-a7e1-11d8-9534-b8a03c50a862

cgendreau commented 7 years ago

Just out of curiosity, how would you approach that ? Considering JME-ETT-03930/726794/374459 is the local id (occurrenceId) in the JMEpiscescoll dataset, how can we get the datasetKey for JMEpiscescoll ?

mdoering commented 7 years ago

the abcd:UnitID of the associated record holds <UnitID>JME-ETT-03930 / 726794 / 374459</UnitID> so we should be able to resolve these.

As for verbatim storage we could use the generic dwc relationship extension with preferred relation types. Food/predator and host/parasite relations are found all over for example.

mdoering commented 7 years ago

... the association is within the same dataset

https://api.gbif.org/v1/occurrence/1265781112/fragment https://api.gbif.org/v1/occurrence/1265770239/fragment

thomasstjerne commented 7 years ago

Interesting. Can this be modelled in Darwin Core as well? For Fungi we often have associated taxa as mycorrhizal hosts (symbionts). These could potentially be extracted as separate occurences with associationTypes

MortenHofft commented 7 years ago

I haven't looked carefully at the data, but this sounds like an API issue to begin with - I'm labelling as such