Social Network Analysis with Python

This post gives a brief introduction to network analysis and implementing it with Python

Introduction

SNA is a powerful tool. It allows us to explore the underlying structure of an organization or network, identifying the formal and informal relationships that drive the formal processes and outcomes. This insight can enable better communication, facilitate change management, and inspire more efficient collaboration This will become a hoverable footnote..


Definition of Social Network Analysis (SNA)

SNA is a powerful tool. It allows us to explore the underlying structure of an organization or network, identifying the formal and informal relationships that drive the formal processes and outcomes. This insight can enable better communication, facilitate change management, and inspire more efficient collaboration.


Fundamental Concepts

SNA is a powerful tool. It allows us to explore the underlying structure of an organization or network, identifying the formal and informal relationships that drive the formal processes and outcomes. This insight can enable better communication, facilitate change management, and inspire more efficient collaboration.


Graphs

A network is represented by a graph \(G(V,E)\). A graph \(G=(V,E)\) is ordered pair of sets, where \(V\) is denoted as set of vertices or nodes and \(E\) is set of edges or links. The number of elements in $V$ is known as cardinality of \(V\), \(n = |V|\), and also for the edges, \(m = |E|\). An edge \(e_{ij} = (v_i, v_j)\) is pair of vertices (ordered pair for directed graph). Graph can also represented as matrix which known as adjacency matrix \(A^{n \times n}\), and this matrix has nonzero element \(a_{ij}\) when there is an edge \(e_{ij}\).

An example of undirected graph and its matrix form.

In figure above describes the undirected graph which has five vertices or nodes and six edges and corresponds to its matrix form which has size of \(5 \times 5\) matrix. Notice that the undirected graph is represented as symmetric matrix. We now use the term of networks, instead of graph, and so for vertices to nodes, and for edges to links.

A network can be undirected or directed. A directed network is also called a digraph. In directed networks, links are called directed links and the order of the nodes in a link reflects the direction: the link \((i,j)\) goes from the source node \(i\) to the target node \(j\). A network can be unweighted or weighted. In a weighted network, links have associated weights: the weighted link \((i,j, w)\) between nodes \(i\) and nodes \(j\) has weight \(w\). A network can be both directed and weighted, in which case it has directed weighted links.

Graphical representations of undirected, directed, and weighted networks. The circle represents the nodes. Pairs of adjacent nodes connected by a line (link) or arrow (directed link) which indicates the direction of the links. The thickness of a link represents its weight in weighted networks.

Here is the code for visualizing sample networks using networkx

The maximum number of links in undirected network with \(N\) nodes can be calculated

\[\begin{eqnarray} \label{eq:Lmax} L_{\text{max}} &=& \binom{N}{2} \\ &=& \frac{N!}{2!(N-2)!} \\ &=& \frac{N(N-1)(N-2)!}{2!(N-2)!} \\ &=& \frac{N(N-1)}{2} \end{eqnarray}\]

and for directed network is

\[\begin{equation} \label{eq:Lmax_digraph} L_{\text{max}} = N(N-1) \end{equation}\]

However, the actual number of links is typically much smaller than the maximum. Therefore, we want to know how much dense the network we have by the fraction of pairs of nodes that are actually connected. This is we called the density of the network, and we can calculated using the following formula

\[\begin{equation} \label{eq:density} d = \frac{L}{L_{\text{max}}} \end{equation}\]

Thus, subtitute \(\ref{eq:Lmax}\) to \(\ref{eq:density}\) gives the density of undirected network given \(N\) nodes.

\[\begin{equation} \label{eq:density_undirected} d = \frac{2L}{N(N-1)} \end{equation}\]

Similarly, we can calculate the density for directed network by subtituting \(\ref{eq:Lmax_digraph}\) to \(\ref{eq:density}\) and we get

\[\begin{equation} \label{eq:density_digraph} d = \frac{L}{N(N-1)}. \end{equation}\]

Network Types

SNA is a powerful tool. It allows us to explore the underlying structure of an organization or network, identifying the formal and informal relationships that drive the formal processes and outcomes. This insight can enable better communication, facilitate change management, and inspire more efficient collaboration.


Network Properties

SNA is a powerful tool. It allows us to explore the underlying structure of an organization or network, identifying the formal and informal relationships that drive the formal processes and outcomes. This insight can enable better communication, facilitate change management, and inspire more efficient collaboration.


Dyadic and Triadic Relationship

SNA is a powerful tool. It allows us to explore the underlying structure of an organization or network, identifying the formal and informal relationships that drive the formal processes and outcomes. This insight can enable better communication, facilitate change management, and inspire more efficient collaboration.


Homophily and Heterophily

SNA is a powerful tool. It allows us to explore the underlying structure of an organization or network, identifying the formal and informal relationships that drive the formal processes and outcomes. This insight can enable better communication, facilitate change management, and inspire more efficient collaboration.


Network Topologies

SNA is a powerful tool. It allows us to explore the underlying structure of an organization or network, identifying the formal and informal relationships that drive the formal processes and outcomes. This insight can enable better communication, facilitate change management, and inspire more efficient collaboration.


Theoretical Background

SNA is a powerful tool. It allows us to explore the underlying structure of an organization or network, identifying the formal and informal relationships that drive the formal processes and outcomes. This insight can enable better communication, facilitate change management, and inspire more efficient collaboration.


Strength of Weak Ties Theory

SNA is a powerful tool. It allows us to explore the underlying structure of an organization or network, identifying the formal and informal relationships that drive the formal processes and outcomes. This insight can enable better communication, facilitate change management, and inspire more efficient collaboration.


Structural Hole Theory

SNA is a powerful tool. It allows us to explore the underlying structure of an organization or network, identifying the formal and informal relationships that drive the formal processes and outcomes. This insight can enable better communication, facilitate change management, and inspire more efficient collaboration.


Small World Network Theory

SNA is a powerful tool. It allows us to explore the underlying structure of an organization or network, identifying the formal and informal relationships that drive the formal processes and outcomes. This insight can enable better communication, facilitate change management, and inspire more efficient collaboration.


Scale-Free Network Model

SNA is a powerful tool. It allows us to explore the underlying structure of an organization or network, identifying the formal and informal relationships that drive the formal processes and outcomes. This insight can enable better communication, facilitate change management, and inspire more efficient collaboration.


Data Collection and Preparation

SNA is a powerful tool. It allows us to explore the underlying structure of an organization or network, identifying the formal and informal relationships that drive the formal processes and outcomes. This insight can enable better communication, facilitate change management, and inspire more efficient collaboration.


Primary Methods for Collecting SNA Data

SNA is a powerful tool. It allows us to explore the underlying structure of an organization or network, identifying the formal and informal relationships that drive the formal processes and outcomes. This insight can enable better communication, facilitate change management, and inspire more efficient collaboration.


Secondary Sources of SNA Data

SNA is a powerful tool. It allows us to explore the underlying structure of an organization or network, identifying the formal and informal relationships that drive the formal processes and outcomes. This insight can enable better communication, facilitate change management, and inspire more efficient collaboration.


Ethical Considerations in Data Collection

SNA is a powerful tool. It allows us to explore the underlying structure of an organization or network, identifying the formal and informal relationships that drive the formal processes and outcomes. This insight can enable better communication, facilitate change management, and inspire more efficient collaboration.


Preparing Data for Analysis

SNA is a powerful tool. It allows us to explore the underlying structure of an organization or network, identifying the formal and informal relationships that drive the formal processes and outcomes. This insight can enable better communication, facilitate change management, and inspire more efficient collaboration.


Network Analysis Methods and Techniques

SNA is a powerful tool. It allows us to explore the underlying structure of an organization or network, identifying the formal and informal relationships that drive the formal processes and outcomes. This insight can enable better communication, facilitate change management, and inspire more efficient collaboration.


Network Centrality

SNA is a powerful tool. It allows us to explore the underlying structure of an organization or network, identifying the formal and informal relationships that drive the formal processes and outcomes. This insight can enable better communication, facilitate change management, and inspire more efficient collaboration.


Clusters and Equivalence

SNA is a powerful tool. It allows us to explore the underlying structure of an organization or network, identifying the formal and informal relationships that drive the formal processes and outcomes. This insight can enable better communication, facilitate change management, and inspire more efficient collaboration.


Visualizing Networks

SNA is a powerful tool. It allows us to explore the underlying structure of an organization or network, identifying the formal and informal relationships that drive the formal processes and outcomes. This insight can enable better communication, facilitate change management, and inspire more efficient collaboration.


Software and Tools for SNA

SNA is a powerful tool. It allows us to explore the underlying structure of an organization or network, identifying the formal and informal relationships that drive the formal processes and outcomes. This insight can enable better communication, facilitate change management, and inspire more efficient collaboration.


SNA Case Study

SNA is a powerful tool. It allows us to explore the underlying structure of an organization or network, identifying the formal and informal relationships that drive the formal processes and outcomes. This insight can enable better communication, facilitate change management, and inspire more efficient collaboration.


Challenges and Future Directions in Network Analysis

SNA is a powerful tool. It allows us to explore the underlying structure of an organization or network, identifying the formal and informal relationships that drive the formal processes and outcomes. This insight can enable better communication, facilitate change management, and inspire more efficient collaboration.


Conclusion

SNA is a powerful tool. It allows us to explore the underlying structure of an organization or network, identifying the formal and informal relationships that drive the formal processes and outcomes. This insight can enable better communication, facilitate change management, and inspire more efficient collaboration.


Resouces and Further Reading

SNA is a powerful tool. It allows us to explore the underlying structure of an organization or network, identifying the formal and informal relationships that drive the formal processes and outcomes. This insight can enable better communication, facilitate change management, and inspire more efficient collaboration.