Skip to content

Commit

Permalink
fixes for v2
Browse files Browse the repository at this point in the history
  • Loading branch information
gboeing committed Mar 14, 2024
1 parent 3b1edcf commit 8519b41
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 8 deletions.
10 changes: 5 additions & 5 deletions notebooks/02-routing-speed-time.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@
"# same thing again, but this time pass in a few default speed values (km/hour)\n",
"# to fill in edges with missing `maxspeed` from OSM\n",
"hwy_speeds = {\"residential\": 35, \"secondary\": 50, \"tertiary\": 60}\n",
"G = ox.add_edge_speeds(G, hwy_speeds)\n",
"G = ox.add_edge_speeds(G, hwy_speeds=hwy_speeds)\n",
"G = ox.add_edge_travel_times(G)"
]
},
Expand Down Expand Up @@ -226,10 +226,10 @@
"outputs": [],
"source": [
"# compare the two routes\n",
"route1_length = int(sum(ox.routing.route_to_gdf(G, route1, \"length\")[\"length\"]))\n",
"route2_length = int(sum(ox.routing.route_to_gdf(G, route2, \"length\")[\"length\"]))\n",
"route1_time = int(sum(ox.routing.route_to_gdf(G, route1, \"travel_time\")[\"travel_time\"]))\n",
"route2_time = int(sum(ox.routing.route_to_gdf(G, route2, \"travel_time\")[\"travel_time\"]))\n",
"route1_length = int(sum(ox.routing.route_to_gdf(G, route1, weight=\"length\")[\"length\"]))\n",
"route2_length = int(sum(ox.routing.route_to_gdf(G, route2, weight=\"length\")[\"length\"]))\n",
"route1_time = int(sum(ox.routing.route_to_gdf(G, route1, weight=\"travel_time\")[\"travel_time\"]))\n",
"route2_time = int(sum(ox.routing.route_to_gdf(G, route2, weight=\"travel_time\")[\"travel_time\"]))\n",
"print(\"Route 1 is\", route1_length, \"meters and takes\", route1_time, \"seconds.\")\n",
"print(\"Route 2 is\", route2_length, \"meters and takes\", route2_time, \"seconds.\")"
]
Expand Down
1 change: 0 additions & 1 deletion notebooks/09-example-figure-ground.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,6 @@
"fig, ax = ox.plot_figure_ground(\n",
" G=G,\n",
" filepath=fp,\n",
" network_type=\"all\",\n",
" street_widths=street_widths,\n",
" default_width=4,\n",
" dpi=40,\n",
Expand Down
1 change: 0 additions & 1 deletion notebooks/10-building-footprints.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,6 @@
" fig, ax = ox.plot_figure_ground(\n",
" G=G,\n",
" dist=dist,\n",
" network_type=network_type,\n",
" default_width=default_width,\n",
" street_widths=street_widths,\n",
" save=False,\n",
Expand Down
2 changes: 1 addition & 1 deletion notebooks/11-interactive-web-mapping.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@
"outputs": [],
"source": [
"# explore a route interactively\n",
"route_edges = ox.routing.route_to_gdf(G, route, weight)\n",
"route_edges = ox.routing.route_to_gdf(G, route, weight=weight)\n",
"route_edges.explore(tiles=\"cartodbpositron\", style_kwds={\"weight\": 5})"
]
},
Expand Down

0 comments on commit 8519b41

Please sign in to comment.