Skip to content

rskworld/network-analysis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Social Network Analysis Visualization

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.

Features

Core Visualizations

  • 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

Advanced Features

  • 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

Technologies

  • Python
  • NetworkX
  • Plotly
  • Pandas
  • NumPy
  • Jupyter Notebook

Installation

  1. Clone or download this repository
  2. Install the required packages:
pip install -r requirements.txt

Usage

Jupyter Notebook

Open network_analysis.ipynb in Jupyter Notebook to explore the interactive visualizations.

Python Script

Run the main analysis script:

python network_analysis.py

HTML Demo

Open index.html in a web browser to view the interactive network visualizations.

Project Structure

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)

Usage Examples

Basic Analysis

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()

Advanced Features

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)

Export Results

from export_utils import NetworkExporter

exporter = NetworkExporter('output')
exporter.export_analysis_to_csv(G, analysis)
exporter.export_visualization(fig, 'network_graph', format='png')

Author

RSK World

License

This project is provided as-is for educational and demonstration purposes.

About

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.

Resources

License

Contributing

Stars

Watchers

Forks

Packages

 
 
 

Contributors