Skip to content

Commit

Permalink
Add fixes for administrative codes
Browse files Browse the repository at this point in the history
  • Loading branch information
ekatef committed Nov 30, 2024
1 parent ccc3c64 commit 396394b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions scripts/build_shapes.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ def get_GADM_filename(country_code):
"UM": "UMI", # united states minor outlying islands
"SJ": "SJM", # svalbard
"CX": "CXR", # Christmas island
"IC": "ESP", # canary islands
}

if country_code in special_codes_GADM:
Expand Down Expand Up @@ -436,6 +437,11 @@ def download_WorldPop(
size_min : int
Minimum size of each file to download
"""

# from the administrative perspective, canary islands belong to Spain
if country_code == "IC":
country_code = "ESP"

if worldpop_method == "api":
return download_WorldPop_API(country_code, year, update, out_logging, size_min)

Expand Down

0 comments on commit 396394b

Please sign in to comment.