Networkx seems to be giving the wrong degree, it seems to be giving me double of what I would expect. I tested this in the following manner:
for i in G.nodes:
print(i, G.degree(i), G.edges(i))
This gives an output:
326171990 4 [(326171990, 915446299), (326171990, 911571535)]
911571527 2 [(911571527, 911571535)]
911571535 6 [(911571535, 326171990), (911571535, 911571527), (911571535, 6821895165)]
915446298 4 [(915446298, 915446299), (915446298, 915446302)]
915446299 4 [(915446299, 915446298), (915446299, 326171990)]
As you can see it seems to give double the degree it should be. This is for a multigraph with many nodes, the multigraph was converted from a MultiDiGraph created using osmnx library. One this I have discovered after further inspection is that edges that used to be directed in one direction are accounted for correctly in the degree of the node. Osmnx represents two way roads as two edges one in each direction, is possible that this is the cause, if so why doesn't the edge appear to be listed twice. Any assistance with this issue would be appreciated.
