networkx

Create, manipulate, analyze, and visualize complex networks and graphs in Python.

2|Updated Feb 2, 2026
One-click install
npx skills add https://github.com/Weiwei-Mao/hydrology-skills --skill networkx-weiwei-mao
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: networkx
Source: https://github.com/Weiwei-Mao/hydrology-skills/tree/main/hydrology-skills/networkx
Command: npx skills add https://github.com/Weiwei-Mao/hydrology-skills --skill networkx-weiwei-mao

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill provides a comprehensive toolkit for creating, analyzing, and visualizing complex networks and graphs, enabling users to understand intricate relationships within data.

Core Features & Use Cases

  • Graph Creation & Manipulation: Build and modify various graph types (undirected, directed, multi-graphs).
  • Algorithm Library: Access a wide range of graph algorithms for analysis (shortest paths, centrality, community detection).
  • Data I/O: Read from and write to numerous file formats (GraphML, GML, CSV, JSON).
  • Visualization: Generate static and interactive network visualizations.
  • Use Case: Analyze a social network to identify influential users by computing their centrality scores, or model a transportation system to find the shortest routes between locations.

Quick Start

Use the networkx skill to draw a spring layout of the karate club graph with labels.

Frequently Asked Questions about networkx

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I analyze complex networks and pairwise relationships in Python?

To analyze complex networks in Python, you can create, manipulate, and study graphs to understand intricate relationships within your data. This toolkit supports various graph types including undirected, directed, and multi-graphs for comprehensive network analysis.

What algorithms are available for graph analysis and community detection?

Graph analysis algorithms include shortest path calculations, centrality measurements, and community detection. These algorithms help identify influential nodes in social networks or find optimal routes in transportation systems modeled as graphs.

Can I read and write network graph data using formats like GraphML, GML, and JSON?

Yes, you can read from and write to numerous file formats including GraphML, GML, CSV, and JSON. This data I/O capability allows seamless integration of graph structures with existing data pipelines and storage formats.

What is the best way to visualize network graphs and identify influential users?

The best way to visualize network graphs and identify influential users is by computing centrality scores and generating static or interactive visualizations. This approach reveals the structure of social networks and highlights key nodes.

Does Python network analysis support both social networks and biological networks?

Python network analysis supports social networks, biological networks, transportation systems, and any domain involving pairwise relationships. The toolkit handles various graph types and algorithms applicable across these diverse network structures.

Why use Python for graph theory analysis instead of other approaches?

Using Python for graph theory analysis provides a comprehensive toolkit for creating and manipulating complex graphs. It offers a wide range of algorithms for shortest paths, centrality, and community detection applicable to diverse network domains.