Introduction

The purpose of this lab is to familiarize yourself with projecting bipartite graphs to unipartite graphs in R. Please review the Chapter 11: Projection chapter of the SNA Textbook as well as Tutorial 9 - Projection of Networks in R prior to beginning this lab.

For this lab, we will revisit the networks we used in Lab 5.


Part I: A Conspiracy Network

For this part of the lab, you will use data collected from 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.


For the PaulRevereNet network, do the following:

  1. Create an object of class matrix from the PaulRevereNet network. Use the as.sociomatrix() function in the network package to do so.
  2. Create the unipartite graph that represents the “person” matrix.
  3. Create the unipartite graph that represents the “group” matrix.
  4. Plot all three graphs.


Part II: A Kidnapping Network

For this part of the lab, you will use 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 where actors are terrorist kidnappers and the terrorist events they have attended. We will refer to this as the PhilKidnapNet network.

For this part of the lab, use the PhilKidnapNet to repeat steps 1-4 in Part I.



How to Submit

Download the template for this lab prior to beginning the lab. The template contains code for accessing the data files.


Knitting to HTML

When you have completed your assignment, click the “Knit” button to render your .RMD file into a .HTML report.


Special Instructions

Upload both your .RMD and .HTML files to the appropriate link for this assignment on the Canvas page for this course.


Before You Submit

Remember to ensure the following before submitting your assignment.

  1. Name your files using this format: Lab-##-LastName.rmd and Lab-##-LastName.html
  2. Show both the solution for your code and write out your answers in the body text

See Google’s R Style Guide for examples of common conventions.



Common Knitting Issues

.RMD files are knit into .HTML and other formats procedural, or line-by-line.

  • An error in code when knitting will halt the process; error messages will tell you the specific line with the error
  • Certain functions like install.packages() or setwd() are bound to cause errors in knitting
  • Altering a dataset or variable in one chunk will affect their use in all later chunks
  • If an object is “not found”, make sure it was created or loaded with library() in a previous chunk

If 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.




Please report any needed corrections to the Issues page. Thanks!