Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Analyzes graphs and networks in Python with NetworkX: centrality, shortest paths, community detection, generators, file I/O, visualization.
77% 100%+23 ptsof test cases passed
Passed 22 of 22 test cases with the skill, and 17 of 22 without it.
3 of 3 safety checks passed
47 agent runs
NetworkX is a Python library for creating, manipulating, and analyzing complex networks and graphs. It provides data structures for undirected, directed, and multi-edge graphs along with a comprehensive collection of graph algorithms, generators, and I/O utilities. Use NetworkX when working with relationship data in social networks, biological interaction networks, transportation systems, citation graphs, or any domain involving pairwise entity relationships.
igraph or graph-tool insteadgraph-tool with OpenMP or cuGraphtorch-geometric-graph-neural-networksnetworkx, matplotlib, scipy, pandas, numpypydot or pygraphviz (Graphviz layouts)pip install networkx matplotlib scipy pandas numpy
import networkx as nx
# Create a graph and add edges with weights
G = nx.karate_club_graph()
print(f"Nodes: {G.number_of_nodes()}, Edges: {G.number_of_edges()}")
# Nodes: 34, Edges: 78
# Compute centrality and find most central node
Skills that do similar work, with their benchmark result.
Next to this one in the catalogue, plus more from the same author.