Social Network Analysis
approvedby fiddlestix27
Performs comprehensive social network analysis on your graph view, including various centrality measures, directional analysis, and graph layout customization. - This plugin has not been manually reviewed by Obsidian staff.
Obsidian Social Network Analysis Plugin
Obsidian plugin for analyzing the social networks within your knowledge base using graph theory metrics and visualization.
Features
- Multiple Centrality Measures: Degree, Betweenness, Eigenvector, Closeness, PageRank, and Harmonic centrality
- Clustering Analysis: Calculate clustering coefficients to identify communities
- Weighted Links: Optional link weighting based on mention frequency
- Directional Analysis: Analyze backlink direction in your graph
- Auto-Export: Automatically export analysis results to markdown files (currently broken)
- Interactive UI: View results in a dedicated panel with sortable metrics
Quick Start (Users)
Installation
-
Navigate to your Obsidian vault's plugins folder:
.obsidian/plugins/- If it doesn't exist, enable "Community plugins" in Settings and click the folder icon next to "Installed plugins"
-
Clone this repository into the plugins folder:
cd .obsidian/plugins git clone https://github.com/fiddlestix27/Obsidian-SNA.git
That's it! The plugin is ready to use.
Development Setup (Contributors)
If you want to modify the plugin, follow these steps:
Setup
-
Clone the repository into your development folder (development within the actual plugins folder is not recommended):
cd <repository-development-folder> git clone https://github.com/fiddlestix27/Obsidian-SNA.git obsidian-sna cd obsidian-sna -
Install dependencies:
npm install
Making Changes
-
Make your desired changes
-
Remove the current
main.jsfile -
Recompile the plugin:
npm run buildOr for development with watch mode:
npm run dev -
Restart Obsidian to see your changes
The recompiled main.js will be generated automatically.
Usage
Opening the Plugin
- Use the command palette (
Cmd/Ctrl + P) and search for "Social Network Analysis" - Or use the sidebar icon
Analyzing Your Graph
- Open the Graph view in Obsidian (Ctrl/Cmd + G)
- In the Social Network Analysis panel, click "Analyze Graph"
- View results for all centrality measures
- Export results with the "Export Results" button
Available Commands
- Open: Open the SNA panel
- Analyze Graph: Run analysis on your current graph
- Calculate Centrality Measures: Compute all centrality metrics
- Export Results: Save results to a markdown file
Settings
Graph Analysis Options
- Enable Directional Analysis: Consider backlink direction (default: ON)
- Enable Weighted Links: Weight edges by mention frequency (default: ON)
- Enable Clustering: Calculate clustering coefficients (default: ON)
- Layout Algorithm: Choose from force-directed, hierarchical, or circular (default: force-directed)
- Minimum Link Weight: Filter links below this threshold (default: 1)
- Auto-Export Results: Automatically save results after analysis (default: OFF) - currently broken
Individual Metrics
Toggle individual centrality measures on/off:
- Closeness Centrality
- Betweenness Centrality
- Eigenvector Centrality
- PageRank
- Harmonic Centrality
Centrality Measures Explained
Degree Centrality
Number of direct connections each node has. Nodes with high degree centrality are hubs in your network.
Betweenness Centrality
Measures how often a node appears on shortest paths between other nodes. High betweenness indicates a node that bridges different parts of your graph.
Eigenvector Centrality
Importance based on connections to other important nodes. A node is important if it connects to other important nodes.
Closeness Centrality
Average distance to all other nodes. Nodes with high closeness are well-integrated into the network.
PageRank
Probability of reaching a node through random walk. Useful for identifying "hub" notes that many others link to.
Harmonic Centrality
Sum of reciprocals of distances to all other nodes. A more robust alternative to closeness centrality.
Clustering Coefficient
Measures how much neighbors of a node are connected. High clustering indicates tight-knit communities.
System Requirements
- Obsidian 1.7.2 or higher
- Node.js 24+ (for development/building from source)
- npm (for development/building from source)
Performance
The plugin is optimized for networks up to 5,000+ nodes. For very large graphs, analysis may take several seconds depending on your hardware.
Troubleshooting
Plugin won't load
- Ensure
manifest.json,main.js, andstyles.cssare in the plugin folder - Restart Obsidian
- Check Obsidian console for error messages (Settings → About → Open debug console)
No graph data found
- Open the Graph view first (Ctrl/Cmd + G)
- Ensure your vault has linked notes
- Try clicking "Analyze Graph" again
Analysis is slow
- Try reducing the number of enabled metrics in settings
- Close other resource-intensive plugins
- Limit analysis to a subset of your graph if possible
Contributing
Contributions are welcome! Please:
- Fork the repository
- Create a feature branch
- Make your changes
- Run
npm run buildto recompile - Submit a pull request
License
GNU GPL v3 License
Support
For issues, feature requests, or questions:
- Open an issue on GitHub
Good plugins to integrate with this
https://github.com/elsatam/obsidian-extended-graph
https://github.com/mafgin/obsidian-graph-heatmap
https://github.com/moonweave/obsidian-graph-styler
https://github.com/obsidianmd/obsidian-importer - automated data import from csv or other formats, maintained by Obsidian themselves. Great if you want to perform SNA on large datasets.
Changelog
v1.0.0
- Initial release
- All core centrality measures implemented
- Interactive UI panel
- Settings and customization
- Auto-export functionality
v1.1.0
- Updated dependencies to latest stable releases
- Added eslint.config.mjs for cleaner linting
- Awaited updates:
- layout customization
- narrow by path or grouping (adjust SNA calculations by current view)
- left vs right eigenvector specifications when directional analysis is enabled
- fix auto export
For plugin developers
Search results and similarity scores are powered by semantic analysis of your plugin's README. If your plugin isn't appearing for searches you'd expect, try updating your README to clearly describe your plugin's purpose, features, and use cases.