8d817e42d7ed4f7dd4a6196d963eaef20cb1c684,osmnx/projection.py,,project_graph,#Any#Any#,126

Before Change


    start_time = time.time()

    // create a GeoDataFrame of the nodes, name it, convert osmid to str
    nodes = {node:data for node, data in G_proj.nodes(data=True)}
    gdf_nodes = gpd.GeoDataFrame(nodes).T
    gdf_nodes.crs = G_proj.graph["crs"]
    gdf_nodes.gdf_name = "{}_nodes".format(G_proj.name)
    gdf_nodes["osmid"] = gdf_nodes["osmid"].astype(np.int64).map(make_str)

    // create new lat/lon columns just to save that data for later, and create a
    // geometry column from x/y
    gdf_nodes["lon"] = gdf_nodes["x"]

After Change



    // create a GeoDataFrame of the nodes, name it, convert osmid to str
    nodes_data = [data for _, data in G_proj.nodes(data=True)]
    gdf_nodes = gpd.GeoDataFrame(nodes_data, index=G_proj.nodes(data=False))
    gdf_nodes.crs = G_proj.graph["crs"]
    gdf_nodes.gdf_name = "{}_nodes".format(G_proj.name)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 5

Non-data size: 3

Instances


Project Name: gboeing/osmnx
Commit Name: 8d817e42d7ed4f7dd4a6196d963eaef20cb1c684
Time: 2018-12-30
Author: jonas.klasen@moia.io
File Name: osmnx/projection.py
Class Name:
Method Name: project_graph


Project Name: gboeing/osmnx
Commit Name: b013b12999b16e11a5b965ae3ac0c9301c6888fa
Time: 2021-04-05
Author: boeing@usc.edu
File Name: osmnx/distance.py
Class Name:
Method Name: add_edge_lengths


Project Name: stellargraph/stellargraph
Commit Name: 956f06cd7860dd5387411c28890d87c70dcd8f42
Time: 2020-01-14
Author: Huon.Wilson@data61.csiro.au
File Name: tests/layer/test_rgcn.py
Class Name:
Method Name: get_As


Project Name: pgmpy/pgmpy
Commit Name: 4cbc6532d7fd2d1ffc1d7cd6fd71a9b60f1130c8
Time: 2014-11-30
Author: abinash.panda.ece10@itbhu.ac.in
File Name: pgmpy/models/FactorGraph.py
Class Name: FactorGraph
Method Name: to_markov_model


Project Name: gboeing/osmnx
Commit Name: 8d817e42d7ed4f7dd4a6196d963eaef20cb1c684
Time: 2018-12-30
Author: jonas.klasen@moia.io
File Name: osmnx/save_load.py
Class Name:
Method Name: graph_to_gdfs