Option 1: Sept. 11 terrorists. The data are in Sept11_nodes.csv and Sept11_links.csv.
sept11_links <- read.csv("Sept11_links.csv")
sept11_nodes <- read.csv("Sept11_nodes.csv")
sept11_network<- graph_from_data_frame(sept11_links, vertices = sept11_nodes, directed = F)
Here is the network of September 11th links and nodes, combined into “sept11_network”.
sept11_network %>%
edge_density()
[1] 0.07985193
Here is the density of the network, or how closely connected each of the separate connections are. The density of the September 11th network is 0.079, which is not very dense. This means that there are many connections, but they are fairly spread out between all the people.
sept11_network %>%
distances() %>%
as.vector() %>%
as_tibble() %>%
plot_ly(x= ~value) %>%
add_histogram()
On the histogram above, the value represents how many people each terrorist is connected by. It shows that of the 62 terrorists involved in September 11th, most are connected by 3 people.
sept11_network %>%
get_diameter() %>%
length()
[1] 6
The length of the diameter of the network is six, which means that the longest distance between one person and another in the network is through six people. Considering there’s a theory that each person in the world is connected by no more than six degrees of separation, this diameter value shows it’s a fairly dispersed network.
sept11_nodes <- sept11_nodes %>%
mutate(label = name) %>%
mutate(title = name) %>%
mutate(degree = degree(sept11_network)) %>%
mutate(value = degree)
Using the nodes data, I have created new variables (label, title, degree and value), to help see the data more specifically.
sept11_links <- sept11_links %>%
mutate(betweenness = edge_betweenness(sept11_network)) %>%
mutate(value = betweenness)
Using the links data, I have created a new variable from the betweenness of the links. This will show how connected the links between people are.
visNetwork(sept11_nodes, sept11_links, main = "Network of September 11th Terrorists") %>%
visIgraphLayout(layout = "layout_nicely") %>%
visOptions(highlightNearest = T, nodesIdSelection = T)
Here is a visual of the September 11th terrorists. Each group is represented by color. The thicker the line, the stronger the connection between two people. The larger the dot is, the more interconnected the person is, through strength of links and number of connections. It looks as though Mohamed Atta and Marwan Al-Shehhi are the two “densest” connections in the network.
sept11_network %>%
infomap.community() %>%
membership()
Samir_Kashk Madjid_Sahoune
2 2
Fahid_al_Shakri Lased_Ben_Heni
2 2
Essid_Sami_Ben_Khemais Seifallah_ben_Hassine
2 2
Mohamed_Bensakhria Mehdi_Khammoun
2 2
Essoussi_Laaroussi Tarek_Maaroufi
2 2
Haydar_Abu_Doha Ahmed_Ressam
2 2
Abu_Qatada Abu_Walid
3 3
Jean-Marc_Grandvisir Abu_Zubeida
3 3
Mizar_Trabelsi Djamal_Beghal
3 3
Kamel_Daoudi Jerome_Courtaillier
3 3
David_Courtaillier Zacarias_Moussaoui
3 3
Imad_Eddin_Barakat_Yarkas Ramzi_Bin_al-Shibh
1 1
Mohammed_Belfas Abdelghani_Mzoudi
1 1
Ahmed_Khalil_Ibrahim_Samir_Al-Ani Mustafa_Ahmed_al-Hisawi
1 1
Agus_Budiman Mounir_El_Motassadeq
1 1
Zakariya_Essabar Mohamed_Atta
1 1
Fayez_Ahmed Mamduh_Mahmud_Salim
1 1
Mamoun_Darkazanli Said_Bahaji
1 1
Ziad_Jarrah Marwan_Al-Shehhi
1 1
Wail_Alshehri Waleed_Alshehri
1 1
Mohand_Alshehri Satam_Suqami
5 1
Abdul_Aziz_Al-Omari Lotfi_Raissi
1 6
Ahmed_Al_Haznawi Raed_Hijazi
5 5
Nabil_al-Marabh Hamza_Alghamdi
5 5
Ahmed_Alghamdi Salem_Alhazmi
5 4
Hani_Hanjour Bandar_Alhazmi
6 6
Rayed_Mohammed_Abdullah Raisal_Al_Salmi
6 6
Majed_Moqed Khalid_Al-Mihdhar
4 4
Nawaf_Alhazmi Osama_Awadallah
4 4
Abdussattar_Shaikh Mohamed_Abdi
4 4
Ahmed_Alnami Saeed_Alghamdi
5 5
sept11_nodes <- sept11_nodes %>%
mutate(group = membership(infomap.community(sept11_network)))
visNetwork(sept11_nodes, sept11_links, main = "Network of September 11th Terrorists") %>%
visIgraphLayout(layout = "layout_nicely") %>%
visOptions(highlightNearest = T, nodesIdSelection = T, selectedBy = "group")
Here is another visual of the September 11th terrorist network, but with options to refine it by selecting a group of terrorists. Each color represents a group of terrorists connected, and the “id” is the name of the terrorist. There are a few major connections notably in group 1, but in general it is a fairly spread-out network of people.