A social network analysis of my core discussion network

Many researchers have done studies on people’s core discussion network, the set of friends and family people turn to when discussing important matters.

I did a simple social network analysis on my core discussion network, which helped me gain an overview picture of my social network. I first made a weighted adjacency matrix to encode an egocentric network for those with whom I have discussed matters important in the last six months. In the weighted adjacency matrix, rows and columns represent different nodes, and weight ranges from 0-5. 0 means there is no connection between nodes, and 5 means the two nodes has exchanged important information. The matrix was saved in a csv file, which looks like this:

Screen Shot 2015-09-27 at 8.06.04 PM

I used R packages – network and sna  in my analysis process.

  1. The first step is to import data in R. There are two ways to import data: 1) from a google file 2) from local file

url<-“the google file URL address”
myCsv <- getURL(url)


myData<-read.csv(“local file path”)

2. The second step is convert the file into a matrix in R. (note: “row.names=1” coerces the first row into the header of the matrix)

ego<- as.matrix(read.csv(“google file URL address”, row.names=1))


ego<- as.matrix(read.csv(“local file path”, row.names=1))

3. The third step is to plot the network. I can use function gplot to draw a network plot, for example

gplot(ego, gmode=”graph”, displaylabels=TRUE, label.cex=0.8, vertex.col=”darkolivegreen”)

The plot looks like this:

Screen Shot 2015-09-27 at 8.19.03 PM

4. The last step is to customize the network. I want to present different groups with different color, and edge width represents the weight between two nodes. This process is a little complicated.

# add an attribute edgeweight to the network

MyNetwork <- network(ego, directed=FALSE, edge.attrnames=”edgeweight”)

# set values to the edgeweight attribute

set.edge.attribute(MyNetwork2, “edgeweight”, value=c(1,2,3,4,5))

# set nodecolors
nodeColors = c(“goldenrod3″,”steelblue1″,”steelblue1″,”steelblue1”,  “darkgreen”,”darkgreen”, “darkgreen”,”firebrick”,”firebrick”, “firebrick”,”firebrick”,”darkslateblue”,”darkslateblue”, “darkslateblue”,”blue”,”blue”,”blue”)

# use function plot to draw the network
plot(MyNetwork,displaylabels=TRUE, label.cex=0.5,edge.lwd=”edgeweight”,vertex.col=nodeColors)

Finally, my core discussion network (ego network) looks like this:

Screen Shot 2015-09-27 at 8.25.10 PM

I didn’t record all my important connections in the matrix. But based on the above analysis, it is demonstrated that in my core discussion network, the friendship, coworker relationship, and kinship are apparent in my personal network. Alters in these four different networks are closely tied to each other within each network, but there is no relationships between or among these four different networks. For instance, my dad, mom, and sister are closely tied to each other in the kinship network, but they are not tied to my friendship network, or coworker network. A unique network is the partner network, they are not linked to each other at all.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s