ca2a2ac942aed0b0c6972420bc72d67ae4b1c24d,osmnx/folium.py,,plot_graph_folium,#Any#Any#Any#Any#Any#Any#Any#Any#Any#,69

Before Change


        graph_map = folium.Map(location=graph_centroid, zoom_start=zoom, tiles=tiles)

    // add each graph edge to the map
    for _, row in gdf_edges.iterrows():
        pl = _make_folium_polyline(
            edge=row,
            edge_color=edge_color,
            edge_width=edge_width,
            edge_opacity=edge_opacity,
            popup_attribute=popup_attribute,
            **kwargs,
        )
        pl.add_to(graph_map)

    // if fit_bounds is True, fit the map to the bounds of the route by passing
    // list of lat-lng points as [southwest, northeast]
    if fit_bounds and isinstance(graph_map, folium.Map):
        tb = gdf_edges.total_bounds
        graph_map.fit_bounds([(tb[1], tb[0]), (tb[3], tb[2])])

After Change


        graph_map = folium.Map(location=graph_centroid, zoom_start=zoom, tiles=tiles)

    // identify the geometry and popup columns
    if popup_attribute is None:
        attrs = ["geometry"]
    else:
        attrs = ["geometry", popup_attribute]

    // add each graph edge to the map
    for vals in gdf_edges[attrs].values:
        params = dict(zip(["geom", "popup_val"], vals))
        pl = _make_folium_polyline(
            **params,
            edge_color=edge_color,
            edge_width=edge_width,
            edge_opacity=edge_opacity,
            **kwargs,
        )
        pl.add_to(graph_map)

    // if fit_bounds is True, fit the map to the bounds of the route by passing
    // list of lat-lng points as [southwest, northeast]
    if fit_bounds and isinstance(graph_map, folium.Map):
        tb = gdf_edges.total_bounds
        graph_map.fit_bounds([(tb[1], tb[0]), (tb[3], tb[2])])
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 17

Instances


Project Name: gboeing/osmnx
Commit Name: ca2a2ac942aed0b0c6972420bc72d67ae4b1c24d
Time: 2020-12-02
Author: boeing@usc.edu
File Name: osmnx/folium.py
Class Name:
Method Name: plot_graph_folium


Project Name: gboeing/osmnx
Commit Name: ca2a2ac942aed0b0c6972420bc72d67ae4b1c24d
Time: 2020-12-02
Author: boeing@usc.edu
File Name: osmnx/folium.py
Class Name:
Method Name: plot_route_folium


Project Name: gboeing/osmnx
Commit Name: 7f1478d17783d08ddaa6dcf9b310dc8ee33cd656
Time: 2020-11-18
Author: boeing@usc.edu
File Name: osmnx/folium.py
Class Name:
Method Name: plot_route_folium


Project Name: gboeing/osmnx
Commit Name: 7f1478d17783d08ddaa6dcf9b310dc8ee33cd656
Time: 2020-11-18
Author: boeing@usc.edu
File Name: osmnx/folium.py
Class Name:
Method Name: plot_graph_folium


Project Name: gboeing/osmnx
Commit Name: ca2a2ac942aed0b0c6972420bc72d67ae4b1c24d
Time: 2020-12-02
Author: boeing@usc.edu
File Name: osmnx/folium.py
Class Name:
Method Name: plot_graph_folium