gboeing / osmnx-examples

Gallery of OSMnx tutorials, usage examples, and feature demonstations.
https://osmnx.readthedocs.io
MIT License
1.52k stars 521 forks source link

missing keys module for the zeroth nb #24

Closed jgmbenoit closed 5 years ago

jgmbenoit commented 5 years ago

Running the second example in section `Get networks other ways' of the zerotn nb gives: ModuleNotFoundError Traceback (most recent call last)

in () 1 # add elevation to nodes automatically, calculate edge grades, plot network ----> 2 from keys import google_elevation_api_key 3 G = ox.add_node_elevations(G, api_key=google_elevation_api_key) 4 G = ox.add_edge_grades(G) 5 nc = ox.get_node_colors_by_attr(G, 'elevation', cmap='plasma', num_bins=20) ModuleNotFoundError: No module named 'keys'
gboeing commented 5 years ago

You just need to create a file called keys.py in the same folder as the notebook, and inside the file add a line

google_elevation_api_key = 'YOUR-API-KEY-HERE'