bioatlas / ala-docker

Dockerized version of Atlas of Living Australia components
GNU Affero General Public License v3.0
12 stars 12 forks source link

Scatterplot environmental layers bug #54

Open ronquist opened 4 years ago

ronquist commented 4 years ago

I tried to create a scatterplot on beta.bioatlas.se using the following procedure:

  1. Click on spatial portal on beta.bioatlas.se
  2. Select Tools -> Scatterplot - single
  3. In box 2, Search for species: "Aglais" and click "Aglais Dalman, 1816"
  4. Select environmental layers: Worldclim Annual Mean Temperature and Annual Precipitation

In step 4, all the environment layers that are not checked should be colored either red yellow or green. The selected ones are always colored in red I think. This works properly at ALA but in the bioatlas, the green color is usually missing completely. If you try the two layers indicated above, no layer is colored in green; a few are colored in yellow.

shahmanash commented 4 years ago

The colors applied are determined based on the logic described here : https://github.com/AtlasOfLivingAustralia/spatial-hub/blob/master/grails-app/assets/javascripts/spApp/templates/selectLayersCtrl.tpl.htm#L36

The evaluation of the color to apply happens here: https://github.com/AtlasOfLivingAustralia/spatial-hub/blob/master/grails-app/assets/javascripts/spApp/templates/selectLayersCtrl.tpl.htm#L112

The layerDistances (correlations) between layers are calculated while the layers are uploaded/processed and the values are available as JSON here https://beta.bioatlas.se/spatial-service/layerDistances/layerdistancesJSON

Regarding no layer is colored in green; a few are colored in yellow, it is due to the layerDistance values for the layers we have until now.