Obtaining road speeds corresponding to OSMnx urban road networks from the HERE traffic API
place_name="Washington DC, USA"
G = ox.graph_from_place(place_name,network_type='drive', simplify=True)
- make sure to replace the API_KEY with your key when you created your account
get_edge_speeds(G,API_KEY)
- choose a cutoff distance (0.01 here) corresponding to the maximum distance between OSMnx nodes and HERE lat-long data
df_es=pd.read_csv('df_es.csv')
edges1=add_edge_speeds(G,df_es,0.01)
- For sample code look at the Example1.ipynb notebook