Longer city tours#
Links: notebook
, html, PDF
, python
, slides, GitHub
Bigger examples for the challenge: find the shortest path through a set of streets.
%matplotlib inline
import matplotlib.pyplot as plt
plt.style.use("ggplot")
from jyquickhelper import add_notebook_menu
add_notebook_menu()
Level 1#
from ensae_projects.datainc.data_geo_streets import get_seattle_streets, shapely_records
from ensae_projects.datainc.data_geo_streets import seattle_streets_set_small, folium_html_street_map
name = get_seattle_streets()
shapes, records, fields = shapely_records(name)
edges_index, edges, vertices, distances = seattle_streets_set_small(shapes, records)
folium_html_street_map(edges_index, shapes, html_width="50%", zoom_start=15)
Level 2#
from ensae_projects.datainc.data_geo_streets import seattle_streets_set_level2
edges_index, edges, vertices, distances = seattle_streets_set_level2(shapes, records)
folium_html_street_map(edges_index, shapes, html_width="80%", zoom_start=14)
Level 3#
from ensae_projects.datainc.data_geo_streets import seattle_streets_set_level3
edges_index, edges, vertices, distances = seattle_streets_set_level3(shapes, records)
folium_html_street_map(edges_index, shapes, html_width="80%", zoom_start=13)