wri / gfw-mapbuilder

Template for the GFW Map Builder that is available through ArcGIS Online, as a stand-alone web application, & a library to build custom Forest Atlas web applications
https://my.gfw-mapbuilder.org/v1.latest/
MIT License
33 stars 10 forks source link

Add a description for each chart #395

Closed csphang closed 5 years ago

csphang commented 5 years ago

Use metadata endpoint -- Richard to post the metadata

richardbarad commented 5 years ago

I posted metadata to these widgets:

It looks like there are several ways to pull the metadata:

This calls returns the widget + metadata in all languages:

http://production-api.globalforestwatch.org/widget/95c2c559-ca78-4b7a-b18b-7b2bca14ce83?includes=metadata

https://production-api.globalforestwatch.org/v1/dataset/a97036a8-5526-4b85-8ffb-9ee2cdd9b34a/widget/95c2c559-ca78-4b7a-b18b-7b2bca14ce83?includes=metadata

These call returns just the metadata without the widget and you can add a filter by language.

https://production-api.globalforestwatch.org/v1/dataset/a97036a8-5526-4b85-8ffb-9ee2cdd9b34a/widget/95c2c559-ca78-4b7a-b18b-7b2bca14ce83/metadata

https://production-api.globalforestwatch.org/v1/dataset/a97036a8-5526-4b85-8ffb-9ee2cdd9b34a/widget/95c2c559-ca78-4b7a-b18b-7b2bca14ce83/metadata?language=en

Unfortunately, this call does not seem to work so it looks you have to include the dataset ID in the query if you want to retrieve just the metadata.

https://production-api.globalforestwatch.org/v1/widget/95c2c559-ca78-4b7a-b18b-7b2bca14ce83/metadata?language=en

More Documentation available here: https://resource-watch.github.io/doc-api/index-rw.html

richardbarad commented 5 years ago

@KaylaKremer

A few questions / comments here to note:

1) Noticed we are using the url: https://production-api.globalforestwatch.org/v1/dataset/a97036a8-5526-4b85-8ffb-9ee2cdd9b34a/widget/95c2c559-ca78-4b7a-b18b-7b2bca14ce83/metadata?language=en. Will we need to add the datasetID to our configurations?

2) Let's also make sure this feature, and the custom report in general work with some other builds that include custom country analysis (i.e: Ethiopia, Georgia, Liberia). Some custom country analysis might not have a description in the API so in this case we should make the widget still loads but does not show the description underneath.