This project visualizes social networks using NetworkX and Plotly. It includes node-link diagrams, community detection, centrality measures, and interactive network exploration. Perfect for analyzing relationships and network structures.
- Interactive network graphs - 2D and 3D node-link diagrams
- Community detection visualization - Color-coded community clusters
- Centrality measures - Degree, Betweenness, Closeness, Eigenvector, PageRank
- Network metrics dashboard - Density, clustering, degree distribution
- Edge analysis - Edge weights and betweenness visualization
- Shortest path visualization - Find and visualize paths between nodes
- Subgraph extraction - Extract and visualize subgraphs
- Network generation - Generate various network types (random, scale-free, small-world, etc.)
- Path analysis - Analyze shortest paths and network diameter
- Key node identification - Find important nodes by various metrics
- Network resilience analysis - Test network robustness
- Network comparison - Compare multiple networks side-by-side
- Data export - Export analysis results to CSV, JSON, and images
- Python
- NetworkX
- Plotly
- Pandas
- NumPy
- Jupyter Notebook
- Clone or download this repository
- Install the required packages:
pip install -r requirements.txtOpen network_analysis.ipynb in Jupyter Notebook to explore the interactive visualizations.
Run the main analysis script:
python network_analysis.pyOpen index.html in a web browser to view the interactive network visualizations.
network-analysis/
├── README.md
├── requirements.txt
├── QUICKSTART.md
├── LICENSE
├── network_analysis.ipynb # Jupyter notebook
├── network_analysis.py # Main analysis script
├── advanced_analysis.py # Advanced analysis features
├── network_visualizer.py # Visualization module
├── network_generator.py # Network generation utilities
├── export_utils.py # Export functionality
├── utils.py # Utility functions
├── index.html # HTML demo page
├── data/
│ └── sample_network.csv
└── output/
└── (generated visualizations and exports)
from network_analysis import create_sample_network, analyze_network
from network_visualizer import NetworkVisualizer
# Create and analyze network
G = create_sample_network()
analysis = analyze_network(G)
# Visualize
visualizer = NetworkVisualizer()
fig = visualizer.create_network_graph(G, analysis)
fig.show()from advanced_analysis import analyze_shortest_paths, find_key_nodes
from network_generator import NetworkGenerator
# Generate different network types
generator = NetworkGenerator()
random_net = generator.generate_random_network(50, 0.1)
scale_free = generator.generate_scale_free_network(50, 2)
# Analyze paths
path_analysis = analyze_shortest_paths(G)
# Find key nodes
key_nodes = find_key_nodes(G, analysis)from export_utils import NetworkExporter
exporter = NetworkExporter('output')
exporter.export_analysis_to_csv(G, analysis)
exporter.export_visualization(fig, 'network_graph', format='png')RSK World
- Website: https://rskworld.in
- Email: help@rskworld.in
- Phone: +91 93305 39277
This project is provided as-is for educational and demonstration purposes.