Techno Blender
Digitally Yours.
0 28

## Assortativity helps analysing pattern of connections in networks. Let’s use it to confirm if people tend to connect to similar people.

In this article we will use some Facebook data to explore the concept of network assortativity (also called as homophily), which we define as the tendency of nodes to connect to their similar.

Networks or Graphs are data representation consisting in nodes (vertices) and edges (links): in this article we will consider only undirected and unweighted edges. We will first of all present the dataset we intend to use, going through the data loading and wrangling steps and presenting the network.

Next, we will introduce the concept of network assortativity. The main theoretical framework which will be used is the article from Newman et al., 2003 [1] which defines and explains the concept of network assortativity.

We will then apply this metric to the dataset, in order to confirm whether — as stated in the article –people tend to connect to others who are like them.

1. the file “facebook_combined.txt.gz” contains edges from 4039 nodes of 10 networks. Edges are represented in an adjacency list format (i.e. [0,1] means there’s an edge between node 0 and node 1).
2. the file “facebook.tar.gz” contains several other files. We will be using only “.feat” and “.featnames” files, which corresponds to network attributes (and their names) for all the nodes.

We will be using the NetworkX library in Python.

Importing the main network file is very easy:

## Assortativity helps analysing pattern of connections in networks. Let’s use it to confirm if people tend to connect to similar people.

In this article we will use some Facebook data to explore the concept of network assortativity (also called as homophily), which we define as the tendency of nodes to connect to their similar.

Networks or Graphs are data representation consisting in nodes (vertices) and edges (links): in this article we will consider only undirected and unweighted edges. We will first of all present the dataset we intend to use, going through the data loading and wrangling steps and presenting the network.

Next, we will introduce the concept of network assortativity. The main theoretical framework which will be used is the article from Newman et al., 2003 [1] which defines and explains the concept of network assortativity.

We will then apply this metric to the dataset, in order to confirm whether — as stated in the article –people tend to connect to others who are like them.