This repository provides access to the paper's datasets, preprocessing scripts, implementation code, and animation videos of the real networks used. The arXiv version of the paper is available here. The paper is part of the project Time-Varying Hyperbolic Geometric Graphs TV-HGGs.
The repository includes the following datasets under the folder .\DATA
- USAir
- Bitcoin (BTC)
- PGP WoT
- IPv6 Internet
- arXiv
Each of the above folders includes the following zip files:
- EdgeLists.zip: Holds the edge-list of each network snapshot.
- InferredCoordinates.zip: Holds the inferred coordinates of the nodes for each snapshot as generated by Mercator.
The first step is to navigate to the desired dataset folder and unzip the corresponding EdgeList and InferredCoordinates zip files. Due to github file size restrictions you may have multiple zip files. In such cases use an appropriate software (such as 7zip) to extract the first zip file (i.e., EdgeList.zip.001 and InferredCoordinates.zip.001, respectively).
To apply Procrustean rotations for a selected dataset, first you need to apply step 1 above and unzip the InferredCoordinates.zip file of the dataset. Then, to apply Procrustean rotations on the angular coordinates of the nodes you can use the angle_rotation.py script as follows:
$ python angle_rotation.py -s .\DATA\USAir\InferredCoordinates\ -o .\DATA\USAir\InferredCoordinatesRotated
The above code snippet will generate a new folder under .\DATA\USAir\InferredCoordinatesRotated populated with snapshot files that contain the corresponding rotated angular coordinates of the USAir network.
To generate the different types of node trajectories for each dataset you can use the generate_trajectories.py script as follows:
$ python generate_trajectories.py -s .\DATA\USAir\InferredCoordinatesRotated\ -o .\DATA\USAir\angularTrajectories
The above code snippet will generate a new folder under .\DATA\USAir\angularTrajectories populated with node files that contain the corresponding angular trajectory of each node in the USAir network.
To generate the radial trajectories use the following code snippet:
$ python generate_trajectories.py -s .\DATA\USAir\InferredCoordinatesRotated\ -o .\DATA\USAir\radialTrajectories --radial
Finally, to generate the expected degree trajectories use the following code snippet:
$ python generate_trajectories.py -s .\DATA\USAir\InferredCoordinatesRotated\ -o .\DATA\USAir\kappaTrajectories --kappa
To compute the trajectory properties considered in the paper use the matlab code under the corresponding folder (matlab_code). The folder includes a README file and inline comments on how to use the code. In short, the folder contains the following matlab scripts:
- mbm.m - The implementation of the fractional Brownian motion (fBm) model.
- popularity_sim.m - Reads the radial or expected degree trajectories and creates figures similar to Fig. 1 in the paper.
- similarity_sim.m - Reads the angular trajectories and creates figures similar to Fig. 2 in the paper.
- popularity_predictions.m - Reads the radial or expected degree trajectories and performs predictions using simple heuristics, as in Figs. 39-43(a),(b) in the paper (arXiv v2).
- similarity_predictions.m - Reads the angular trajectories and performs predictions using simple heuristics, as in Figs. 39-43(c) in the paper (arXiv v2).
The folder Videos includes sample videos, one for each dataset, depicting the motion of two sample nodes per dataset.
Please cite:
Fundamental dynamics of popularity-similarity trajectories in real networks
Evangelos S. Papaefthymiou, Costas Iordanou, and Fragkiskos Papadopoulos
Phys. Rev. Lett. 132, 257401 (2024)
(https://journals.aps.org/prl/abstract/10.1103/PhysRevLett.132.257401)