From 4771d14744b137ceecbb5c7e3f88ecb23ab8f59c Mon Sep 17 00:00:00 2001 From: Colin Maudry Date: Sat, 14 Mar 2026 00:00:15 +0100 Subject: [PATCH] =?UTF-8?q?Utilise=20map=5Fcount=5Fmarches=20si=20trop=20d?= =?UTF-8?q?e=20march=C3=A9s?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/figures.py | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/src/figures.py b/src/figures.py index 008c1cf..c95be13 100644 --- a/src/figures.py +++ b/src/figures.py @@ -426,10 +426,18 @@ def get_geographic_maps(dff: pl.DataFrame) -> list | None: Génère les cartes géographiques pour la métropole et les DOM-TOM. """ - # Seulement si les données ne sont pas trop importantes - - if dff.height > 10000: - return [] + # Si les données sont trop importantes on utilise une carte chloropleth + if dff.height > 5000: + return [ + dbc.Col( + dcc.Graph( + figure=get_map_count_marches(dff), config={"displayModeBar": False} + ), + width=12, + md=12, + className="mb-4", + ) + ] # Liste des codes départements Outre-Mer dom_codes = ["971", "972", "973", "974", "976"]