eurodatacube / eodash

Software behind the RACE dashboard by ESA and the European Commission (https://race.esa.int), the Green Transition Information Factory - GTIF (https://gtif.esa.int), as well as the Earth Observing Dashboard by NASA, ESA, and JAXA (https://eodashboard.org)
https://race.esa.int
MIT License
92 stars 42 forks source link

Review Legends in GTIF #2420

Closed lubojr closed 7 months ago

lubojr commented 9 months ago

Current list of used color legends should be harmonized:

Go through all legends found in folders at https://github.com/eurodatacube/eodash-assets/tree/main/collections which are relevant for GTIF. The automatically generated legends are called cm_legend.png Data provider supplied legends are named with other possible names.

If a new legend is to be added for a dataset which did not have it yet, the file needs to be added in the assets repository to a folder for that collection and additionally a corresponding configuration YAML at https://github.com/eurodatacube/eodash-catalog/tree/main/collections needs to be modified like so https://github.com/eurodatacube/eodash-catalog/blob/main/collections/AQ1_1_aggregated_mobility_data_satellite_values.yaml#L22 (adding the reference to a file inside assets repository).

Most of those legends which were generated by us are defined in https://github.com/eurodatacube/eodash-assets/blob/813577dc4396452546ec94962e60de22aefdffa9/generators/legends.json#L167-L173 and are generated automatically by a script.

You can modify the value ranges there and the label for example or add new entries, where the key of the configuration object will be the folder in which a cm_legend.png will be created - ideally the same name as the collection configuration yaml.

Progress sheet sent via email.

Current legends also observable on https://radiantearth.github.io/stac-browser/#/external/eurodatacube.github.io/eodash-catalog/GTIF/catalog.json?.language=en

lubojr commented 9 months ago

to look like: [unit of measurement], at least 4 ticks, no name of a layer

discrete legends should be referenced remotely rather than autogenerated

lubojr commented 9 months ago

Legends are filled now and we are waiting for data providers response on used color ranges for ADO, EO4A, LST

mariangela-cataldo commented 8 months ago

@lubojr @silvester-pari Here are indications on the expected graphic appearance of legends (both color bars and discrete legends) in the LAYERS panel.

Do we need to provide specific image files for the discrete legends or you can align those you have to the suggested style? If we need to do this, please let us know: file format (.png?), dimension constraints for effective responsiveness if any.

color bar discrete legend

lubojr commented 8 months ago

@mariangela-cataldo The source library matplotlib in the way how we use does allow some customization but not all.

Specifically:

What we can change is how many labels we display (for non-linear colorscales, I tried to map every different discrete value to the specific used color). If you need any changes in the existing legends regarding this, let me know.

As for discrete legends, we do not have any other way at the moment to generate discrete values legends than for example this way: image

If you prefer other format, please send us a per-tool legends as PNGs. Our legends currently have sizes roughly as 700x150px.

lubojr commented 8 months ago

Discrete legends provided via email have been added.

lubojr commented 7 months ago

Pending points:

As for the continuous legends we are automatically generating, suggestion is to align them graphically to the discrete ones by:

lubojr commented 7 months ago

All points have been addressed and new generated legend assets were deployed. https://github.com/eurodatacube/eodash-assets/commit/6b4a6c8128bdfade175822fe703a39c47d19fe93