Skip to content

Commit 66b5340

Browse files
gilmourjaudiracmichelle
authored andcommitted
remove test code and add change to download all countries
1 parent d5b07e7 commit 66b5340

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

utils/download_global_shapefiles.py

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,16 +25,11 @@ def get_global_shapefiles(output_dir):
2525
# Boundary types
2626
BOUNDARY_TYPE = ["/ADM0/", "/ADM1/", "/ADM2/", "/ADM3/", "/ADM4/", "/ADM5/"]
2727

28-
# Get the country ISO codes
29-
# allISOcodes = [country.alpha_3 for country in list(pycountry.countries)[1:3]]
30-
countries_test = list(pycountry.countries)[1:3]
31-
3228
with open(f"logfile_jsonfiles_{date}.txt", "w") as log_file:
33-
for i, c in enumerate(countries_test):
29+
for i, c in enumerate(pycountry.countries):
3430
log_file.write("---------------------------------------------------------------------\n")
35-
#find on ISO code
3631
ISO_CODE3 = c.alpha_3
37-
log_file.write(f"Beginning download of {c.name} — ISO Code {ISO_CODE3}{i + 1} of {len(countries_test)}\n")
32+
log_file.write(f"Beginning download of {c.name} — ISO Code {ISO_CODE3}{i + 1} of {len(pycountry.countries)}\n")
3833

3934
for j, boundary in enumerate(BOUNDARY_TYPE):
4035
dl_link = f"{URL}{RELEASE_TYPE}{ISO_CODE3}{boundary}"

0 commit comments

Comments
 (0)