Choix de carte dynamique, même pour les TOM #65

This commit is contained in:
Colin Maudry
2026-03-16 18:06:32 +01:00
parent adc8457abc
commit f531ce7091
2 changed files with 226 additions and 202 deletions
+12
View File
@@ -286,6 +286,17 @@ def get_departements() -> dict:
return data
def get_departements_geojson() -> dict:
with open("./data/departements-1000m.geojson") as f:
geojson = json.load(f)
# Ajout de feature.id
for f in geojson["features"]:
f["id"] = f["properties"]["code"]
return geojson
def get_departement_region(code_postal):
if code_postal > "97000":
code_departement = code_postal[:3]
@@ -774,6 +785,7 @@ df_titulaires_marches: pl.DataFrame = (
)
departements = get_departements()
departements_geojson = get_departements_geojson()
domain_name = (
"test.decp.info" if os.getenv("DEVELOPMENT").lower() == "true" else "decp.info"
)