Have you ever wondered how connected the world is?
Probably yes, even more when the Covid-19 virus began to circulate in China and we all started to speculate if there were any chances of it reaching our country.
If you still have any doubts, the world is very connected, and we will check it in the following paragraphs.
Preparation
I downloaded 3 datasets from Openflights.org that contain air routes, airlines and airports from 2015.
In total, there are 67,600 air routes (commercial and private) between approximately 200 countries and territories.
I worked on the data using Python (mostly the Pandas, Networkx and Seaborn libraries) and then I did the visualizations of the networks with Gephi.
In order to present the analysis, we will use the following concepts:
Centrality or ** Intermediation: It means how central or isolated in the world that country is, in other words, how easy it is to get from that country to the rest of the worl**d.
Importance of the country: It means how important the country is in the network, that is, how connected the country is in terms of quantity and quality of connections with other countries. It will not necessarily be a central country, but it could have a lot of connections with others.
To easily read the graphs, we will understand the color as the importance of the country in the network and size as its centrality.
As for the position, it will be a combination between the centrality of the country and the ones to which it is connected.
Let’s start our trip
First of all, we are going to exclude some countries and territories with a very low centrality value (almost isolated), such as Tuvalu (Oceania), Gibraltar (Europe), Bermuda (America), Lesotho or Burundi (Africa).
Let’s see how the world looks like according to its air connections

In this image, we can see the continents grouped according to their air connections.
Europe is in the center and Asia a little higher. In the lower left we see America, in the upper left the countries of Oceania and on the right the countries of Africa.
If we zoom a little more:

The first thing we can identify is that the European countries are in the center of the graph, in addition, several of their nodes are large.
This shows us that, literally, we could consider this continent as the center of the world in terms of air connections, being the area with the greatest number of connections between its countries and with the rest of the continents.
At the same time, we see very few connections between Oceania, Africa and America. To be able to communicate these continents it is necessary to go through Asia or Europe.
Remembering that the color is the importance of the country in the network and the size is its centrality, we can zoom in the center of the graph again to see that the United States is also a central country, with great importance in the network. Despite being in America, it has a lot of connections with the rest of the world.

If we continue traveling the world, based on the size of the nodes, we can see in the graph that the most connected countries on the network are France, the United States, the United Kingdom, Germany and the United Arab Emirates.
If we analyze by color, the countries with the highest number of connections (importance) **** are practically the same, although we see that Australia and Canada are included even without being central countries.
What are the most important connections between countries?

This is another question that we would like to answer. For that, we resort to the work done with Python and Pandas.
We can see that the most important connections are between the United Kingdom, Spain and Germany, along with those between the United States, Mexico and Canada.
COVID-19
Finally, answering the question we asked ourselves at the beginning about the circulation of the COVID-19 virus, how easy was it for a virus to Travel from China to the rest of the world?
Using the concept of shortest-path, let’s see how China connects with a low-centrality country in America, such as French Guiana.

It only needs 4 steps: China, Mexico, Brazil and French Guiana.
Let’s check another example, how can we connect China with a low-centrality country in Africa? In this case I choose Gambia.

Again, only 4 steps are needed: China, Angola, Morocco and Gambia.
Conclusion
We observe a hyper-connected world by its air routes. However, it is mostly centralized in several countries in Europe and some in Asia, with the exception of the United States of America.
In addition, we found the most important countries in the air network, which have a large number of connections with many countries. For example: France, United Kingdom, United States, Germany or the United Arab Emirates.
Finally, we saw that it simply took 4 steps to get from China to a remote country in America or Africa. This explains how the COVID-19 virus quickly came to affect the entire world.
To close this publication, is there a country that surprised you in terms of its centrality or importance within the global air network?
The next step will be to carry out this same analysis with all the cities of the world.