gbif / hosted-portals

Support material for establishing the GBIF Hosted Portals
Apache License 2.0
9 stars 6 forks source link

Embedding taxonomic distribution chart #290

Open giannijacot opened 1 month ago

giannijacot commented 1 month ago

We are interested in adding the “Taxonomic distribution of occurrences” chart in a page of our swiss-bif hosted portal.

I've searched for a way to embed it but haven't found any. Does a widget or another way to embed it easily exists ? If not I guess the simplest way to add it would be to get the data from the gbif api and recreate it using similar libraries ?

MortenHofft commented 1 month ago

There isn't such a chart or widget included in the library

But, as you say, since everything is build from the public APIs, then it is perfectly possibly to select a js sunburst library and fetch the data from the APIs documented here https://techdocs.gbif.org/en/openapi/v1/occurrence

Am I correct in assuming that it is the colorfull wheel on the right you are interested in and not the tree on the left? Personally I've always preferred the tree by far, but I have a feeling that I'm the only one.

giannijacot commented 1 month ago

OK, thanks for the answer.

Yes, it's the graph on the right that we're interested in. The rectangle-shaped one to be more precise.

I'll let you know if we add it in our hosted portal.

MortenHofft commented 1 month ago

The library we have used on both gbif.org and the hosted portals is called Highcharts https://www.highcharts.com/demo/highcharts/treemap-large-dataset