-
Notifications
You must be signed in to change notification settings - Fork 1
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
22 onglet data ameliorations #29
The head ref may contain hidden characters: "22-onglet-data-am\u00E9liorations"
Conversation
Cette fois le precommit check a marché 👯 |
Sais-tu pourquoi ? 😅 |
Des erreurs dans le fichier poetry.lock qui avait été forké depuis staging, et je n'avais pas pensé à faire un poetry install ou add pour vérifier que tout va bien avant |
|
||
folium.CircleMarker( | ||
location=(row["LIEU_COORD_GPS_Y"], row["LIEU_COORD_GPS_X"]), | ||
radius=radius, # Utilisation du rayon ajusté | ||
popup=f"{row['NOM_ZONE']}, {row['LIEU_VILLE']}, {row['DATE']} : {row['nb_dechet']} {selected_dechet}", | ||
popup=folium.Popup( | ||
html=f""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Est-ce qu'on ne mettrait pas les html dans des fichiers dédiés ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ça concerne un seul graphique pour tout l'onglet, tu penses que c'est nécessaire ?
J'ai fais le tour des fichiers. Dans l'ensemble, c'est plus des TO DO que des NO GO. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✅
dashboards/app/pages/data.py
Outdated
if lieu != valeur_par_defaut_lieu: | ||
filtered_df = filtered_df[filtered_df["TYPE_LIEU"] == lieu] | ||
|
||
# The filtered_df now contains the data based on the selected filters |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pourquoi est-ce commenté ?
Si pas de raison spécifique => à supprimer
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
C'était du code que j'ai optimisé mais oublié de supprimer. C'est supprimé maintenant, merci !
dashboards/app/pages/data.py
Outdated
frenchify(nb_secteurs) + " secteurs", | ||
) | ||
# Ligne 2 : 3 cellules avec les indicateurs clés en bas de page | ||
colors_map_secteur = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
À exporter dans un fichier de configuration style json?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fait pour les 2 colormaps utilisées dans l'onglet, merci
dashboards/app/pages/data.py
Outdated
cell3.metric("Nombre de collectes comptabilisées", frenchify(nb_collectes_int)) | ||
cell3.metric("Nombre de ramassages", nb_collectes_int) | ||
|
||
# Note méthodo pour expliquer les données retenues pour l'analyse |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Note méthodo" c'est pour faire une documentation pour expliquer la méthodo ?
Ou est-ce que ça a déjà été fait ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Le commentaire était au mauvais endroit, merci pour la review. L'encart méthodo dans l'onglet est codé qq lignes plus bas
dashboards/app/pages/data.py
Outdated
options=["Aucune sélection"] | ||
+ list(filtered_data_milieu["TYPE_MILIEU"].unique()), | ||
) | ||
# Filter by year |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Faudra voir si l'on garde les commentaires en français ou en anglais. Ça fait bizarre de passer de l'un à l'autre.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes you're right. J'ai tout passé en français
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pourquoi l'onglet hotspot est modifié, si l'on modifie data ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
C'est precommit qui a fait passer du reformatage (black je pense vu les modifs), je pense qu'ils ne l'ont pas utilisé dans les derniers commit du staging. Je les laisserai écraser les modifs avec leur dernière version pré-commitée :). Aucune modif volontaire de ma part
@@ -432,25 +432,30 @@ def calculate_and_display_metrics(data, indicator_col1, indicator_col2, indicato | |||
def couleur_milieu(type): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Prévoir du type hinting
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
à voir avec l'onglet hotspots
@@ -7,7 +7,6 @@ streamlit==1.32.2 | |||
openpyxl==3.1.2 | |||
streamlit-folium==0.19.1 | |||
plotly==5.19.0 | |||
streamlit-dynamic-filters==0.1.6 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pas d'impact sur les autres onglets?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nope on l'avait testé sur data et remplacé ensuite. aucun autre onglet ne l'utilise
poetry.lock
Outdated
This comment was marked as outdated.
This comment was marked as outdated.
Sorry, something went wrong.
import plotly.express as px | ||
import folium | ||
from folium import IFrame | ||
import math | ||
import locale | ||
import duckdb |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool de voir du duckdb ! Peut-être à généraliser aux autres onglets?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok dans une V2 si ça te va, là je pense que l'enjeu est de boucler le POC
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note pour plus tard : Si l'on a d'autres export de colormap ou autre, autant tout centraliser dans un json ?
Améliorations validées avec Quentin et Téo, + conflits poetry.lock résolus