Created
May 8, 2019 04:48
-
-
Save shaystrong/e025fd1f29e868d818da0402681b48b8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%matplotlib inline | |
import osmnx as ox | |
import matplotlib.pyplot as plt | |
place_name = "Nzwani Centre, Comores" | |
graph = ox.graph_from_place(place_name, which_result=2) | |
fig, ax = ox.plot_graph(graph) | |
area = ox.gdf_from_place(place_name) | |
buildings = ox.buildings_from_place(place_name) | |
nodes, edges = ox.graph_to_gdfs(graph) | |
fig, ax = plt.subplots() | |
area.plot(ax=ax, facecolor='black') | |
edges.plot(ax=ax, linewidth=1, edgecolor='#BC8F8F') | |
buildings.plot(ax=ax, facecolor='khaki', alpha=0.7) | |
plt.tight_layout() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment