Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add data source organism on species page (#538) #588

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

juggler31
Copy link

@juggler31 juggler31 commented Dec 3, 2024

Un graphique de provenance des données a été rajouté afin de visualiser la participation de chaques organismes a l'observation d'un Taxon.

image

#538

@juggler31 juggler31 marked this pull request as draft December 3, 2024 10:53
@juggler31 juggler31 force-pushed the graph_origin_species_data branch 3 times, most recently from 08062e4 to 857786a Compare December 3, 2024 13:58
@juggler31 juggler31 marked this pull request as ready for review December 3, 2024 13:58
@camillemonchicourt
Copy link
Member

Je crois qu'il faut activer ce graphique, seulement si les ORGANISMES sont activés globalement :

ORGANISM_MODULE = fields.Boolean(load_default=False)

Est-ce le cas ?

@juggler31 juggler31 force-pushed the graph_origin_species_data branch from 857786a to 7ca06ee Compare December 5, 2024 20:47
Un graphique de provenance des données a été rajouté afin de visualiser
la participation de chaques organismes a l'observation d'un Taxon.
@juggler31 juggler31 force-pushed the graph_origin_species_data branch 3 times, most recently from ff8201c to bfe1779 Compare December 10, 2024 15:07
Un graphique de provenance des données a été rajouté afin de visualiser
la participation de chaques organismes a l'observation d'un Taxon.
@juggler31 juggler31 force-pushed the graph_origin_species_data branch from bfe1779 to 6fabcc7 Compare December 10, 2024 15:20
@@ -232,6 +233,7 @@ def ficheEspece(cd_nom):
taxon = vmTaxrefRepository.searchEspece(connection, cd_ref)
altitudes = vmAltitudesRepository.getAltitudesChilds(connection, cd_ref)
months = vmMoisRepository.getMonthlyObservationsChilds(connection, cd_ref)
data_source_values = vmCorTaxonOrganism.getTaxonOrganism(connection, cd_ref)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

J’appellerais cette variable organism_stats ou organism_plot_data

@@ -274,6 +276,7 @@ def ficheEspece(cd_nom):
cd_ref=cd_ref,
altitudes=altitudes,
months=months,
data_source_values=data_source_values,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Idem

@@ -138,7 +138,35 @@ class Meta:
AFFICHAGE_NOUVELLES_ESPECES = fields.Boolean(load_default=True)
AFFICHAGE_RECHERCHE_AVANCEE = fields.Boolean(load_default=False)
AFFICHAGE_GRAPH_ALTITUDES = fields.Boolean(load_default=True)
AFFICHAGE_GRAPH_PHENOLOGIE = fields.Boolean(load_default=True)
AFFICHAGE_GRAPH_PHENOLOGIE = fields.Boolean(load_default=False)
Copy link
Member

@TheoLechemia TheoLechemia Jan 20, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pourquoi masquer le graphique des phénologie par défaut ?

@@ -41,7 +41,9 @@
var months_name = {{ configuration.AVAILABLE_LANGUAGES[g.lang_code]['months'] | tojson }};
{% else %}
var months_name = {{ configuration.AVAILABLE_LANGUAGES[configuration.DEFAULT_LANGUAGE]['months'] | tojson }};

{% endif %}
{% if configuration.ORGANISM_MODULE and configuration.AFFICHAGE_GRAPH_PROVENANCE_DONNEE %}
Copy link
Member

@TheoLechemia TheoLechemia Jan 20, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Si on veut afficher les stats par organisme mais pas la fiche organisme on ne peut pas.
Je dirais : soit on fait un seul paramètre qui contrôle les deux, soit on en fait deux différents, mais qui n'interfèrent pas les uns avec les autres.
Je penche plus pour la deuxième option


{% endif %}
{% if configuration.ORGANISM_MODULE and configuration.AFFICHAGE_GRAPH_PROVENANCE_DONNEE %}
var data_source_values = {{ data_source_values | tojson}};
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A renommer (voir plus haut)

@@ -12,5 +12,11 @@ <h4 class="title-bar title-spaced center strong">{{ _('monthly.obs') }}</h4>
<canvas id="monthChart"></canvas>
</div>
{% endif %}
{% if configuration.ORGANISM_MODULE and configuration.AFFICHAGE_GRAPH_PROVENANCE_DONNEE %}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Idem que plus haut

},
title: {
display: false,
text: 'Graphique des provenances de données'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Le titre n'est pas utilisé, et pas traduit. Je pense qu'on peut le retirer du JS ?

labels: labels,
datasets: [
{
label: 'Dataset 1',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pour le pie chart, le "label" n'a pas l'air d'être utilisé. Pour moi on peut l'enlevé aussi

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants