4e2a294ef733417631dbb90f586127a24a043a30,osmnx/utils_graph.py,,add_edge_lengths,#Any#Any#,146
Before Change
// extract the edges" endpoint nodes" coordinates
try:
coords = (
(u, v, k, G.nodes[u]["y"], G.nodes[u]["x"], G.nodes[v]["y"], G.nodes[v]["x"])
for u, v, k in G.edges
)
except KeyError: // pragma: no cover
missing_nodes = {
str(i)
for u, v, _ in G.edges(keys=True)
After Change
// fill nulls with zeros and round
gc_distances = gc_distances.fillna(value=0).round(precision)
nx.set_edge_attributes(G, name="length", values=gc_distances.to_dict() )
utils.log("Added edge lengths to graph")
return G
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 3
Instances Project Name: gboeing/osmnx
Commit Name: 4e2a294ef733417631dbb90f586127a24a043a30
Time: 2020-11-19
Author: boeing@usc.edu
File Name: osmnx/utils_graph.py
Class Name:
Method Name: add_edge_lengths
Project Name: gboeing/osmnx
Commit Name: 08884e278540cc3b3cbe780f6695bc8cbb4c05b6
Time: 2020-12-02
Author: boeing@usc.edu
File Name: osmnx/utils_graph.py
Class Name:
Method Name: add_edge_lengths
Project Name: has2k1/plotnine
Commit Name: a7024416e4ff05722bc2bcee0c2771933899dfe3
Time: 2014-03-30
Author: has2k1@gmail.com
File Name: ggplot/geoms/geom_area.py
Class Name: geom_area
Method Name: plot_layer