The purpose of this homework is to familiarize yourself with bipartite graphs and two-mode networks, projection, and weighted matrices in R. Please review the following materials before beginning this homework:
For this homework assignment, there are two network objects to work with:
The first network is constructed from data recorded in Paul
Revere’s Ride, by David Fischer. In the book, Fischer documents
Reveres connections through various affiliations in locations and how
these influenced history. The Paul Revere conspiracy dataset concerns
relationships between 254 people and their affiliations with seven
different organizations in Boston. The dataset refers to Paul Revere,
who was responsible for organizing a local militia of Boston’s
revolutionary movement. The network is two-mode, with 254 actors and 7
organizations (“events”). We will refer to this network as the
PaulRevereNet
.
The second network is the Philippine Kidnappings Data which is a
collection of relationships on the Abu Sayyaf Group (ASG), a violent
non-state actor operating in the Southern Philippines. In particular,
this data is related to the Salast movement that has been founded by
Aburajak Janjalani, a native terrorist of the Southern Philippines in
1991. ASG is active in kidnapping and other kinds of terrorist attacks.
The object is a two-mode network, with 246 kidnappers and the 105
terrorist events they attended. We will refer to this as the
PhilKidnapNet
network.
For either (but if you are feeling it, do
both!) the PaulRevereNet
network or(and?) the
PhilKidnapNet
network, do the following:
gplot()
function.N
and M
) is most
central in the network.Note: for 11, you can access the vertex attribute for the
PaulRevereNet
network using the
PaulRevereNet %v% "people.names"
and
PaulRevereNet %v% "place.names"
, respectively. For the
PhilKidnapNet
network, the names of the nodes are stored as
a vertex attribute called vertex.names
.
For either (but if you are feeling it, do
both!) the PaulRevereNet
network or(and?) the
PhilKidnapNet
network, do the following:
matrix
from the network. Use
the as.sociomatrix()
function in the network
package to do so.network
from the dichotomized
“person” matrix. Use this object for steps 6-11.Download the Homework 4 template prior to beginning. The template contains code for accessing the data files.
When you have completed your homework, click the “Knit” button to
render your .RMD
file into a .HTML
report.
Upload both your .RMD
and .HTML
files to
the appropriate assignment on the Canvas page for this course. Just
click the “Start Assignment” button to upload the files. This assignment
is DUE on 3/13.
Remember to ensure the following before submitting your assignment.
See Google’s R Style Guide for examples of common conventions.
.RMD
files are knit into .HTML
and other
formats procedural, or line-by-line.
install.packages()
or
setwd()
are bound to cause errors in knittinglibrary()
in a previous chunkIf All Else Fails: If you cannot determine and fix
the errors in a code chunk that’s preventing you from knitting your
document, add eval = FALSE
inside the brackets of
{r}
at the beginning of a chunk to ensure that R does not
attempt to evaluate it, that is: {r eval = FALSE}
. This
will prevent an erroneous chunk of code from halting the knitting
process.