cityImage.dual_id_dict#
- cityImage.dual_id_dict(dict_values, G, node_attribute)[source]#
It can be used when one deals with a dual graph and wants to link analyses conducted on this representation to the primal graph. For instance, it takes the dictionary containing the betweennes-centrality values of the nodes in the dual graph, and associates these variables to the corresponding edgeID.
- Parameters:
dict_values (dictionary) – It should be in the form {nodeID: value} where values is a measure that has been computed on the graph, for example.
G (networkx graph) – The graph that was used to compute or to assign values to nodes or edges.
node_attribute (string) – The attribute of the node to link to the edges GeoDataFrame.
- Returns:
ed_dict – A dictionary where each item consists of a edgeID (key) and centrality values (for example) or other attributes (values).
- Return type:
dictionary