.. _citytourlongrst: ================= Longer city tours ================= .. only:: html **Links:** :download:`notebook `, :downloadlink:`html `, :download:`PDF `, :download:`python `, :downloadlink:`slides `, :githublink:`GitHub|_doc/notebooks/challenges/city_tour/city_tour_long.ipynb|*` Bigger examples for the challenge: find the shortest path through a set of streets. .. code:: ipython3 %matplotlib inline import matplotlib.pyplot as plt plt.style.use("ggplot") .. code:: ipython3 from jyquickhelper import add_notebook_menu add_notebook_menu() .. contents:: :local: Level 1 ------- .. code:: ipython3 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) .. raw:: html
Level 2 ------- .. code:: ipython3 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) .. raw:: html
Level 3 ------- .. code:: ipython3 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) .. raw:: html