Introduction

The final project will use all of the information you have learned in this course to create a report on a network. For the final project, you will use data from the Phoenix Open Data Portal. Specifically, you will use co-arrest data. These data represent incidents where individuals were arrested together. For the final project, imagine that you work for a police department and your supervisor has asked you to create a report on co-offending networks. Your supervisor has provided you two networks: the PhxArrestNet2023 network of co-offending for 2023 and the PhxArrestNet2022 network of co-offending for 2022.


Data

Both networks are stored as .rds files in the data folder on the SNA Textbook site. As before, use the readRDS() function, to load the file. Be sure to make sure the sna and network packages are loaded, using library(), so that R recognizes the objects as being of class network.

Use the following code to load the 2023 network:

# set the url
loc <- "https://github.com/jacobtnyoung/sna-textbook/raw/main/data/data-PHX-arrest-2023-net.rds"

# for the 2023
PhxArrestNet2023 <- readRDS( url( loc ) )


Use the following code to load the 2022 network:

# set the url
loc <- "https://github.com/jacobtnyoung/sna-textbook/raw/main/data/data-PHX-arrest-2022-net.rds"

# for the 2022
PhxArrestNet2022 <- readRDS( url( loc ) )


Template and Report Format

As with the labs, There is a template for the final project. The template is set up as a report in that the code chunks include the option echo = FALSE. What this does is hides the code in the final report. When you render your report, the code will be hidden so that it reads cleanly.

IMPORTANT: Do you report entire matrices or objects. These print out very long and are cumbersome to look through.


Your Task

Part I: Two-Mode Network

What can you tell me about this network? To answer your supervisor’s question, provide an analysis of the PhxArrestNet2023 network. This analysis should include a visualization of the network as well as a description of the structural properties such as the density and the degree distributions. Be sure to focus on the interpretation of the structural properties (e.g. what does the average degree centrality score mean?).


Part II: One-Mode Network

Who are the central actors in this network? To answer your supervisor’s question, provide an analysis of the “person” matrix for the PhxArrestNet2023 network. Create an object of class matrix using the as.sociomatrix() function in the network package. Then, focus on describing the centrality of actors. You should examine the three types of centrality we discussed (i.e. degree, closeness, and betweenness). Be sure to emphasize any differences in the measures in terms of interpreting the “who is central?” question. Also, be sure to include visualizations that incorporate each centrality measure.


Part III: Comparison

How has the co-offending network changed from 2022 to 2023? To answer your supervisor’s question, provide a comparative analysis of the PhxArrestNet2022 and the PhxArrestNet2023 networks. Think about the ways we discussed for comparing networks this semester. Your analysis should compare the two-mode networks as well as the “person” matrices.





How to Submit

Download the template for this final project prior to beginning the final project.


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: Final-Project-LastName.rmd and Final-Project-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!