networkx

Create, manipulate, and analyze complex networks with Python's NetworkX library.

Updated Mar 20, 2026
One-click install
npx skills add https://github.com/chestnut0698/BUPT-DS-Personalized-Tourism-System --skill networkx-chestnut0698
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: networkx
Source: https://github.com/chestnut0698/BUPT-DS-Personalized-Tourism-System/tree/main/.agents/skills/networkx
Command: npx skills add https://github.com/chestnut0698/BUPT-DS-Personalized-Tourism-System --skill networkx-chestnut0698

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

NetworkX is designed to help solve complex network analysis problems. It allows you to create, manipulate, and analyze networks in Python, enabling you to visualize network structures and relationships between entities.

Core Features & Use Cases

  • Graph Creation and Manipulation: Create and manipulate various types of graphs including undirected, directed, multigraphs, and multidigraphs.
  • Graph Algorithms: Compute shortest paths, centrality measures, detect communities, and analyze connectivity.
  • Graph Generators: Generate synthetic networks for testing or simulation.
  • Graph I/O: Read and write graphs in various formats like edge lists, GraphML, GML, JSON, CSV, and more.
  • Visualization: Visualize networks using matplotlib or interactive libraries.
  • Use Case: Imagine you have a social network dataset. Use NetworkX to analyze the relationships between users, detect communities, and visualize the network structure.

Quick Start

Use the NetworkX skill to create a graph and compute the shortest path between two nodes.

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?

Network analysis in Python involves creating, manipulating, and visualizing graphs to model pairwise relationships. You compute centrality, detect communities, and find shortest paths across social, biological, or transportation networks.

Can I generate synthetic graphs for network simulation in Python?

Yes, generating synthetic graphs for network simulation is possible using built-in graph generators. This creates synthetic networks for testing algorithms or simulating complex network structures without needing real-world data.

Does Python work with GraphML, GML, and JSON formats for network visualization?

Python supports reading and writing graphs in various formats including GraphML, GML, JSON, CSV, and edge lists. This graph I/O capability ensures compatibility when importing network data or exporting visualization structures.

What is the best way to detect communities in a social network dataset?

Community detection in a social network dataset is best handled by applying specialized graph algorithms. These algorithms analyze the network structure to identify densely connected groups of nodes representing distinct communities.

What types of graphs can I create for directed and undirected network analysis?

For directed and undirected network analysis, you can create and manipulate various graph types including undirected graphs, directed graphs, multigraphs, and multidigraphs to accurately model complex network relationships.