this code generates HTML files with sub-graphs. The problem is it is not possible to copy some node id from html page to be able to paste to some other tool.
G = nx.from_pandas_edgelist(df, source='fromKey',
target='toKey',
create_using=nx.DiGraph)
i = 0
for h in nx.weakly_connected_components(G):
#Skip subgraphs with number of nodes < 10
if len(list(h))<10:
continue
i += 1
#Create subgraph
g=nx.subgraph(G, h)
#----Draw using pyvis
net = Network(height='1000px',
width='1000px',
directed=True#,
#heading='Subgraph '+str(i)
)
net.from_nx(g)
net.repulsion(central_gravity=0.1)
net.set_edge_smooth('dynamic')
net.show('subgraph_'+str(i)+'.html', notebook=False)
The graph looks good but not possible to select particular node id
Say, it is some node with id=100040003003405 – Is it any property which allows to copy ID using mouse cursor to be able to use it as a parameter for adhoc query rather than manually typing…