Utilisation des stats produites par decp_processing

This commit is contained in:
Colin Maudry
2026-01-14 18:16:50 +01:00
parent d8dcb04fbf
commit 3c68317f9d
3 changed files with 56 additions and 2 deletions
+11
View File
@@ -240,6 +240,17 @@ def get_org_data(dff: pl.DataFrame, org_type: str) -> pl.DataFrame:
return lff.collect()
def get_statistics() -> dict:
return (
get(
"https://www.data.gouv.fr/api/1/datasets/r/0ccf4a75-f3aa-4b46-8b6a-18aeb63e36df",
follow_redirects=True,
)
.raise_for_status()
.json()
)
def get_departements() -> dict:
with open("data/departements.json", "rb") as f:
data = json.load(f)