Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 74b8a94

Browse filesBrowse files
authored
Update main.py (#40)
- fixed typer prompt to use individual years (type cast from string back to int)
1 parent 7d87962 commit 74b8a94
Copy full SHA for 74b8a94

File tree

Expand file treeCollapse file tree

1 file changed

+4
-4
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+4
-4
lines changed

‎src/main.py

Copy file name to clipboardExpand all lines: src/main.py
+4-4Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -172,8 +172,8 @@ def process_osm(
172172
#prompt user to confirm which years to fetch
173173
year = typer.prompt("Type 'all' to use all years, or enter the year to fetch OSM data from the following years: ", osm.years,type=str)
174174
if year != "all":
175-
# repalce the years list with the selected year
176-
osm.years = [year]
175+
# replace the years list with the selected year
176+
osm.years = [int(year)]
177177

178178
# fetch OSM data for the selected years using the selected API
179179
osm.osm_to_geojson(osm.years, skip_fetch)
@@ -231,7 +231,7 @@ def enrich_lulc(
231231
year = typer.prompt("Type 'all' to use all years, or enter the year to use for the LULC enrichment from the following years: ", lew.years,type=str)
232232
if year != "all":
233233
# replace the years list with the selected year
234-
lew.years = [year]
234+
lew.years = [int(year)]
235235

236236
for year in lew.years:
237237
# 1. prepare and merge LULC and OSM data
@@ -298,7 +298,7 @@ def recalc_impedance(
298298
year = typer.prompt("Type 'all' to use all years, or enter the year to use for the LULC enrichment from the following years: ", iw.years,type=str)
299299
if year != "all":
300300
# replace the years list with the selected year
301-
iw.years = [year]
301+
iw.years = [int(year)]
302302

303303
for year in iw.years:
304304
# 1. Process the impedance configuration (initial setup + lulc & osm stressors)

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.