Skip to content

Commit

Permalink
backup source USDA
Browse files Browse the repository at this point in the history
  • Loading branch information
linogaliana committed Feb 8, 2025
1 parent f3ae44e commit f4d6188
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion content/modelisation/get_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,15 @@ def download_url(url, save_path):


def create_votes_dataframes():

Path("data").mkdir(parents=True, exist_ok=True)

# Backup de "https://www2.census.gov/geo/tiger/GENZ2019/shp/cb_2019_us_county_20m.zip",
download_url(
"https://www2.census.gov/geo/tiger/GENZ2019/shp/cb_2019_us_county_20m.zip",
"https://minio.lab.sspcloud.fr/lgaliana/data/python-ENSAE/shapefile_county_us_2019.zip",
"data/shapefile",
)

with zipfile.ZipFile("data/shapefile", "r") as zip_ref:
zip_ref.extractall("data/counties")

Expand Down

0 comments on commit f4d6188

Please sign in to comment.