Closed statnmap closed 3 years ago
Colin:
selectInput
that could update itself when you click on the map or the {DT} (it doesn't communicate in that way). At first glance, if we want to do what we want to do, we have two choices:
There is some mystery around {crosstalk}: For example, if I have a checkbox, a card, and a DT:
A possibility that do not take inputs from leaflet, but from other sources: https://matt-dray.github.io/earl18-crosstalk/04_leaflet-flexdash-dt-crosstalk.html . Here, we cannot get information from the map
At first glance what we need is something like this with leaflet + D3js : http://osmuk.m.free.fr/d3js-web/final.php
Here, there is an alert()
when we click on a polygon that may be reachable using Javascript.
After further exploration, using {crosstalk} does not seem to be a good idea as too limited for now.
It is better to go for a full D3js solution. The first page will thus be served as a static page, provided that the size of data included in the page does not prevent a correct loading time.
We also need to account for translation in this data visualization.
ThinkR proposes to experiment the build a fluid home page using d3js. This will allow users to feel more welcome and potentially improve usage of the application.
However, this reduces time that will be allocated for other pages and functionalities.
@PMHLambert can you please validate this with a comment below. Thanks.
Take into account cases where there is no data after filter on species and/or area.
Par @PMHLambert :
I've switched to a combination of Leaflet + Datatable, which appear to be the most efficient for our use-case.
The logic for filtering is written contained here https://github.com/inrae/diades.atlas/blob/ui-i18n/inst/app/www/main.html#L46 and might need to be checked.
Data is queried on the DB and turned to JSON, using https://github.com/inrae/diades.atlas/blob/ui-i18n/data-raw/db_to_json.R
So far the translation for species & services have not been made (I'm not sure I'm perfectly fit to create them), but the UI has been translated and can switch from one to the other.
@PMHLambert it's time for a first validation of the Home Page.
You can test the Home page here: https://connect.thinkr.fr/diadesatlasui18n/
Can you validate that:
species
, cices
, ecosystem_service
, basin_outlet
, casestudy_basin
and casestudy
are stored openly in the git repository (JSON) and available on the application for advanced user with knowledge of Javascript.=> After that, we will define how to translate this part.
=> We will add information to explain the user how to use this page.
By the way, we started a vignette to explore the database, but for now, it is not documented : https://inrae.github.io/diades.atlas/articles/aa-data-exploration-compiled.html
Please add your comments about this first validation below
Good job!
The presentation in 3-columns is what I expected. It is already efficient to detect some discrepancies in the row data. No salmon in the Loire catchment when I select the species salmon.
The column-separately selection works fine. I do not understand what you mean by "There is no misuse of datasets". One concern of misunderstanding the results raises from the column-separately selection: If the Loire CS is selected, there is no salmon but cultural services. If I select traditional know-to-use, Loire and salmon are highlighted. Which is correct because of the OR request. But I probably would like to see for which species this ES is associated with the Loire. So a 2-column selection will be better. If not possible, we need to explain this limitation.
Does the third point mean that a user can have access to the code and the data to fix bugs or to update date ?
Some propositions of improvement in the 1-column selection (to be discussed according to the feasibility)
First page implemented with 1 selection
[ ] Multiple selection : Disable modalities after first selection
[ ] Final version of economic data ?
[ ] Faire comprendre / mettre en évidence l'utilisation des couleurs pour mettre en évidence ce qui a été sélectionné en premier
Note: Ce ne sont que des services écosystémiques. Les espèces ne sont pas forcément présentes.
[ ] Textes de présentation à régler par les économistes
Régler le Zoom sur les BV ?
[ ] Shapefile : Combiner les BV par cas d'étude ?
[ ] Nouvelle base de données à venir, sans les doublons
Entrée BV
Entrée espèce
Faut-il griser ou retirer les filtres qui ne font pas partie de la sous-liste ?
On bloque la 3eme sélection
Je sélectionne 2 espèces, j'ai 2 services qui s'allument. Je filtre une ligne du tableau sur les 2
[ ] Tableau - case à cocher
Filter choices were changed during meeting 2021-07-22.
There will not be accelerated first page using full JS, however output will be cached to get a quick presentation.
If not possible considering time available, we use R to take care of reactivity but with more buttons to block reactivity when needed.
Proposition to explore.