Lab 06 - Projection of Bipartite Graphs - INSTRUCTIONS

CRJ 507 Social Network Analysis

Introduction

The purpose of this lab is to familiarize yourself with projecting bipartite graphs to unipartite graphs in R. Prior to beginning this lab, please review the Projection chapter of the Social Network Analysis for Crime Analysts textbook as well as the Projection & Weighted Graphs tutorial in the Social Network Analysis for Crime Analysts using R textbook.

In Parts I and II of this lab we will revisit the networks we used in Lab 5 and in Part III, you will use the bipartite network you created in Lab 5.


Part I: A Conspiracy Network

For this part of the lab you will again use the network constructed from data recorded in Paul Revere’s Ride, by David Fischer. In the book, Fischer documents connections through various affiliations in locations and how these influenced the American Revolutionary war. The Paul Revere conspiracy dataset concerns relationships between 254 people and their affiliations with seven different organizations in Boston. The network is two-mode, with 254 actors and 7 organizations (“events”). This network is available in SNACpack and is called paul_revere_net. To review documentation on the network, use ?paul_revere_net.

Bipartite Graph and Projections

For the paul_revere_net network, do the following:

  1. Create an object of class matrix from the paul_revere_net network. Use the as.sociomatrix() function in the network package to do so. ( NOTE: DO NOT PRINT OUT THE MATRIX).
  2. Create the unipartite graph that represents the person matrix.
  3. Create the unipartite graph that represents the group matrix.
  4. Plot all three networks. Use the edge_rescale() and edge_shade() functions in the SNACpack package to use the edge weights in the plots for each projected graph. NOTE: This will take a bit longer to plot because there are a lot of edges (just an FYI). How does visualizing edge weight help interpret the structure?

person Matrix Projection

For the person matrix you created in step 2., do the following:

  1. Create an object of class network using the as.network() function. Pay attention to the correct usage of the directed= argument.
  2. Think about the network created by the person matrix. What do the ties in this network represent? Explain.
  3. Without running any code, describe what kind of actor in this network would have a high degree centrality score.
  4. Describe what kind of actor in this network is likely to have a low closeness centrality score.
  5. Describe the position of a person with a high betweenness centrality score, but a low degree centrality score.
  6. Calculate the degree, closeness, and betweenness centrality scores for each actor. Feel free to use the degree(), closeness(), and betweenness() functions from the sna package.
  7. Calculate the mean degree, closeness, and betweenness centrality scores. Interpret each mean centrality score. What do these means suggest about the structure of the network?
  8. If we were examining degree centrality, what would a completely centralized network look like? What would its degree centrality scores be? Describe it (or, if you are feeling spirited, create one and plot it!).
  9. If we were examining betweenness centrality, what would a completely decentralized network look like? What would its betweenness centrality scores be? Describe it (or, if you are still feeling spirited, create one and plot it!).
  10. Calculate the graph centralization scores for degree, closeness, and betweenness centrality.
  11. Interpret each graph centralization score. What does each tell us about the distribution of centrality scores in the network? Would you describe the network as centralized or decentralized? Justify your answer using the score.
  12. Plot the network three times using the gplot() function where each plot sizes the nodes by the centrality score (i.e. a plot for degree centrality, a plot for closeness centrality, and a plot for betweenness centrality). Examine the plots. Describe how the differences you noted between the centrality measures above are seen in the plots.
  13. Suppose you are an analyst for the British in the 18th century. After analyzing this network, what might you do to address a potential rebellion? How is this informed by your knowledge of the network? Is your answer different based on whether you are examining degree centrality, closeness centrality, or betweenness centrality?


Part II: A Kidnapping Network

For this part of the lab you will again use the network created from 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 Salafist 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. This network is available in SNACpack and is called philippine_kidnappings_net. To review documentation on the network, use ?philippine_kidnappings_net.

For the philippine_kidnappings_net network, repeat steps 1-4 above. For the person matrix you created in step 2, repeat steps 5-16. Then answer:

  1. Envision yourself as an analyst trying to reduce kidnapping events (such as these). Based on this network, what is your strategy? How is this informed by your knowledge of the network? Is your answer different based on whether you are examining degree centrality, closeness centrality, or betweenness centrality? Explain your answer.


Part III: Your Network

For this part of the lab, I would like you use the bipartite network you created in Lab 5.

For the bipartite network you created, repeat steps 1-4 above. For the person matrix you created in step 2, repeat steps 5-16. Then answer:

  1. Based on the plot, what would you say about the structure of your network? Is your network centralized or decentralized? Are certain nodes clearly more connected? Any surprising patterns?


Challenge Question

Feeling bold? Try this challenge question. It is not required, but try taking a crack at it.

  • Here is an edgelist for a small 8-node two-mode network:
    • Percy - C1
    • Percy - C2
    • Percy - C3
    • Harry - C1
    • Harry - C2
    • Isildur - C1
    • Isildur - C2
    • Parker - C2
    • Parker - C3
    • Igor - C3

Task: Without using a computer, sketch the bipartite network and create person projection.

Then, answer:

  • Which node(s) have the largest degree centrality?
  • Which node(s) have the smallest degree centrality?




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.

  • Name your files using this format: Lab-##-LastName.rmd and Lab-##-LastName.html
  • 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!