我已经成功下载了osmnx的0.14.0版本:
但是输出显示AttributeError:模块'osmnx'没有属性'speed'。
我该怎么做才能解决这个问题?我的python版本是3.8.1
另外,这是代码:
import folium
import pandas as pd
import numpy as np
import osmnx as ox
import networkx as nx
import os
ox.config(use_cache=True, log_console=True)
G = ox.graph_from_point((-33.889606, 151.283306), distance=3000, network_type='drive')
G = ox.speed.add_edge_speeds(G)
G = ox.speed.add_edge_travel_times(G)
orig = ox.get_nearest_node(G, (-33.889606, 151.283306))
dest = ox.get_nearest_node(G, (-33.862004, 151.211151))
route = nx.shortest_path(G, orig, dest, 'travel_time')
route_map = ox.plot_route_folium(G, route)
route_map.save('route_333.html')