This repository contains the code required to reproduce the results presented in the following paper:
- I. Iacopini, G. Petri, A. Baronchelli & A. Barrat (2021), Group interactions modulate critical mass dynamics in social convention, Commun Phys 5, 64 (2022).
This study relies on publicly available datasets that have been collected and released in previous publications:
- Face-to-face interactions by the SocioPatterns collaboration and downloaded from here.
- Email-EU data set presented in Paranjape et al. 2017 and downloaded from here.
- Congress-bills data set presented in Fowler 2017 and downloaded from here.
Original and processed data are both stored in the Data
folder.
Most of the scripts are Jupyter notebooks contained in the Notebooks
folder:
0_Integrating MF equations for 2-words HONG.ipynb
defines mean field equations and integrates them numerically1_Simulations - Homogeneous Mixing 2-HGs.ipynb
simulates the NG on homogeneous 2-hypergraphs for comparison with the analytics2_ Comparing MF with stochastic simulations.ipynb
compares the esults from the previous two notebooks (MF vs analytical)3_Preprocessing Email-EU and Congress-bills data sets.ipynb
processing the two biggest data sets on emails communication and US congress bills4_Preprocessing Sociopatterns data sets.ipynb
processing the face-to-face interactions from the sociopatterns collaboration5_Example of a simulation on a hypergraph.ipynb
simulates one game on a given higher-order structure6_Aggregating simulations results (run externally) on empirical data sets.ipynb
performs an aggregation of the simulation results on empirical data sets (these are run separately through the authomatically created scripts contained in theScripts
folder)7_Simulations - Homogeneous Mixing HGs with groups of different sizes.ipynb
simulates the NG on homogeneous k-hypergraphs of increasing size (these are run separately through the bash script contained in the notebook)8_Figures.ipynb
plots most of the figures
Results are put in a Results
folder.