I am new to graphing in Python and have created a weighted directed graph by adding edges. By not using digraph is it not directed? And when I try to change nx.Graph to nx.digraph I get an error saying
TypeError: 'module' object is not callable
I would also like to make two matrices from the graph, one an adjacency and the other based off nodes that are connected to each other (like a competition matrix). I was able to make both but the nodes were no longer labeled. I did the connected nodes one by hand.
I am eventually trying to cluster the network so labels are important. I appreciate any advice. Thanks.
G = nx.Graph()
G.add_edge("N66", "N1", weight=1)
G.add_edge("N19", "N2", weight=1)
G.add_edge("N66", "N4", weight=3)
G.add_edge("N5", "N126", weight=1)
G.add_edge("N5", "N95", weight=1)
G.add_edge("N6", "N126", weight=1)
G.add_edge("N7", "N26", weight=1)
G.add_edge("N61", "N7", weight=1)
G.add_edge("N66", "N7", weight=1)
G.add_edge("N8", "N54", weight=3)
G.add_edge("N8", "N88", weight=1)
G.add_edge("N8", "N97", weight=1)
G.add_edge("N8", "N75", weight=1)
G.add_edge("N19", "N8", weight=1)
G.add_edge("N23", "N8", weight=1)
G.add_edge("N66", "N8", weight=3)
G.add_edge("N40", "N9", weight=1)
G.add_edge("N10", "N69", weight=1)
G.add_edge("N10", "N95", weight=1)...