Social network analysis against COVID-19: Quanam's 2020 proof of concept
How the contact networks a virus spreads through were modeled with IBM i2 in March 2020, using fictitious data.
In the first days of COVID-19 in Uruguay, Quanam tested whether social network analysis could help trace chains of infection. This article explains the four centrality measures, the model’s entities (people, houses, events, movements, treatments) and the tool’s visualizations: link expansion, timelines, conditional formatting and maps.
TABLA DE CONTENIDOS
In March 2020, in the first days of COVID-19 in Uruguay, Quanam built a proof of concept to trace possible chains of infection using social network analysis, with the IBM i2 tool and fictitious data. This article explains why contact networks matter in an epidemic, what centrality measures are, how the entities were modeled and what kinds of analysis the tool supports.
Contact networks and the spread of the virus
Since the first cases in Uruguay were diagnosed on Friday, March 13, 2020, the fight against COVID-19 became the country’s main concern. The government took steps to slow the spread, because the virus is far more transmissible than other diseases. Early estimates, published in January 2020 in The Lancet with data from Wuhan, put its R0 at 2.68: on average, each infected person could infect that many people. This number matters because an epidemic is considered under control when R0 falls below 1.
R0 is estimated and can change over time, and that is exactly where we wanted to have an impact: helping bring it down by slowing the spread as much as possible.
To avoid a crisis in hospitals, health authorities said it was essential to reduce the spread, which is known as “flattening the curve”. The best way to do that is to detect infected people and send them, along with their close contacts, into quarantine. The public can help through social distancing, avoiding gatherings and staying at home.
That’s why we believe it is important to study and understand how people interact: social networks (real-life ones, not Facebook, Twitter or Instagram) shape how diseases spread, and they make explicit the interactions between places with back-and-forth waves of transmission, such as schools, offices, events and homes.
Social networks are made up of our interactions with family, friends, co-workers and neighbors, but also with strangers at events, bars and stores. These are the connections that social network analysis tries to model, because they are the paths the virus spreads through.
Understanding the structure of these networks, and how the virus behaves as it moves through them, gives us an idea of how to interrupt the spread and protect ourselves. It also gives us the opportunity to predict how the virus will spread.
Background and possible data sources
We had previously used a similar model for Uruguay’s National Livestock Information System (Ministry of Livestock, Agriculture and Fisheries) to identify epidemiologically related farms, but now we had to adapt it to contribute to the fight against COVID-19.
On Saturday, March 14, 2020, we started working on the model, which is based on a set of assumptions (such as the number of contacts per person, the distance to work, the size of the workplace and the household, each person’s movements and attendance at events). It was loaded with fictitious data to run a proof of concept and determine whether the model adds value and is useful for the country.
Not all of the information is easy to obtain, and privacy must be handled with care: any cross-referencing of personal data of this kind has to stay within what Uruguay’s Personal Data Protection Law (Law 18,331) allows. Nor is all the information needed to get started. The data could come from:
- BPS (the Social Security Bank), to see where each person works;
- ASSE (the State Health Services Administration) or the MSP (Ministry of Public Health), to know which hospital each person uses (bed availability, coverage of higher-risk people, etc.);
- the Integrated Social Information System (SIIAS), to identify family groups;
- the National Migration Directorate, to know who entered the country and where they are staying;
- Montevideo’s Metropolitan Transportation System, transportation companies and mobility data from ANTEL (based on the cell towers phones connect to);
- Tickantel and other ticketing platforms, to know which events people attended together;
- credit and debit card data, which could show which stores a person visited;
- ANEP (the National Public Education Administration), to know which children attend which school;
- university, sports club and social club enrollment records.
Historically, assessing the role of different social networks in the spread of respiratory diseases has been limited by the lack of detailed data on transmission outside the home and of appropriate statistical methods. Today there is information everywhere, and plenty of computing power to tackle the problem.
At the same time, where the data comes from, and whether the source is valid, matters: inaccurate information can have serious consequences, because it directly affects decision-making. I would rather have no watch and tell the time by the sun than have a watch that shows the wrong time.
Centrality measures
Centrality measures are a fundamental part of the analysis. The four classic ones are degree, closeness, betweenness and eigenvector centrality.
- Degree: the number of connections a node has with others. Think of it as the “number of friends”.
- Closeness: the average of the shortest distances from one node to all the others. Think of it as the person who is closest (the fewest hops away) to everyone else.
- Betweenness: how many times a node acts as a bridge on the shortest path between two other nodes. Think of it as an airport where you are very likely to have a layover to get from one place to another.
- Eigenvector centrality: it measures a node’s influence in a network. Intuitively, it is a person who is well connected to other people who are also well connected.
This matters because people at the center of the network are usually more likely to get infected, and to be the first to catch the virus. People on the edges of the network, with few friends and contacts, are the least likely to get sick. They may never catch the virus, but if they do, it will be late in the course of the epidemic.
Identifying the people at the center of the network (those who interact a lot with friends and contacts), who are more likely to get infected and to infect many others, could provide an early warning system for epidemics and help with proactive outbreak planning.
The model in IBM i2
These are the entities that were modeled with IBM i2 (since January 2022, the i2 product line has belonged to N. Harris Computer Corporation, which markets it as i2 Group).

In turn, each entity has attributes. For example, for a House we know the street, the street number, the apartment number, its size, and its latitude and longitude, so it can easily be located on a map. This entity is linked to a Neighborhood, which is linked to a City, which is linked to a Country.
A Meeting models a gathering between two or more people, and it can also be linked, for example, to a Pub.
The Disease entity was modeled to link each Person to their pre-existing conditions, such as diabetes, heart problems or respiratory problems, among others, and estimate the risk they would face if they caught the virus.
An Event can be many things: a soccer game, a concert, a wedding, a birthday party. It has a date, time, place and coordinates for geolocation.
When a Movement is created (with date, time, type of vehicle and license plate), several links are created as well: one to the City of origin, another to the destination City, and as many as needed to include every Person who took part in that movement.
Organization covers companies, clubs and similar groups.
A Treatment records the date it took place and is linked to the Doctor, the Hospital and the Person treated.
Each Person, in addition to identification data and age, has fields to record whether they were analyzed, whether and since when they are infected, whether they belong to a risk group and whether they are in quarantine.
What the analysis can show
It’s worth noting that the database was loaded with fictitious information, to tell a story that drew on real-life elements so it would make sense to the audience. The model screenshots are not reproduced in this article because they included personal data.
Once an entity is placed on the chart, it can be expanded to show all its relationships. Expanding my own entity shows my parents and siblings, that I work at Quanam, that I met someone on the street on March 10, 2020 (we don’t know who yet), that I live with my wife and that we went to two shows together, as well as my cell phone.
Those entities can in turn be expanded to see what they connect to, and so build up the social network. My colleagues at Quanam appear (one of them also went to one of those concerts), along with the house where other relatives live and my brother-in-law, who turns out to be the person I met on the street.
We can keep expanding to analyze mobility. People at Quanam travel a lot, so expanding my three colleagues shows where they live, their phones, their activities and their trips.
If we expand Madrid to look for other Madrid-Montevideo movements, we find the trip of a person who, in this fictitious story, is a confirmed case, and expanding that person shows all of their connections. The graph shows that, on the return flight, this person traveled with my brother-in-law’s cousin, and that both attended the cousin’s graduation party. I, in turn, had met my brother-in-law on the street. This is how an investigation into how the virus spreads can be built step by step.
A useful feature of the tool is that it can display the information as a timeline, which makes the whole sequence of events clearer.
As entities and attributes are added, the chart can become hard to read. That’s where conditional formatting helps: for example, enlarging key entities, such as high-risk people.
The centrality measures described above are also useful here, and the tool calculates them automatically. In the fictitious story, the most important entity (the one with the highest eigenvector centrality) is the wedding attended by the person who flew in from Madrid, followed by many of the guests, who, being family, are closely connected to one another.
The last feature worth highlighting is the ability to visualize the data geospatially, since the tool connects natively with Google Earth and Esri.
What the proof of concept showed
COVID-19 is a highly contagious infectious disease that, as it spreads, affects a large share of the population: if the curve is not flattened, the health system can be overwhelmed. In March 2020, healthcare software applications were emerging as an effective tool in the fight against the virus.
In this case, the proof of concept indicated that social network analysis can be an effective way to show the status of an outbreak and analyze cases of infection.
Héctor Cotelo
Data & Analytics and Information Management Consultant