This library includes code to build, analyze, and visualize empirical datasets and model simulations of rank dynamics in complex systems. The description and results of ranking data and models can be found in the following publication. If you use this code, please cite it as:
G. Iñiguez, C. Pineda, C. Gershenson, A.-L. Barabási
Dynamics of ranking
To appear in Nature Communications (2022)
arXiv: 2104.13439
Core library:
- data_misc.py (functions to process and analyze empirical rank data)
- props_misc.py (functions to compute rank properties of data/model)
- model_misc.py (functions to run and analyze model of rank dynamics)
Sample analysis scripts:
- script_fitData.py (script for fitting data with model)
- script_getData.py (script for getting data properties)
- script_solveFitEqs.py (script for solving and visualizing fit equations)
Secondary scripts:
- script_fitData.sh (script to run code in cluster)
- script_fitData.slurm (script to run code in cluster)
- script_moveFiles.py (script to move files in bulk)
Each script corresponds to a figure in the main text and supplementary information.
- params_data.pkl (basic statistics per dataset: number of elements, ranking list size, number of observations)
- params_model<>.pkl (average rank properties and fitted model parameters per dataset)
- script_fitData.py (script for fitting data with model)
- run_fitData<>.sh (script to run code in cluster)
Each script corresponds to a table in the supplementary information.