social-network-analysis

Convert relational data into network measurements and models with NetworkX.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/Yuuqq/claude-social-science-skills --skill social-network-analysis
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: social-network-analysis
Source: https://github.com/Yuuqq/claude-social-science-skills/tree/main/social-science-skills/social-network-analysis
Command: npx skills add https://github.com/Yuuqq/claude-social-science-skills --skill social-network-analysis

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires networkx, pandas, python-louvain, leidenalg, igraph, and includes scripts (resource) and references (resource) and assets (resource) components.

What problem does it solve?

Social Network Analysis helps you turn relational data (who is connected to whom) into measurable structures you can explain, compare, and visualize.

Core Features & Use Cases

  • Network construction from data: Build graphs from edge lists, adjacency matrices, or text co-occurrence networks to represent social ties.
  • Centrality and structural metrics: Measure degree, betweenness, closeness, eigenvector centrality, PageRank, density, clustering, assortativity, and connectedness for interpreting roles in a network.
  • Community detection and core-periphery structure: Identify clusters (Louvain/Leiden) and determine core-periphery structure (k-core / coreness) to understand group formation and influence asymmetries.
  • ERGM-oriented structural inference: Support modeling how observed network structure arises using ERGM concepts (e.g., edges, reciprocity, transitivity) and report-ready workflow guidance.
  • Network visualization and reporting: Produce publication-oriented network plots and use a checklist to ensure boundary specification, metric reporting, and sensitivity transparency.

Quick Start

Use the social-network-analysis skill to analyze an edge-list dataset by computing centralities, detecting communities, summarizing network statistics, and generating a network visualization for reporting.

Frequently Asked Questions about social-network-analysis

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I compute centrality and detect communities in an edge list using NetworkX?

To compute centrality and detect communities, load your edge list into pandas, construct a NetworkX graph, then apply Louvain or Leiden algorithms to identify clusters. This workflow calculates degree, betweenness, and closeness centrality to measure node roles and structural network statistics.

Can I build a text co-occurrence network for social network analysis in Python?

Yes, you can build a text co-occurrence network for social network analysis by extracting word pairs from text and mapping them into an edge list. This process transforms textual relationships into a relational dataset suitable for graph construction, centrality measurement, and community detection.

What is the best way to identify core-periphery structure in relational data?

The best way to identify core-periphery structure in relational data is using k-core decomposition algorithms. This network analysis technique calculates node coreness to reveal influence asymmetries and group formation patterns within the constructed graph.

Does this network analysis workflow support ERGM modeling for social science studies?

Yes, this network analysis workflow supports ERGM modeling by preparing structural explanations for social science studies. It guides the evaluation of observed network structures using ERGM concepts like edges, reciprocity, and transitivity to report-ready standards.

What Python dependencies do I need for visualizing network graphs and centrality metrics?

You need NetworkX, pandas, python-louvain, leidenalg, and igraph for visualizing network graphs and centrality metrics. These dependencies support graph construction, community detection, and the generation of publication-oriented network plots from relational data.

When should I use directed or bipartite extensions for social network analysis?

Use directed or bipartite extensions for social network analysis when relational data contains asymmetric ties or two distinct node sets. These extensions ensure accurate centrality measurement and community detection by matching the graph structure to the underlying network topology.