From a20411b4090193091e5c692cb7bb75beeb2487c1 Mon Sep 17 00:00:00 2001 From: Emmy D'Anello Date: Thu, 13 Jun 2024 11:22:23 +0200 Subject: [PATCH] Importation des communes avec leurs arrondissements --- nupes/scripts/import_geographie.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/nupes/scripts/import_geographie.py b/nupes/scripts/import_geographie.py index c4edab4..0407ce2 100644 --- a/nupes/scripts/import_geographie.py +++ b/nupes/scripts/import_geographie.py @@ -14,7 +14,7 @@ def importer_regions(engine: Engine, debug: bool = False) -> None: "https://public.opendatasoft.com/api/explore/v2.1/catalog/datasets" "/georef-france-region?select=data_processed").json()['data_processed'] file = get_file("https://public.opendatasoft.com/api/explore/v2.1/catalog/datasets" - "/georef-france-region/exports/geojson?lang=fr&timezone=Europe%2FBerlin", + "/georef-france-region/exports/geojson?lang=fr&timezone=Europe%2FParis", "georef-france-region.geojson", etag) with file.open('r') as f: @@ -41,7 +41,7 @@ def importer_departements(engine: Engine, debug: bool = False) -> None: "https://public.opendatasoft.com/api/explore/v2.1/catalog/datasets" "/georef-france-departement?select=data_processed").json()['data_processed'] file = get_file("https://public.opendatasoft.com/api/explore/v2.1/catalog/datasets" - "/georef-france-departement/exports/geojson?lang=fr&timezone=Europe%2FBerlin", + "/georef-france-departement/exports/geojson?lang=fr&timezone=Europe%2FParis", "georef-france-departement.geojson", etag) @@ -69,10 +69,10 @@ def importer_departements(engine: Engine, debug: bool = False) -> None: def importer_communes(engine: Engine, debug: bool = False) -> None: etag = requests.get( "https://public.opendatasoft.com/api/explore/v2.1/catalog/datasets" - "/georef-france-commune?select=data_processed").json()['data_processed'] + "/georef-france-commune-arrondissement-municipal?select=data_processed").json()['data_processed'] file = get_file("https://public.opendatasoft.com/api/explore/v2.1/catalog/datasets" - "/georef-france-commune/exports/geojson?lang=fr&timezone=Europe%2FBerlin", - "georef-france-commune.geojson", etag) + "/georef-france-commune-arrondissement-municipal/exports/geojson?lang=fr&timezone=Europe%2FParis", + "georef-france-commune-arrondissement-municipal.geojson", etag) with file.open('r') as f: features = json.load(f)['features'] @@ -100,7 +100,7 @@ def importer_bureaux_vote(engine: Engine, debug: bool = False) -> None: "https://public.opendatasoft.com/api/explore/v2.1/catalog/datasets" "/elections-france-bureau-vote-2022?select=data_processed").json()['data_processed'] file = get_file("https://public.opendatasoft.com/api/explore/v2.1/catalog/datasets" - "/elections-france-bureau-vote-2022/exports/geojson?lang=fr&timezone=Europe%2FBerlin", + "/elections-france-bureau-vote-2022/exports/geojson?lang=fr&timezone=Europe%2FParis", "elections-france-bureau-vote-2022.geojson", etag) with file.open('r') as f: