Get centralities for large scale graphs/ networks
- Using OSMnx and i-graph, this code can quickly get the closeness and betweenness centralities for large-scale networks.
- Trick is using the i-graph instead of networkx for centrality computation. Motivation: Issue #153 on osmnx
It accepts the following arguments:
- city_name: for save_file name
- bounding_box: a list with in NESW e.g.,[48.22,11.75,48.04,11.38]
- create_by: osmnx network creation argument = sys.argv[2]
- centrality_type: closeness or betweenness
- centrality_cutoff: cutt-off distance in metres beyond which nodes will not be considered for closeness centrality.
python munich [48.22,11.75,48.04,11.38] bbox closeness 10000
- osmnx (a really beautifull library)
- evrything else (i-graph, networkx, OSM)