Abstract

In this assignment, we will examine various networks among countries in different regions of the contemporary world to reveal patterns within their ties. We will then create an aggregate network from the original networks and see if the process provides any further holistic perspective about the countries that may have been overlooked when conducting social network analysis(SNA) on the individual networks. 

Introduction

Since the world’s nations consists of 193 countries, only a handful of countries, will be selected to be included in four different networks. These four networks will be constructed based on the trade, military, transportation, and corporate ties formed among the chosen countries. Degree, betweenness, and closeness centrality measures will provide the initial analysis of these four individual networks. Centrality measures are the most beneficial indicators for the importance of actors within networks. Applying these measures to all nodes help reveal various information about each actor and help reveal network-level characteristics as a result (Yang, Keller, Zheng, 2016). With Degree centrality, we can identify the major countries of the network by the number of their affiliations with the others in terms of being connected. Betweenness centrality will reveal the countries that are relied on the most to ensure the flow of communication extends to each member involved in the network. Closeness centrality in this analysis will help reveal which countries have close ties with every node in the network, indicating that they are key actors when it comes to helping solidify the pacts among the countries Centrality measures are the most beneficial indicators for the importance of actors within networks. Applying these measures to all nodes help reveal various information about each actor and help reveal network-level characteristics as a result (Yang, Keller, Zheng, 2016). To expand our analysis and investigate deeper in the alliances among the countries selected, we will compound the findings from out centrality measures into one aggregated network for all the countries involved. This method will give us an advantage of examining the large scale of data at once in efforts to uncover relationships that may have gone unnoticed in the primary analysis. Each row in this aggregated network will allow us the ability to track data lineage and trace it back to the atomic data aggregated and obtain even more information on the behavioral variables shared in the networks that can help us or national leaders to make well-informed decisions (Mullins, 2020).

Background Research

The countries that we decided to include in our analysis were chosen through an un-biased selection to avoid any saturation in only one specific region of the world. We wanted to include countries that represented each area of the world map equally in efforts to get as much diversity into our report. The ten countries that we selected to focus on are the USA, Chile, Brazil, Switzerland, Japan, Singapore, Vietnam, Mali, Sierra Leone, and Australia. We analyzed these countries ties in respect to their trade, military, transportation, and corporate alliances with one another as well as other surrounding countries to expand the scope of this study.

Studied Countries

The ten selected countries of the United States, Chile, Brazil, Switzerland, Japan, Singapore, Vietnam, Mali, Sierra Leone, and Australia are mapped on a visual of the world in the code below. As can be seen, the ten countries are all over the world. They touched all consistently habited contitents of the globe. Some of the countries are coastal nations, some islands, and some even landlocked. Some nations are very large, while others are perhaps considered microstates. None of these nations, however, border each other. With all of it being said, the multifarious nature of this set of nations should present an interesting perspective as an international network. Any intersections across these non-obviously connected nations should give a unique look at trends of international networks. Regardless of the disjointed nature of the network, some trends can be revealed about the nature of international relationships of the world overall.

# Import necessary libraries
library(highcharter)
library(dplyr)
library(maps)

# Graph map of studied countries
dat <- iso3166
dat <- rename(dat, "iso-a3" = a3)
countries_visited <- c("USA", "CHL", "BRA", "CHE", "JPN", "SGP", "VNM", "MLI", "SLE", "AUS")
dat$visited <- ifelse(dat$`iso-a3` %in% countries_visited, 1, 0)
hcmap(
  map = "custom/world-highres3",
  data = dat,
  joinBy = "iso-a3",
  value = "visited",
  showInLegend = FALSE,
  nullColor = "#DADADA",
  download_map_data = TRUE
) %>%
  hc_mapNavigation(enabled = FALSE) %>%
  hc_legend("none") %>%
  hc_title(text = "World Map of Studied Countries") # title

Trade Network

 The trade network sought to look at the major trade partners of each of the studied countries. From the CIA World Factbook, the main export and import countries for each studied country were collected and put into a dataset file (Central Intelligence Agency, 2021). Edges in the network defined either a that a country was a major importer of one country's goods or whether a country a major exporter from a country got its goods. As recorded in the CIA World Factbook, there were about four or five countries to which each studied country exported to or imported from (Central Intelligence Agency, 2021). This data overall sought to explore the trade networks between the countries involved and whether any notable connections could be identified. The goods of a nation are a symbol of national trust. In some sense, the connections of this trade network illustrate a degree of trust in the relationship between nations through the trust in one nation's produce. Economics is therefore is an important sociopolitical factor to examine within international networks. 
 
# Import necessary libraries
library(igraph)
library(GGally)
library(stringr)

# Define studied countries of the project
studied_countries <- c("USA", "Chile", "Brazil", "Switzerland", "Japan", "Singapore", "Vietnam", "Mali", "SierraLeone", "Australia")

# Import trade network dataset
trade_data = read.csv("Trade_Network.csv", header = TRUE, check.names =FALSE)
colnames(trade_data) <- c("Exporter", "Importer")
head(trade_data, 10)
##    Exporter Importer
## 1       USA   Canada
## 2       USA   Mexico
## 3       USA    China
## 4       USA    Japan
## 5     China      USA
## 6    Mexico      USA
## 7    Canada      USA
## 8     Japan      USA
## 9   Germany      USA
## 10    Chile    China

Military Network

The world has seen numerous military alliances throughout history, most notable are the alliances formed with NATO and the Warsaw Pact formed in Europe after World War II. Since then, many new alliances have formed among various countries and have increased peaceful relations among them which have led to a more unified state globally. The primary benefit for countries to engage in military alliances is for protection of their nation and citizens against threats from any other countries that may decide to engage in conflict with them. Some nations view establishing these military alliances as steps to further improve their relational ties with a developing country while others see military alliances necessary in order to step in and mediate conflict among two or more countries in order to ease tensions before they become more severe (McInnis, 2019). Whatever the reasons may be, military alliances represent the efforts of the engaged countries to build stronger relationship ties through trust and transparency. Our military network seen belo was compiled after revising the current military, security, and peace-act alliances among the selected countries found on the Correlates of War Project website (Gibler, 2012).

# Import military network dataset
military_data <- read.csv("Military_Network.csv", header=T, check.names = F)
# Add row names
rownames(military_data) <- military_data[,1]
military_data[,1] <- NULL
head(military_data)
##         USA China Mexico Canada Japan Germany Chile Brazil Argentina
## USA       0     0      0      1     1       1     1      1         1
## China     0     0      0      0     0       0     0      0         0
## Mexico    0     0      0      0     0       0     0      0         0
## Canada    1     0      0      0     1       1     0      1         0
## Japan     1     0      0      1     0       0     0      1         1
## Germany   1     0      0      1     0       0     0      1         0
##         Switzerland Italy France UK Australia
## USA               0     1      1  1         1
## China             0     0      0  0         0
## Mexico            0     0      0  0         0
## Canada            0     1      1  1         1
## Japan             0     1      1  1         1
## Germany           0     1      1  1         1

Transportation Network

The development of transport networks among nations play a crucial role in the economic development of the countries involved and therefore can be used as a measure to evaluate the process of their development. A strong and inclusive transportation network among nations not only reduces the cost and completion time of transportation, it also helps increase the integration rate of neighboring countries to the network and in return build a strong understanding of the countries involved on an international level. Many underdeveloped countries have benefited from these networks by allowing them to bring in much needed agricultural, industry, and commerce goods across regions of the world that would be otherwise impossible for a lone country to navigate through (Aldagheiri, 2009). Our transportation network represents the current air and maritime transportation ties shared among the countries included in this study from the major shipping routes for global trade (Brooks, 2018).

# Import transportation network dataset
transportation_data <- read.csv("Transportation_Network.csv", header=T, check.names = F)
# Add row names
rownames(transportation_data) <- transportation_data[,1]
transportation_data[,1] <- NULL
head(transportation_data)
##         USA China Mexico Canada Japan Germany Chile Brazil Argentina
## USA       0     1      1      1     1       1     1      1         1
## China     1     0      1      1     1       1     0      1         0
## Mexico    1     1      0      1     1       1     1      1         1
## Canada    1     1      1      0     1       1     1      1         1
## Japan     1     1      1      1     0       1     0      1         0
## Germany   1     1      1      1     1       0     0      1         0
##         Switzerland Italy France UK UAE
## USA               1     1      1  1   1
## China             1     1      0  1   1
## Mexico            0     1      1  1   1
## Canada            1     1      1  1   1
## Japan             1     1      1  1   1
## Germany           1     1      1  1   1

Corporate Network

 A corporate network was one of the major factors desired for the networks of this project. However, a corporate networks of associations between countries with regard to private business could not very easily be found. Therefore, the corporate network takes a bit of a spin on that and looks at the trade agreements of various nations. The free and preferential trade agreements affect considerably private corporate trade is done across borders. The price of goods imported may not be so heavy in certain nations, so there lies a strategic opportunity for expanding one's market. The data involved for this network was transcribed from a visual map of trade deals on the website of the World Trade Organiztion (WTO) (World Trade Organization, n.d.). Each edge of the graph acknowledged a free trade agreement - a no-tariff import deal - or a preferential trade agreement - a reduced tariff deal - with regard to the ten studied countries of the project (World Trade Organization, n.d.). Like in the trade network, the corporate network indicates a valuable perspective into the relationships between countries. Not only is there the element of economics and trust in each other's products, but there is a distinctive agreement signed between two nations for the betterment of trade between the countries. And so, corporate trade agreements provide a unique and important dimension to the study of an international network. The dataset of the corporate network ultimately was rather large. To reduce the size for visibility and better understanding of only the studied countries and key players, only nations with more than four agreements with any of the studied nations were kept in the final corporate network.
# Import corporate network dataset
corporate_data = read.csv("Corporate_Network.csv", header = TRUE, check.names =FALSE)
colnames(corporate_data) <- c("Country", "AgreementWith")
head(corporate_data, 10)
##    Country     AgreementWith
## 1      USA         Australia
## 2      USA           Bahrain
## 3      USA            Canada
## 4      USA             Chile
## 5      USA          Colombia
## 6      USA         CostaRica
## 7      USA DominicanRepublic
## 8      USA        ElSalvador
## 9      USA         Guatemala
## 10     USA          Honduras

Project Specification

The intent of this project is to take our SNA of these four networks and build an aggregated network that will summarize the findings of their centrality measures and provide a more robust network that captures the strengths of the relationships of the parties involved. Centrality measures, when applied to individual nodes of a network, can only reveal so little about the dynamic impacts that they have on the network as a whole. By capturing the core findings of each individual network and aggregating into one sole network, we can further evaluate the relationships of the nations involved and gain deeper insight from the compounded trends and patterns and assess them for stronger measures relevant for more strategic planning. By partitioning the nodes of the individual networks and optimizing them through and objective function, we can preserve the optimality of the partitioned nodes in the aggregated network. once we detect the structural patterns through centrality measures, we can optimize those criterion to detect core-periphery structures in the new model into one sole resolution parameter that imposes no preference of the results found before. The new aggregated graph will construct weights to its edges that represent the sum of all weights in the original graphs between the nodes as a result of the partitions. node i in the aggregated network will represent the interactions of the nodes relevant to those in the other graphs. The weights of these new edges can be derivied from:

AggregatingNodes.

where Wuv is the weight of the edge between nodes u and v in the original networks. This new weights can then be evaluated to reveal the optimal communities and their relations in the original networks, making this aggregated network more suitable in analyzing the networks more efficiently in regards to time and qualitative analysis.

Problem analysis and Solution Design

Trade Network Analysis

The code below graphs the network of trade amongst the nations studied and recorded as importers and exporters. The ten studied countries for this project are highlighted in yellow, and their other trade partners are colored in green. Each edge indicates an export from one of the studied countries or import to one of them. Overlapping importing and exporting connections did exist, such as between the United States and Japan, but were consolidated to one edge connection between two countries.

# Define inward and outward edge nodes
node.out <- unique(trade_data$Exporter)
node.in <- unique(trade_data$Importer)

# Create graph object for trade network
trade_net <- graph_from_data_frame(d = trade_data[c("Exporter", "Importer")], vertices = union(node.out, node.in), directed = TRUE)
# Simplify connections of network (Referenced WillyWinkel, 2018)
trade_net <- simplify(trade_net)

# Define colors for nodes (Referenced Frazier, n.d.)
for (i in 1:length(V(trade_net)))
{
  if (V(trade_net)$name[i] %in% studied_countries) {
    V(trade_net)$color[i] <- "yellow1"
  }
  else {
    V(trade_net)$color[i] <- "limegreen"
  }
}

# Print network graph
plot(ggnet2(trade_net, node.size = 12, node.color = V(trade_net)$color, edge.size = 1, edge.color = "grey", 
            arrow.size = 2.0, label=T, label.size = 5))

The trade network indicates a high correlation between trade and geography. Countries in Southeast Asia traded with other countries in the region. Countries in Africa tended to trade with African and European nations. An interesting point is the Americas - the U.S., Chile, and Brazil - tended to have more partners overseas. The United State’s two major exports are to Canada and Mexico, but China and Japan are big importers of U.S. goods as well (Central Intelligence Agency, 2021). All four of these countries are connected to the U.S. also as importers, with the odd man out being Germany (Central Intelligence Agency, 2021). Germany remains a more unique node in the network because it a major trader with the U.S., Chile, and Brazil, despite being a significant distance away from especially the South American nations. Another unique node is the United Arab Emirates (UAE) on the network. This one is a major exporter to Switzerland and a major importer of Mali and Sierra Leone. The connection from the Middle East is interesting for all of these nations if especially the African countries. Oil is presumably a major export of the UAE, so that could be a reason for the connection between the UAE and Switzerland. Why the UAE, in particular, versus other nations being importers of goods from Mali and Sierra Leone is interesting. The country may be seeking to build relationships with the markets in West Africa for trade or other sociopolitical reasons. It also possible that there is a connection of religion. The United Arab Emirates, Mali, and not improbably Sierra Leone are highly Islamic nations. The brotherhood in Islamic countries from the UAE to West Africa may be one of the reasons why the UAE is a large importer of goods from these two countries. And so, from a visual perspective, the trade network reveals a lot of interesting connections about this international network. The degree, betweenness, and closeness centralities of each country in the trade network were examined. Definitively, the United States of America was the center of trade for this network. It is a major exporter and importer and famously a capitalistic giant. China is also highly prevalent in this network, being for similar reasons as the U.S., a major exporter and importer of goods. Switzerland was calculated to be one of the major go-between countries of the trade network. The countries connected to the nation in trade must be part of the reason for the highly central placement in the network. It has trade connections in Europe, Africa, and Asia, so there likely makes it a gateway of goods across the world. One final note on centrality for the trade network would be Ghana and Turkey. Why Ghana and Turkey, who each only have one connection in the network, are considered so high in closeness is rather odd. Perhaps there is not a lot of distance between nodes anyway, so the calculation for these two produced something odd. But, on that note, the density was also calculated, being about 0.08143939, being a rather sparse network. Ultimately, the trade network had a few major central players, but the major trade partners for the countries examined were unique for that country.

# Degree
cat("Most Central Countries in Trade Partnerships by Degree:\n")
## Most Central Countries in Trade Partnerships by Degree:
sort(degree(trade_net), decreasing=TRUE)[1:10]
##         USA       China Switzerland       Japan   Singapore SierraLeone 
##          20          18          14          12          12          11 
##       Chile   Australia     Germany      Brazil 
##           9           9           7           7
# Betweenness
cat("\nMost Central Countries in Trade Partnerships by Betweenness:\n")
## 
## Most Central Countries in Trade Partnerships by Betweenness:
sort(betweenness(trade_net), decreasing=TRUE)[1:10]
##         USA Switzerland       China SierraLeone   Singapore        Mali 
##   259.10000   241.62857   205.66508   178.13333   154.70238    63.03333 
##       Japan   Australia     Germany     Vietnam 
##    51.57778    40.02857    32.31111    27.37698
# Closeness
cat("\nMost Central Countries in Trade Partnerships by Closeness:\n")
## 
## Most Central Countries in Trade Partnerships by Closeness:
sort(closeness(trade_net), decreasing=TRUE)[1:10]
##         USA       China       Ghana      Turkey   Argentina       Japan 
## 0.004166667 0.004098361 0.004016064 0.004016064 0.004000000 0.003984064 
## Switzerland   Singapore     Germany SierraLeone 
## 0.003968254 0.003937008 0.003921569 0.003921569
# Density
cat("\nDensity of Trade Network: ", edge_density(trade_net))
## 
## Density of Trade Network:  0.08143939

Military Network Analysis

The military network pictured below represent the current alliances among the pre-select countries for this analysis. Each edge between two countries represent a an alliance formed trough either military or security treaties. Three countries, Mexico, China, and Switzerland are distinct outliers on the edge of the graph. This can be explained by the neutral nature of those countries as they choose to not form alliances. Their decisions to do so to avoid any political or material aiding to one specific side of the conflict and as a result, avoid any military involvement that may intensify the current conditions of those conflicts.

# Convert military network adjacency matrix to matrix type
military_data <- as.matrix(military_data)
# Create graph object for military network
military_net <- graph_from_adjacency_matrix(military_data)

# Define colors for nodes (Referenced Frazier, n.d.)
for (i in 1:length(V(military_net)))
{
  if (V(military_net)$name[i] %in% studied_countries) {
    V(military_net)$color[i] <- "yellow1"
  }
  else {
    V(military_net)$color[i] <- "red"
  }
}

# Print network graph
plot(ggnet2(military_net, node.size = 12, node.color = V(military_net)$color, edge.size = 1, edge.color = "grey", 
            arrow.size = 2.0, label=T, label.size = 5))

The degree centrality of the military network reveal that the USA, Australia, Canada, Japan, Italy, and France are the most involved in establishing such alliances. These countries can be viewed as having the most interest ensuring that they have these alliances in place to have a more strategic position if conflict ever does arise withing other nations. The betweenness centrality measure revealed that the USA, Argentina, Australia, and Canada are most crucial when it comes to serving as middlemen to lead the path for more alliances among the nations of the world. These countries would be more likely to act as mediators for any new conflict emerging around the world and help those nations in conflict find common ground and prevent their opposing views from escalating to more severe levels of aggression or hostility to one another. Three of these countries: The USA, Australia, and Canada also make up the top countries in the closeness centrality along with Japan, Italy, and France. These countries indicate that they are more closely involved in the formation of these military alliances between all countries of the network. The involvement of The USA, Japan, Italy, and France in this measure could be supported by their initial involvement in the formation of NATO after World War II. These countries may have the most motives to add more alliances among leaders on the world as they have seen the effects caused by World War II the most and aim to prevent similar catastrophic conflicts in the future. These countries hold the most potential to increase peace among countries worldwide and their current network as the density for this network is only .44, meaning that it is has less than half of the potential ties that can be formed.

# Degree
cat("Most Central Countries in Military Alliances by Degree:\n")
## Most Central Countries in Military Alliances by Degree:
sort(degree(military_net), decreasing=TRUE)[1:10]
##       USA Australia     Italy    France    Canada    Brazil        UK   Germany 
##        20        18        17        17        16        16        15        13 
## Argentina     Japan 
##        13        11
# Betweenness
cat("\nMost Central Countries in Military Alliances by Betweenness:\n")
## 
## Most Central Countries in Military Alliances by Betweenness:
sort(betweenness(military_net), decreasing=TRUE)[1:10]
##        USA  Argentina  Australia     Canada      Italy     France     Brazil 
## 15.2166667  4.5000000  3.7166667  2.0000000  1.5500000  1.5500000  0.9666667 
##         UK      Japan      China 
##  0.3333333  0.1666667  0.0000000
# Closeness
cat("\nMost Central Countries in Military Alliances by Closeness:\n")
## 
## Most Central Countries in Military Alliances by Closeness:
sort(closeness(military_net), decreasing=TRUE)[1:10]
##        USA  Australia     Canada      Japan      Italy     France    Germany 
## 0.01923077 0.01886792 0.01851852 0.01851852 0.01851852 0.01851852 0.01818182 
##     Brazil         UK  Argentina 
## 0.01818182 0.01818182 0.01785714
# Density
cat("\nDensity of Military Network: ", edge_density(military_net))
## 
## Density of Military Network:  0.4395604

Transportation Network Analysis

The visualization for the transportation network below shows the relations of the involved countries through shipping routes among them. Each edge in this network represents one known passage either to, from, or both through air or sea. Chile stands out more in this network as it has the fewest connections to the rest of the countries in the network. This graph shows that Chile depends more on other South American countries such as Brazil and Argentina to import and export their materials. When economically compared to the rest of the countries in the network, Chile is among one of the most under-developed nations with a human development index of .83. The other well-developed countries in this network hold values of .90 or more.

# Convert transportation network adjacency matrix to matrix type
transportation_data <- as.matrix(transportation_data)
# Create graph object for transportation network
transportation_net <- graph_from_adjacency_matrix(transportation_data)

# Define colors for nodes (Referenced Frazier, n.d.)
for (i in 1:length(V(transportation_net)))
{
  if (V(transportation_net)$name[i] %in% studied_countries) {
    V(transportation_net)$color[i] <- "yellow1"
  }
  else {
    V(transportation_net)$color[i] <- "#56B4E9"
  }
}

# Print network graph
plot(ggnet2(transportation_net, node.size = 12, node.color = V(transportation_net)$color, edge.size = 1, edge.color = "grey", 
            arrow.size = 2.0, label=T, label.size = 5))

The centrality measures of the transportation network help reveal more insight on how the countries involved can help Chile expand their transportation capabilities and assist them in becoming a more developed country like the others. The USA, Brazil, Mexico, Canada, Germany and Italy hold the highest degree values among the included nations. USA, Mexico, and Canada form the North American Free Trade Agreement and are well connected by their borders. Germany and Italy both strongly represent Europe while only Brazil is in the South American Region. These same countries also represent the nations with the highest betweenness centrality, indicating that they are also the most capable of helping Chile find future transportation routes to better connect them to the transportation network. These countries, along with Switzerland, make up the higher closeness centrality countries, suggesting that the inclusion of Switzerland in these negotiations can further assist Chile in finding more trade partners and increase their national GDP. The transportation has a strong density value of .85, but can further increase it by including Chile more in their trade agreements and thus increase the effectiveness of the transportation network as a whole.

# Degree
cat("\nMost Central Countries in Transportation Routes by Degree:\n")
## 
## Most Central Countries in Transportation Routes by Degree:
sort(degree(transportation_net), decreasing=TRUE)[1:10]
##     USA  Brazil  Mexico  Canada Germany   Italy   Japan      UK     UAE   China 
##      26      25      24      24      24      24      23      23      23      22
# Betweenness
cat("\nMost Central Countries in Transportation Routes by Betweenness:\n")
## 
## Most Central Countries in Transportation Routes by Betweenness:
sort(betweenness(transportation_net), decreasing=TRUE)[1:10]
##       USA    Brazil    Mexico    Canada   Germany     Italy       UAE        UK 
## 5.1734488 4.1317821 3.7908730 3.2040043 2.5353535 1.7067821 1.6158730 1.4936869 
## Argentina     Japan 
## 1.4075758 0.9686869
# Closeness
cat("\nMost Central Countries in Transportation Routes by Closeness:\n")
## 
## Most Central Countries in Transportation Routes by Closeness:
sort(closeness(transportation_net), decreasing=TRUE)[1:10]
##         USA      Canada      Mexico      Brazil Switzerland       Italy 
##  0.07692308  0.07692308  0.07142857  0.07142857  0.07142857  0.07142857 
##       Japan     Germany      France         UAE 
##  0.06666667  0.06666667  0.06666667  0.06666667
# Density
cat("\nDensity of Transportation Network: ", edge_density(transportation_net))
## 
## Density of Transportation Network:  0.8461538

Corporate Network Analysis

The code filters out these nations to create a subset network which is then graphed below. The studied countries are highlighted in yellow, and the remaining countries are colored in purple. It should be noted that the European Union (EU) is acknowledged as one country, one node, in this network. As regarded on the WTO’s website, all member states of the EU generally fall in line for whatever trade deals are made between nations. Therefore, the EU was left as its own trade entity on the network. In the end, each edge between two country nodes acknowledges a trade agreements between the two states. The corporate network highlighted major channels of agreements, including regionally, across the Americas, and across the Pacific. The bulk of agreements highlighted these channels. Countries in Southeast Asia had many with Southeast Asia as well as across the line of the Pacific of Asia, from the Koreas eventually down to Australia. South American countries and the U.S. had many connections across the Americas as well as expanding across the Pacific to Asia especially. The most interesting part of the network then is with Mali and Sierra Leone. These two nations are in one trade deal, which is the Economic Community of West African States (ECOWAS) (World Trade Organization, n.d.). This deal includes open trade among nations exclusively in and along the southern coast of West Africa, from the island nation of Cabo Verde to landlocked Niger. Sierra Leone and Mali are therefore connected by this regional agreement but would not otherwise likely be connected to the rest of the network. However, Ghana, Nigeria, Guinea, and Benin are connected to economic treaties withmore than four of the studied countries. From South America, through Africa and the Middle East, and down to Southeast Asia, there was a treaty signed called the Global System of Trade Preferences among Developing Countries (GSTP) (World Trade Organization, n.d.). This was evidently an agreement made for promoting trade amongst developing countries. This included Chile and Brazil to Singapore and Vietnam as well as the four West African states also a part of the ECOWAS (World Trade Organization, n.d.). These treaties between nations produce an interesting perspective to the network. A lot of the countries included in the studied countries happen to be a part of this GSTP and hence they become central part of the network. The network illustrates the core nations a part of this treaty and shoots out to other nations and other member states in different regional clusters. And so, the visual perspective illustrates a new perspective on the relationship of nations across the network of corporate trade agreements.

# Find countries with most frequent trade agreements
agreements <- data.frame(table(corporate_data[,2]))
frequent_agreements <- agreements[agreements$Freq > 4,]

# Define subset of corporate network from studied and frequent trade agreement countries
corporate_subset <- data.frame(0, 0)
colnames(corporate_subset) <- colnames(corporate_data)
for (i in 1:length(corporate_data[,1]))
{
  if (corporate_data[i,2] %in% studied_countries) {
    corporate_subset[nrow(corporate_subset) + 1,] <- data.frame(corporate_data[i,])
  }
  else if (corporate_data[i,2] %in% frequent_agreements[,1]) {
    corporate_subset[nrow(corporate_subset) + 1,] <- data.frame(corporate_data[i,])
  }
}
corporate_subset <- corporate_subset[-c(1),]


# Define inward and outward edge nodes
node.out <- unique(corporate_subset$Country)
node.in <- unique(corporate_subset$AgreementWith)

# Create graph object for corporate network
corporate_net <- graph_from_data_frame(d = corporate_subset[c("Country", "AgreementWith")], vertices = union(node.out, node.in), directed = TRUE)

# Define colors for nodes (Referenced Frazier, n.d.)
for (i in 1:length(V(corporate_net)))
{
  if (V(corporate_net)$name[i] %in% studied_countries) {
    V(corporate_net)$color[i] <- "yellow1"
  }
  else {
    V(corporate_net)$color[i] <- "purple"
  }
}

# Print network graph
plot(ggnet2(corporate_net, node.size = 12, node.color = V(corporate_net)$color, edge.size = 1, edge.color = "grey", 
            arrow.size = 2.0, label=T, label.size = 5))

The degree, betweenness, and closeness centralities of each country in the corporate network were examined. Overall, the most central figure were clearly dominant visually and in these centrality measures, being Chile, Singapore, and Vietnam. All three of these nations had a considerable number of economic agreements across the world. Singapore is famously a very trade-friendly, capitalistic state, and so relationships around the world for trade are understandable. Chile appears to be a very economically diplomatic nation as well, tying Singapore for the lead in centrality among all of the centrality measures. Vietnam is more a communist state, so it is perhaps a bit ironic that there can be seen presumably a bit of an openness to the international trade of goods. Regardless, the centrality of these nations likely is because of the connection of the GSTP. These were studied countries for the project, so they bound to have more connections. However, their intersecting, connecting nature, particularly in this treaty sees these nations as well as Brazil be toward the center of the network. And so, this can be finally seen also a bit with the density of the network, being about 0.1571429. The network is not as dense as the military or transportation but is understandably more dense than the trade network as there are a lot of interconnections of trade agreements between the studied countries.

# Degree
cat("Most Central Countries in Corporate Trade Agreements by Degree:\n")
## Most Central Countries in Corporate Trade Agreements by Degree:
sort(degree(corporate_net), decreasing=TRUE)[1:10]
##       Chile   Singapore     Vietnam      Brazil       Japan   Australia 
##          39          39          35          24          23          23 
## Switzerland         USA      Mexico        Peru 
##          19          13           8           8
# Betweenness
cat("\nMost Central Countries in Corporate Trade Agreements by Betweenness:\n")
## 
## Most Central Countries in Corporate Trade Agreements by Betweenness:
sort(betweenness(corporate_net), decreasing=TRUE)[1:10]
##       Chile   Singapore     Vietnam   Australia       Japan Switzerland 
##   28.433333   28.433333   10.433333    4.933333    4.416667    1.600000 
##         USA      Brazil        Mali SierraLeone 
##    0.750000    0.000000    0.000000    0.000000
# Closeness
cat("\nMost Central Countries in Corporate Trade Agreements by Closeness:\n")
## 
## Most Central Countries in Corporate Trade Agreements by Closeness:
sort(closeness(corporate_net), decreasing=TRUE)[1:10]
##        Chile    Singapore      Vietnam       Brazil        Japan    Australia 
## 0.0098039216 0.0098039216 0.0096153846 0.0088495575 0.0086206897 0.0086206897 
##  Switzerland          USA         Mali  SierraLeone 
## 0.0084745763 0.0080645161 0.0009803922 0.0009803922
# Density
cat("\nDensity of Corporate Network: ", edge_density(corporate_net))
## 
## Density of Corporate Network:  0.1571429

Aggregate Network

 Finally, there is the perspective of all four network factors examined together. Each network factor contributes its own story to the relationship of the ten studied nations. However, what can be further analyzed by looking at it all together is to be seen. The aggregate dataset was formed out of a 20x20 adjacency matrix of 0s, with the names of the countries studied plus ten other important nations across the networks. The ten other nations were including to add context to the overall aggregate network. And so, the situation of the aggregated network should reveal perspectives about the international overall.
 The code below produces the adjacency matrix for the aggregate network of countries. It adds "1" to the value of one country to the other if there is a connection between two countries in any of the characteristic networks. A maximum of "4" meant that there was an edge connection between two countries in the trade, military, transportation, and corporate networks. The four for loops below process the matrices against the data of each of the characteristic networks. Ultimately, in the proceeding block of code below, the aggregate network is graphed with the studied countries highlighted in yellow and the ten contextual nations colored in orange. The edges are also made to illustrate the number of characteristic network connections. If there is an edge between two countries in all four networks, the edge was thick to a factor of "4" and was colored brown. The thickness reduced for all decreasing numbers, and attributed the color red for "3," green for "2," and blue for "1."
# Import blank network to initialize aggregate network
aggregate_data <- read.csv("Aggregate_Network.csv", header=T, check.names = F)
# Add row names
rownames(aggregate_data) <- aggregate_data[,1]
# Define list for countries involved aggregate network
aggregate_countries <- aggregate_data[,1]
aggregate_data[,1] <- NULL

# Add edges for trade network
for (i in 1:length(trade_data[,1]))
{
  if (trade_data[i,1] %in% aggregate_countries && trade_data[i,2] %in% aggregate_countries && 
      aggregate_data[c(trade_data[i,1]),c(trade_data[i,2])] < 1) {
    
    aggregate_data[c(trade_data[i,1]),c(trade_data[i,2])] <- aggregate_data[c(trade_data[i,1]),c(trade_data[i,2])] + 1
  }
}

# Add edges for military network
for (i in 1:length(military_data[,1]))
{
  for (j in 1:length(military_data[,1]))
  {
      aggregate_data[c(colnames(military_data)[i]),c(colnames(military_data)[j])] <- 
        aggregate_data[c(colnames(military_data)[i]),c(colnames(military_data)[j])] + military_data[i,j]
  }
}

# Add edges for transportation network
for (i in 1:length(transportation_data[,1]))
{
  for (j in 1:length(transportation_data[,1]))
  {
      aggregate_data[c(colnames(transportation_data)[i]),c(colnames(transportation_data)[j])] <- 
        aggregate_data[c(colnames(transportation_data)[i]),c(colnames(transportation_data)[j])] + transportation_data[i,j]
  }
}

# Add edges for corporate network
for (i in 1:length(corporate_data[,1]))
{
  if (corporate_data[i,1] %in% aggregate_countries && corporate_data[i,2] %in% aggregate_countries) {
    aggregate_data[c(corporate_data[i,1]),c(corporate_data[i,2])] <- aggregate_data[c(corporate_data[i,1]),c(corporate_data[i,2])] + 1
  }
}

# Display head of aggregate network
head(aggregate_data)
##         USA China Mexico Canada Japan Germany Chile Brazil Argentina
## USA       0     2      3      4     3       2     4      3         2
## China     2     0      1      1     2       1     1      2         0
## Mexico    2     1      0      1     1       1     1      1         1
## Canada    3     1      1      0     2       2     1      2         1
## Japan     3     2      2      3     0       1     1      2         1
## Germany   3     1      1      2     1       0     1      3         0
##         Switzerland Italy France UK UAE Vietnam Mali SierraLeone Singapore
## USA               2     2      2  2   1       0    0           1         2
## China             1     1      0  1   1       1    1           1         1
## Mexico            0     1      1  1   1       0    0           0         0
## Canada            1     2      2  2   1       0    0           0         0
## Japan             2     2      2  3   1       2    0           0         2
## Germany           2     2      2  2   1       0    0           0         0
##         Australia India
## USA             3     0
## China           1     0
## Mexico          0     0
## Canada          1     0
## Japan           3     1
## Germany         2     0

Results - Aggregate Network Analysis

The aggregate network presented a logical display of connections across the nations involved. The traditional relationships between nations are illustrated in the weights and overall connections of the network. The United States, Europe, South America, and parts of eastern Asia are all well-connected. This seems to display the collective nature of the Western World. The nations on the extremities of the network are more traditionally Eastern or lesser developed nations. Mali and Sierra Leone are the obvious outliers, having at most one connection in any of the networks among these nations. There is, to be had, a bit of a bias because a handful of these studied nations were only examined in the trade and corporate networks. There therefore could be considered a bias as to why the more Western nations are so tightly bound together. Regardless of the case, the very densest part of the network gives an interesting perspective to the aggregate network as well. The United States and Chile and the United States and Canada are the only two “4” connections in this overall network. This demonstrates the close connection between the nations and their importance to each other. The trade partnerships, military alliances, transportation routes, and corporate trade agreements all involve these nations to each other. Beyond the “4”-level, the “3”-level also shows some major acknowledgements. The countries with “3” are especially those amidst the Americas. There are connections such as those with the U.K. and Switzerland, Switzerland, and China, and Australia and Japan that can be noted. But overall, from a visual perspective of this aggregate network, it can be seen the close-connected nature of countries in the Americas.

# Define base matrix for aggregate network, where all values one and above are set to 1
# Also, set edge weights into own list
base_aggregate_data <- aggregate_data
edge_weights <- NULL
for (i in 1:length(aggregate_data[,1])) {
  for (j in 1:length(aggregate_data[,1])) {
    if (aggregate_data[i,j] >= 1) {
      base_aggregate_data[i,j] <- 1
      edge_weights <- c(edge_weights,aggregate_data[i,j])
    }
  }
}

# Convert aggregate network adjacency matrix to matrix type
base_aggregate_data <- as.matrix(base_aggregate_data)
# Create graph object for aggregate network
aggregate_net <- graph_from_adjacency_matrix(base_aggregate_data)

# Define colors for nodes (Referenced Frazier, n.d.)
for (i in 1:length(V(aggregate_net)))
{
  if (V(aggregate_net)$name[i] %in% studied_countries) {
    V(aggregate_net)$color[i] <- "yellow1"
  }
  else {
    V(aggregate_net)$color[i] <- "orange"
  }
}

# Define colors for nodes (For Color - Referenced Frazier, n.d.; For "str_replace" - Referenced str_replace, n.d.)
edge_colors <- edge_weights
edge_colors <- str_replace_all(edge_colors, "1", "lightskyblue")
edge_colors <- str_replace_all(edge_colors, "2", "green2")
edge_colors <- str_replace_all(edge_colors, "3", "red")
edge_colors <- str_replace_all(edge_colors, "4", "brown")

# Print network graph
plot(ggnet2(aggregate_net, node.size = 12, node.color = V(aggregate_net)$color, edge.size = edge_weights, edge.color =edge_colors,
            arrow.size = 2.0, label=T, label.size = 5))

Evaluation

 As the previous four networks, the degree, betweenness, and closeness centrality of each country in the aggregate network were examined. The central figures of the aggregate network are not necessarily was obviously noticed from the visual network. China is the most central country overall, followed by Japan and the USA. These countries are logically very important across the world and happen to be, in particular, with this international network. China, notably, is not even one of the studied countries but remains the overall most central to the network, giving an indication to its impact as an international entity. It is interesting the other nations ordered on the centrality rankings, particularly Sierra Leone. Sierra Leone is more of an outlier, but it is apparently connected strategically to very central nodes to the network. So, the node would work as a go-between for the network. However, none of the centrality metrics take into account the weight and number of connections across the board of the networks. So while Eastern Asian nations ranked among the most centrality by pure, individual edge connections alone, the weight connections proved to be more clustered in the Americas and Western World. Finally, the density was derived for the aggregate network like the others, being calculated to 0.6421053. This is the second-most dense overall across the five networks of the project. It is logical that this is the case since it derives the edge connections from any edge connection present. Especially regarding the transportation network, a lot of connections are made between countries, therefore making the aggregate network very dense. And so, in the end, the aggregate network illustrates the dense bond of across pure weight as well as centrality of international connections.
# Degree
cat("Most Central Countries by Degree:\n")
## Most Central Countries by Degree:
sort(degree(aggregate_net), decreasing=TRUE)[1:10]
##       China       Japan         USA      Brazil      Canada     Germany 
##          33          33          32          32          29          28 
##          UK   Australia      Mexico Switzerland 
##          28          28          27          27
# Betweenness
cat("\nMost Central Countries by Betweenness:\n")
## 
## Most Central Countries by Betweenness:
sort(betweenness(aggregate_net), decreasing=TRUE)[1:10]
##       China SierraLeone Switzerland         UAE     Germany         USA 
##   33.239304   19.194444   14.199026   14.128914   10.680177   10.483622 
##       Japan      Brazil      France   Australia 
##    9.402868    8.857991    7.041414    5.864430
# Closeness
cat("\nMost Central Countries by Closeness:\n")
## 
## Most Central Countries by Closeness:
sort(closeness(aggregate_net), decreasing=TRUE)[1:10]
##       Japan         USA       China      Brazil Switzerland   Australia 
##  0.04761905  0.04545455  0.04545455  0.04545455  0.04347826  0.04347826 
##      Canada       Chile      France   Singapore 
##  0.04166667  0.04166667  0.04166667  0.04166667
# Density
cat("\nDensity of Aggregate Network: ", edge_density(aggregate_net))
## 
## Density of Aggregate Network:  0.6421053

Conclusion

The application of centrality measures on the trade, military, transportation, and corporate datasets as individual networks provided some insight on the strategic alliances formed by these countries. These social network analyses led us to believe that the most developed countries such as the United States, Canada, and Germany had to best overall strategies to form ties with other countries to further expand their influence and presence in each category. However, the data painted a different picture when each of these networks were aggregated into one individual network that represented their combined weights and attributes. Japan, a country that was not among the top centrality measured countries, had a higher presence in these measures when the networks were analyzed as one compounded data source. Japan had the second highest degree centrality and the highest measure in the closeness centrality. Japan was highly overlooked as a key actor in each individual analysis. Countries who disregard Japan as being a key ally in trade or military alliances may not be getting all the advantages they believe they are when taking part of these networks. Other countries that were assumed to have low influence on the structure of these networks were Sierra Leone, Switzerland and The United Arab Emirates. When the proposed plan of an aggregated network was applied, it revealed that these three nations formed the community with highest betweennees along with China. The well developed countries that were assumed to be the most influential among the network were right behind these countries in the rankings but their betweenness scores were about half the value of the measures we discovered for sierra Leone and more than a third of China’s measure. These discoveries can change the way that the leading countries of the world evaluate their plans and strategies to increase their footprint in the trade, transportation, military, and corporate networks around the world.

References

Aldagheiri, M. (2009). The Role of The Transport Road Network in the Economic Development of Saudi Arabia. doi: 10.2495/UT090251

Brooks, P. (May 24, 2018).Major Shipping Routes for Global Trade. https://arcb.com/blog/major-shipping-routes-for-global-trade

Central Intelligence Agency. (2021, April 15). The World Factbook. https://www.cia.gov/the-world-factbook/

Frazier, M. (n.d.). R color cheatsheet. https://www.nceas.ucsb.edu/sites/default/files/2020-04/colorPaletteCheatsheet.pdf

Gibler, D. (2012). The Correlates of War Project. https://correlatesofwar.org/data-sets/formal-alliances

str_replace: Replace matched patterns in a string. (n.d.). https://www.rdocumentation.org/packages/stringr/versions/1.4.0/topics/str_replace

McInnis, K.J. (October 30, 2019). The Competitive Advantages and Risks of Alliances. https://www.heritage.org/military-strength/topical-essays/the-competitive-advantages-and-risks-alliances

Mullins, C.S. (June 2020). Data Aggregation.. https://searchsqlserver.techtarget.com/definition/data-aggregation

WillyWinkel. (2018, March 9). Error: ggnet2 cannot plot multiplex graphs #32. https://github.com/briatte/ggnet/issues/32

World Trade Organization. (n.d.). Participation in regional trade agreements - map. https://www.wto.org/english/tratop_e/region_e/rta_participation_map_iframe_e.htm?country_selected=MLI&sense=b

Appendices

Not applicable.