networkx

Solid

Build, analyze, and visualize networks and graphs using NetworkX (Python). Use this skill whenever the user wants to: create graphs or networks, analyze graph properties, compute centrality measures, find shortest paths, detect communities, run graph algorithms, convert graphs to/from matrices or dataframes, visualize networks with matplotlib, import/export graph files (GML, GraphML, GEXF, edgelist, etc.), work with directed or undirected graphs, weighted or multigraphs, perform social network analysis, or do any graph theory computation. Trigger on keywords: networkx, graph, network, nodes, edges, adjacency, shortest path, centrality, community detection, spanning tree, flow, clique, PageRank, bipartite, DAG, topology, graph analysis, social network.

AI & Automation 71 stars 11 forks Updated 1 weeks ago MIT

Install

View on GitHub

Quality Score: 86/100

Stars 20%
62
Recency 20%
90
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# NetworkX Skill — Create and Manipulate Networks NetworkX (v3.6+) is the standard Python library for graph analysis. This skill covers everything from basic graph creation to advanced algorithms. When in doubt, prefer simple explicit code over clever one-liners — graphs are complex enough on their own. **References:** - [algorithms.md](references/algorithms.md) — Algorithm reference by category (centrality, community, flow, etc.) - [io.md](references/io.md) — File I/O and format conversion reference --- ## 1. Choosing a Graph Class Pick the right class first — it cannot easily be changed after construction. ```python import networkx as nx G = nx.Graph() # undirected, no parallel edges DG = nx.DiGraph() # directed, no parallel edges MG = nx.MultiGraph() # undirected + parallel edges allowed MD = nx.MultiDiGraph() # directed + parallel edges allowed ``` | Need | Class | |---|---| | Social networks, protein interactions | `Graph` | | Web graphs, citation networks, DAGs | `DiGraph` | | Transport networks (multiple routes) | `MultiGraph` | | Dependency graphs with typed edges | `MultiDiGraph` | Convert between types: ```python DG = G.to_directed() # Graph → DiGraph (each edge becomes two arcs) G2 = DG.to_undirected() # DiGraph → Graph ``` --- ## 2. Building Graphs ### Add Nodes Any hashable Python object is a valid node: int, str, tuple, frozenset. ```python G.add_node(1) G.add_node("Alice", age=30, role="engineer") # node with attributes...

Details

Author
SenolIsci
Repository
SenolIsci/mykg
Created
3 months ago
Last Updated
1 weeks ago
Language
Python
License
MIT

Similar Skills

Semantically similar based on skill content — not just same category

AI & Automation Listed

networkx

Comprehensive toolkit for creating, analyzing, and visualizing complex networks and graphs in Python. Use when working with network/graph data structures, analyzing relationships between entities, computing graph algorithms (shortest paths, centrality, clustering), detecting communities, generating synthetic networks, or visualizing network topologies. Applicable to social networks, biological networks, transportation systems, citation networks, and any domain involving pairwise relationships.

0 Updated today
Yuuqq
AI & Automation Listed

networkx

Create, analyze, and visualize complex networks and graphs in Python with NetworkX. Use when working with network/graph data structures, computing graph algorithms (shortest paths, centrality, clustering), detecting communities, generating synthetic networks (random, scale-free, small-world), reading/writing graph file formats, or drawing network topologies. Common applications include social, biological, transportation, and citation networks.

3 Updated 4 days ago
userInner
Code & Development Listed

graph-the-network

Build an entity-relationship link-analysis graph of an investigation — nodes, typed edges carrying source and confidence, aliases, and temporal validity — to expose shared infrastructure, bridging nodes and the real principal behind a frontman. Covers Maltego, Neo4j and Cypher, Gephi, centrality and community detection, and entity resolution. Use when an investigation has outgrown a list and needs a graph, or when asked how a set of people, companies and domains connect. Applies to fraud-ring and shell-network detection, AML and sanctions-evasion analysis, and complex corporate-structure work. Reference at useosint.com/skills/graph-the-network.

33 Updated 1 months ago
useosint