# arun110405/social-network-analysis---graph-metrics-and-modern-extensions architecture

> Architecture diagram of the GitHub repository arun110405/social-network-analysis---graph-metrics-and-modern-extensions, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-13). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/arun110405/social-network-analysis---graph-metrics-and-modern-extensions
- Repository: https://github.com/arun110405/social-network-analysis---graph-metrics-and-modern-extensions

## Overview

This is a Streamlit social-network analysis platform. Users select a graph, then the application loads and preprocesses it, computes graph statistics and centrality rankings, and presents visual results; its pages expose comparison, community detection, robustness, performance, visual analytics, and node explanations. Persistent caching and exports support the analysis workflow. Edges are limited to relationships shown in the excerpts, SOURCE INDEX, or README; several page implementations and subsystem internals were not sampled.

Main entry points: [`app.py`](https://github.com/arun110405/social-network-analysis---graph-metrics-and-modern-extensions/blob/main/app.py) (Dashboard workflow), [`modules/cache_manager.py`](https://github.com/arun110405/social-network-analysis---graph-metrics-and-modern-extensions/blob/main/modules/cache_manager.py) (Persistent cache), [`modules/loader.py`](https://github.com/arun110405/social-network-analysis---graph-metrics-and-modern-extensions/blob/main/modules/loader.py) (Graph loading), [`pages/Comparison.py`](https://github.com/arun110405/social-network-analysis---graph-metrics-and-modern-extensions/blob/main/pages/Comparison.py) (Comparison page)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["Application interface"]
  node_app["Dashboard workflow<br/>[app.py]"]
  node_dashboard["Dashboard<br/>[Dashboard.py]"]
  node_comparison_page["Comparison page<br/>[Comparison.py]"]
  node_community_page["Community page<br/>[Community.py]"]
  node_robustness_page["Robustness page<br/>[Robustness.py]"]
  node_performance_page["Performance page<br/>[Performance.py]"]
  node_visual_page["Visual analytics page"]
  node_explain_page["Explainability page<br/>[Explainability.py]"]
end

subgraph group_analysis["Network analysis"]
  node_loader["Graph loading<br/>[loader.py]"]
  node_preprocessing["Graph preprocessing<br/>[preprocessing.py]"]
  node_statistics["Graph statistics"]
  node_centrality["Centrality metrics<br/>[centrality.py]"]
  node_correlation["Ranking correlation<br/>[correlation.py]"]
  node_comparison["Ranking comparison<br/>[comparison.py]"]
  node_community["Community detection"]
  node_robustness["Robustness analysis<br/>[robustness.py]"]
  node_sensitivity["PageRank sensitivity"]
  node_visualization["Graph visualization<br/>[visualization.py]"]
  node_visual_analytics["Visual analytics"]
  node_explainability["Node explanations<br/>[explainability.py]"]
end

subgraph group_support["Workflow support"]
  node_cache[("Persistent cache<br/>[cache_manager.py]")]
  node_performance["Performance records<br/>[performance.py]"]
  node_export["Result export<br/>[export.py]"]
  node_config["Application configuration<br/>[config.py]"]
end

subgraph group_data["Data sources"]
  node_email["Email-Eu-Core dataset<br/>[email-Eu-Core.txt]"]
  node_web["Web-Google dataset<br/>[web-Google.txt]"]
  node_networkx["Built-in Karate Club"]
end

node_user(("Analyst"))

node_user -->|"selects dataset"| node_app
node_app -->|"loads graph"| node_loader
node_app -->|"preprocesses graph"| node_preprocessing
node_app -->|"computes statistics"| node_statistics
node_app -->|"computes rankings"| node_centrality
node_app -->|"computes correlation"| node_correlation
node_app -->|"plots graph"| node_visualization
node_app -->|"reads and writes"| node_cache
node_app -->|"records timings"| node_performance
node_app -->|"exports plots"| node_export
node_loader -.->|"loads dataset"| node_email
node_loader -.->|"loads dataset"| node_web
node_loader -.->|"loads dataset"| node_networkx
node_cache -->|"gets cache path"| node_config
node_user -->|"opens page"| node_dashboard
node_user -->|"opens page"| node_comparison_page
node_user -->|"opens page"| node_community_page
node_user -->|"opens page"| node_robustness_page
node_user -->|"opens page"| node_performance_page
node_user -->|"opens page"| node_visual_page
node_user -->|"opens page"| node_explain_page
node_community_page -->|"runs algorithms"| node_community
node_robustness_page -->|"runs experiments"| node_robustness
node_robustness -.->|"recomputes metrics"| node_centrality
node_performance_page -.->|"analyzes timings"| node_performance
node_visual_page -->|"uses analytics"| node_visual_analytics
node_explain_page -->|"requests explanations"| node_explainability
node_comparison_page -->|"uses cache"| node_cache
node_dashboard -->|"uses cache"| node_cache
node_explain_page -->|"uses cache"| node_cache
node_robustness_page -->|"uses cache"| node_cache
node_visual_page -->|"uses cache"| node_cache
node_sensitivity -->|"uses cache"| node_cache
node_comparison_page -.->|"compares rankings"| node_comparison

click node_app "https://github.com/arun110405/social-network-analysis---graph-metrics-and-modern-extensions/blob/main/app.py"
click node_dashboard "https://github.com/arun110405/social-network-analysis---graph-metrics-and-modern-extensions/blob/main/pages/Dashboard.py"
click node_comparison_page "https://github.com/arun110405/social-network-analysis---graph-metrics-and-modern-extensions/blob/main/pages/Comparison.py"
click node_community_page "https://github.com/arun110405/social-network-analysis---graph-metrics-and-modern-extensions/blob/main/pages/Community.py"
click node_robustness_page "https://github.com/arun110405/social-network-analysis---graph-metrics-and-modern-extensions/blob/main/pages/Robustness.py"
click node_performance_page "https://github.com/arun110405/social-network-analysis---graph-metrics-and-modern-extensions/blob/main/pages/Performance.py"
click node_visual_page "https://github.com/arun110405/social-network-analysis---graph-metrics-and-modern-extensions/blob/main/pages/Visual_Analytics.py"
click node_explain_page "https://github.com/arun110405/social-network-analysis---graph-metrics-and-modern-extensions/blob/main/pages/Explainability.py"
click node_loader "https://github.com/arun110405/social-network-analysis---graph-metrics-and-modern-extensions/blob/main/modules/loader.py"
click node_preprocessing "https://github.com/arun110405/social-network-analysis---graph-metrics-and-modern-extensions/blob/main/modules/preprocessing.py"
click node_statistics "https://github.com/arun110405/social-network-analysis---graph-metrics-and-modern-extensions/blob/main/modules/graph_statistics.py"
click node_centrality "https://github.com/arun110405/social-network-analysis---graph-metrics-and-modern-extensions/blob/main/modules/centrality.py"
click node_correlation "https://github.com/arun110405/social-network-analysis---graph-metrics-and-modern-extensions/blob/main/modules/correlation.py"
click node_comparison "https://github.com/arun110405/social-network-analysis---graph-metrics-and-modern-extensions/blob/main/modules/comparison.py"
click node_community "https://github.com/arun110405/social-network-analysis---graph-metrics-and-modern-extensions/blob/main/modules/community_detection.py"
click node_robustness "https://github.com/arun110405/social-network-analysis---graph-metrics-and-modern-extensions/blob/main/modules/robustness.py"
click node_sensitivity "https://github.com/arun110405/social-network-analysis---graph-metrics-and-modern-extensions/blob/main/evaluation/pagerank_sensitivity.py"
click node_visualization "https://github.com/arun110405/social-network-analysis---graph-metrics-and-modern-extensions/blob/main/modules/visualization.py"
click node_visual_analytics "https://github.com/arun110405/social-network-analysis---graph-metrics-and-modern-extensions/blob/main/modules/visual_analytics.py"
click node_explainability "https://github.com/arun110405/social-network-analysis---graph-metrics-and-modern-extensions/blob/main/modules/explainability.py"
click node_cache "https://github.com/arun110405/social-network-analysis---graph-metrics-and-modern-extensions/blob/main/modules/cache_manager.py"
click node_performance "https://github.com/arun110405/social-network-analysis---graph-metrics-and-modern-extensions/blob/main/modules/performance.py"
click node_export "https://github.com/arun110405/social-network-analysis---graph-metrics-and-modern-extensions/blob/main/modules/export.py"
click node_config "https://github.com/arun110405/social-network-analysis---graph-metrics-and-modern-extensions/blob/main/utils/config.py"
click node_email "https://github.com/arun110405/social-network-analysis---graph-metrics-and-modern-extensions/blob/main/data/raw/email_eu/email-Eu-Core.txt"
click node_web "https://github.com/arun110405/social-network-analysis---graph-metrics-and-modern-extensions/blob/main/data/raw/web_google/web-Google.txt"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_app,node_dashboard,node_comparison_page,node_community_page,node_robustness_page,node_performance_page,node_visual_page,node_explain_page toneBlue
class node_loader,node_preprocessing,node_statistics,node_centrality,node_correlation,node_comparison,node_community,node_robustness,node_sensitivity,node_visualization,node_visual_analytics,node_explainability toneAmber
class node_cache,node_performance,node_export,node_config toneMint
class node_email,node_web,node_networkx toneRose
class node_user toneIndigo
```

## Components

### Application interface

- [Dashboard workflow](https://github.com/arun110405/social-network-analysis---graph-metrics-and-modern-extensions/blob/main/app.py): `app.py`
- [Dashboard](https://github.com/arun110405/social-network-analysis---graph-metrics-and-modern-extensions/blob/main/pages/Dashboard.py): `pages/Dashboard.py`
- [Comparison page](https://github.com/arun110405/social-network-analysis---graph-metrics-and-modern-extensions/blob/main/pages/Comparison.py): `pages/Comparison.py`
- [Community page](https://github.com/arun110405/social-network-analysis---graph-metrics-and-modern-extensions/blob/main/pages/Community.py): `pages/Community.py`
- [Robustness page](https://github.com/arun110405/social-network-analysis---graph-metrics-and-modern-extensions/blob/main/pages/Robustness.py): `pages/Robustness.py`
- [Performance page](https://github.com/arun110405/social-network-analysis---graph-metrics-and-modern-extensions/blob/main/pages/Performance.py): `pages/Performance.py`
- [Visual analytics page](https://github.com/arun110405/social-network-analysis---graph-metrics-and-modern-extensions/blob/main/pages/Visual_Analytics.py): `pages/Visual_Analytics.py`
- [Explainability page](https://github.com/arun110405/social-network-analysis---graph-metrics-and-modern-extensions/blob/main/pages/Explainability.py): `pages/Explainability.py`

### Network analysis

- [Graph loading](https://github.com/arun110405/social-network-analysis---graph-metrics-and-modern-extensions/blob/main/modules/loader.py): `modules/loader.py`
- [Graph preprocessing](https://github.com/arun110405/social-network-analysis---graph-metrics-and-modern-extensions/blob/main/modules/preprocessing.py): `modules/preprocessing.py`
- [Graph statistics](https://github.com/arun110405/social-network-analysis---graph-metrics-and-modern-extensions/blob/main/modules/graph_statistics.py): `modules/graph_statistics.py`
- [Centrality metrics](https://github.com/arun110405/social-network-analysis---graph-metrics-and-modern-extensions/blob/main/modules/centrality.py): `modules/centrality.py`
- [Ranking correlation](https://github.com/arun110405/social-network-analysis---graph-metrics-and-modern-extensions/blob/main/modules/correlation.py): `modules/correlation.py`
- [Ranking comparison](https://github.com/arun110405/social-network-analysis---graph-metrics-and-modern-extensions/blob/main/modules/comparison.py): `modules/comparison.py`
- [Community detection](https://github.com/arun110405/social-network-analysis---graph-metrics-and-modern-extensions/blob/main/modules/community_detection.py): `modules/community_detection.py`
- [Robustness analysis](https://github.com/arun110405/social-network-analysis---graph-metrics-and-modern-extensions/blob/main/modules/robustness.py): `modules/robustness.py`
- [PageRank sensitivity](https://github.com/arun110405/social-network-analysis---graph-metrics-and-modern-extensions/blob/main/evaluation/pagerank_sensitivity.py): `evaluation/pagerank_sensitivity.py`
- [Graph visualization](https://github.com/arun110405/social-network-analysis---graph-metrics-and-modern-extensions/blob/main/modules/visualization.py): `modules/visualization.py`
- [Visual analytics](https://github.com/arun110405/social-network-analysis---graph-metrics-and-modern-extensions/blob/main/modules/visual_analytics.py): `modules/visual_analytics.py`
- [Node explanations](https://github.com/arun110405/social-network-analysis---graph-metrics-and-modern-extensions/blob/main/modules/explainability.py): `modules/explainability.py`

### Workflow support

- [Persistent cache](https://github.com/arun110405/social-network-analysis---graph-metrics-and-modern-extensions/blob/main/modules/cache_manager.py): `modules/cache_manager.py`
- [Performance records](https://github.com/arun110405/social-network-analysis---graph-metrics-and-modern-extensions/blob/main/modules/performance.py): `modules/performance.py`
- [Result export](https://github.com/arun110405/social-network-analysis---graph-metrics-and-modern-extensions/blob/main/modules/export.py): `modules/export.py`
- [Application configuration](https://github.com/arun110405/social-network-analysis---graph-metrics-and-modern-extensions/blob/main/utils/config.py): `utils/config.py`

### Data sources

- [Email-Eu-Core dataset](https://github.com/arun110405/social-network-analysis---graph-metrics-and-modern-extensions/blob/main/data/raw/email_eu/email-Eu-Core.txt): `data/raw/email_eu/email-Eu-Core.txt`
- [Web-Google dataset](https://github.com/arun110405/social-network-analysis---graph-metrics-and-modern-extensions/blob/main/data/raw/web_google/web-Google.txt): `data/raw/web_google/web-Google.txt`
- **Built-in Karate Club**

### Other components

- **Analyst**

## Connections

- Analyst → Dashboard workflow: selects dataset (evidence: `README.md`)
- Dashboard workflow → Graph loading: loads graph (evidence: `app.py`)
- Dashboard workflow → Graph preprocessing: preprocesses graph (evidence: `app.py`)
- Dashboard workflow → Graph statistics: computes statistics (evidence: `app.py`)
- Dashboard workflow → Centrality metrics: computes rankings (evidence: `app.py`)
- Dashboard workflow → Ranking correlation: computes correlation (evidence: `app.py`)
- Dashboard workflow → Graph visualization: plots graph (evidence: `app.py`)
- Dashboard workflow → Persistent cache: reads and writes (evidence: `app.py`)
- Dashboard workflow → Performance records: records timings (evidence: `app.py`)
- Dashboard workflow → Result export: exports plots (evidence: `app.py`)
- Graph loading → Email-Eu-Core dataset: loads dataset
- Graph loading → Web-Google dataset: loads dataset
- Graph loading → Built-in Karate Club: loads dataset
- Persistent cache → Application configuration: gets cache path (evidence: `modules/cache_manager.py`)
- Analyst → Dashboard: opens page (evidence: `README.md`)
- Analyst → Comparison page: opens page (evidence: `README.md`)
- Analyst → Community page: opens page (evidence: `README.md`)
- Analyst → Robustness page: opens page (evidence: `README.md`)
- Analyst → Performance page: opens page (evidence: `README.md`)
- Analyst → Visual analytics page: opens page (evidence: `README.md`)
- Analyst → Explainability page: opens page (evidence: `README.md`)
- Community page → Community detection: runs algorithms (evidence: `pages/Community.py`)
- Robustness page → Robustness analysis: runs experiments (evidence: `pages/Robustness.py`)
- Robustness analysis → Centrality metrics: recomputes metrics
- Performance page → Performance records: analyzes timings (evidence: `pages/Performance.py`)
- Visual analytics page → Visual analytics: uses analytics (evidence: `pages/Visual_Analytics.py`)
- Explainability page → Node explanations: requests explanations (evidence: `pages/Explainability.py`)
- Comparison page → Persistent cache: uses cache (evidence: `pages/Comparison.py`)
- Dashboard → Persistent cache: uses cache (evidence: `pages/Dashboard.py`)
- Explainability page → Persistent cache: uses cache (evidence: `pages/Explainability.py`)
- Robustness page → Persistent cache: uses cache (evidence: `pages/Robustness.py`)
- Visual analytics page → Persistent cache: uses cache (evidence: `pages/Visual_Analytics.py`)
- PageRank sensitivity → Persistent cache: uses cache (evidence: `evaluation/pagerank_sensitivity.py`)
- Comparison page → Ranking comparison: compares rankings
