Luca Di Bello, University of Italian Switzerland (USI), 2023
Purely random friendship network | Geographical-based friendship network |
---|---|
Note: The GIFs above are just a small sample of the pre-computed simulations. The full set of simulations can be found in the
assets
folder or in the Jupyter Notebook project.
Social networks are systems that map the relationships and interactions between individuals. Although social networks are typically dynamic, the focus of this project is put on a static example.
Geographical distance plays a crucial role in social network formation, with closer physical proximity typically leading to more frequent and stronger social ties.
Additionally, geographical features, such as the density of people in an area (more in cities and less in remote mountainous regions), profoundly influence the composition and scale of these networks, shaping the diversity and connectivity of communities within a given region.
The project features two kinds of inhabitant maps:
1000 inhabitants are randomly distributed across a unit square map,
This map features several geographical areas
In this map, individuals are no longer distributed uniformly at random across the map. Instead, the density of inhabitants depends on specific geographical features: each area has a positive factor that determines the ease of living there:
The probability of a random individual being located in coordinates
From the inhabitant maps, a friendship network is created following two different models:
Map 1 - Erdős–Rényi model: The friendships are modeled as an Erdős–Rényi random graph. Each individual has a probability
Map 2 - Geographical model: The probability of a friendship between two individuals A and B is modeled as follows:
Where
The project is available as a Jupyter Notebook and can be found here (nbviewer.org).
Alternatively, the notebook can be viewed directly on GitHub here.
It is advised to use the provided environment.yml file to create a new conda environment with all the required dependencies by executing the following command:
conda env create -f environment.yml