gboeing / osmnx-examples

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

Fix issue #36 TypeError: "Set type is unordered" #37

Closed oefe closed 4 years ago

oefe commented 4 years ago

This fixes issue #36 by explicitly converting the NodeView to a list.

Change:

nodes_gdf = gpd.GeoDataFrame({'id': subgraph.nodes()}, geometry=node_points)

To:


nodes_gdf = gpd.GeoDataFrame({'id': list(subgraph.nodes())}, geometry=node_points)
gboeing commented 4 years ago

Thanks!