Fix bus parsing.
This commit is contained in:
parent
3a786c4b04
commit
24f4c49429
1 changed files with 2 additions and 2 deletions
|
|
@ -141,8 +141,8 @@ def load_buses(
|
|||
# Calculate CO2 emissions for bus (0.027 kg CO2e per passenger per km)
|
||||
item["co2_kg"] = item["distance"] * 0.1
|
||||
# Include GeoJSON route if defined in stations data
|
||||
from_station = item.get("from_stop")
|
||||
to_station = item.get("to_stop")
|
||||
from_station = item.get("from_station")
|
||||
to_station = item.get("to_station")
|
||||
if from_station and to_station:
|
||||
# Support scalar or mapping routes: string or dict of station name -> geojson base name
|
||||
routes_val = from_station.get("routes", {})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue