-
Notifications
You must be signed in to change notification settings - Fork 4
Update get_osm_data script
#241
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| gdf_nodes, gdf_edges = ox.graph_to_gdfs(G) | ||
| # plot graph on a 16x9 figure and save into file | ||
| ox.plot_graph(GRAPH, show=False, close=True, save=True, filepath="./final.png") | ||
| gdf_nodes, gdf_edges = ox.graph_to_gdfs(ox.project_graph(GRAPH, to_latlong=True)) |
Check warning
Code scanning / Pylint (reported by Codacy)
Constant name "gdf_nodes" doesn't conform to UPPER_CASE naming style Warning
| gdf_nodes, gdf_edges = ox.graph_to_gdfs(G) | ||
| # plot graph on a 16x9 figure and save into file | ||
| ox.plot_graph(GRAPH, show=False, close=True, save=True, filepath="./final.png") | ||
| gdf_nodes, gdf_edges = ox.graph_to_gdfs(ox.project_graph(GRAPH, to_latlong=True)) |
Check warning
Code scanning / Pylint (reported by Codacy)
Constant name "gdf_edges" doesn't conform to UPPER_CASE naming style Warning
| N_DUPLICATES = 0 | ||
| else: | ||
| # Check for duplicate edges | ||
| duplicated_mask = gdf_edges.duplicated(subset=["u", "v"]) |
Check warning
Code scanning / Pylint (reported by Codacy)
Constant name "duplicated_mask" doesn't conform to UPPER_CASE naming style Warning
| N_DUPLICATES, | ||
| ) | ||
| # Plot the graph with duplicated edges in red | ||
| edge_colors = [ |
Check warning
Code scanning / Pylint (reported by Codacy)
Constant name "edge_colors" doesn't conform to UPPER_CASE naming style Warning
| ox.plot_graph(GRAPH, edge_color=edge_colors) | ||
|
|
||
| # Remove duplicated edges | ||
| gdf_edges = gdf_edges.drop_duplicates(subset=["u", "v"]) |
Check warning
Code scanning / Pylint (reported by Codacy)
Constant name "gdf_edges" doesn't conform to UPPER_CASE naming style Warning
| # Save the data | ||
| gdf_nodes.to_csv("nodes.csv", sep=";", index=False) | ||
| gdf_edges.to_csv("edges.csv", sep=";", index=False) | ||
| place = parser.place.split(",")[0].strip().lower() |
Check warning
Code scanning / Pylint (reported by Codacy)
Constant name "place" doesn't conform to UPPER_CASE naming style Warning
New features:
osmnxfeatures rather than my buggy filters :c