Skip to content

Commit

Permalink
preparation donnees
Browse files Browse the repository at this point in the history
  • Loading branch information
linogaliana committed Dec 25, 2023
1 parent 15200a6 commit 4554c3d
Showing 1 changed file with 33 additions and 7 deletions.
40 changes: 33 additions & 7 deletions misc/prototype_mapshaper.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,18 @@
from cartiflette.pipeline import mapshaperize_split_from_s3, mapshaperize_merge_split_from_s3
from cartiflette.download.download import _download_sources

# DOWNLOAD =========================
path_within_bucket = "test-download11"

path_within_bucket = "test-download10"

path_bucket = upload_s3_raw(path_within_bucket=path_within_bucket)
path_bucket_cog = upload_s3_raw(
# DATA RETRIEVING STEP =========================

# IGN DATASET
path_bucket_adminexpress = upload_s3_raw(
path_within_bucket=path_within_bucket,
year = 2022
)

path_bucket_cog_commune = upload_s3_raw(
provider='Insee',
dataset_family='COG',
source="COMMUNE",
Expand All @@ -19,7 +25,9 @@
vectorfile_format="csv",
path_within_bucket=path_within_bucket
)
path_bucket_cog2 = upload_s3_raw(

# DEPARTEMENT (FOR COMMON NAMES)
path_bucket_cog_departement = upload_s3_raw(
provider='Insee',
dataset_family='COG',
source="DEPARTEMENT",
Expand All @@ -30,7 +38,22 @@
vectorfile_format="csv",
path_within_bucket=path_within_bucket
)
path_bucket_tagc1 = upload_s3_raw(

# REGIONS (FOR COMMON NAMES)
path_bucket_cog_departement = upload_s3_raw(
provider='Insee',
dataset_family='COG',
source="REGION",
territory="france_entiere",
borders="DATASET_INSEE_COG_REGION_FRANCE_ENTIERE_2022",
year=2022,
crs=None,
vectorfile_format="csv",
path_within_bucket=path_within_bucket
)

# TABLE PASSAGE COMMUNES, DEP, REGIONS
path_bucket_tagc_appartenance = upload_s3_raw(
provider='Insee',
dataset_family='TAGC',
source="APPARTENANCE",
Expand All @@ -41,7 +64,8 @@
vectorfile_format="csv",
path_within_bucket=path_within_bucket
)
path_bucket_tagc2 = upload_s3_raw(

path_bucket_tagc_passage = upload_s3_raw(
provider='Insee',
dataset_family='TAGC',
source="PASSAGE",
Expand All @@ -53,6 +77,8 @@
path_within_bucket=path_within_bucket
)

# PUTTING ALL METADATA TOGETHER



# TEST MAPSHAPERIZE
Expand Down

0 comments on commit 4554c3d

Please sign in to comment.