Skip to content

Commit

Permalink
prepare 2024 version
Browse files Browse the repository at this point in the history
  • Loading branch information
jgaffuri committed Aug 30, 2024
1 parent 4d24a23 commit 8ed129c
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/py/nuts2json.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,17 @@ def download():
for type in ["RG", "BN"]:

# NUTS
if debug: print( year + " " + scale + " " + type + " NUTS Download")
outfile = "download/NUTS_"+type+"_"+scale+"_"+year+"_4326.geojson"
if not Path(outfile).exists(): urllib.request.urlretrieve(baseURL + "nuts/geojson/NUTS_"+type+"_"+scale+"_"+year+"_4326.geojson", outfile)
url = baseURL + "nuts/geojson/NUTS_"+type+"_"+scale+"_"+year+"_4326.geojson"
if debug: print( year + " " + scale + " " + type + " NUTS Download", url)
if not Path(outfile).exists(): urllib.request.urlretrieve(url, outfile)

# CNTR
if debug: print( year + " " + scale + " " + type + " CNTR Download")
outfile = "download/CNTR_"+type+"_"+scale+"_"+year+"_4326.geojson"
year_ = ("2020" if year=="2021" else year)
if not Path(outfile).exists(): urllib.request.urlretrieve(baseURL + "countries/geojson/CNTR_"+type+"_"+scale+"_"+year_+"_4326.geojson", outfile)
url = baseURL + "countries/geojson/CNTR_"+type+"_"+scale+"_"+year_+"_4326.geojson"
if debug: print( year + " " + scale + " " + type + " CNTR Download", url)
if not Path(outfile).exists(): urllib.request.urlretrieve(url, outfile)



Expand Down

0 comments on commit 8ed129c

Please sign in to comment.