The `out of the blue’ nature of recent terror attacks and the diversity of apparent motives, highlight the importance of understanding the online trajectories that individuals follow prior to developing high levels of extremist support. Here we show that the physics of stochastic walks, with and without temporal correlation, provides a unifying description of these online trajectories… Here is the documentation for the codes used for this work.
Table of Contents
- Preprocessing the datasets (optional)
- Analyzing the clock-time lifetime and event-time lifetime distributions
- Analyzing the temporal correlations (memory effect)
- Analyzing the inter-individual correlations
Download the folder “projects/Individuals (chapter 5)” (temporarily only available by email requests), go into the folder, and run the following two bash commands:
pip install -r requirements.txt
Then unzip sav.zip.
2. Preprocessing the datasets (optional)
This is optional because all the preprocessed data will be downloaded in the previous step. The codes for preprocessing the datasets are included in the sub-folder “Individuals/preprocess/” in case needed.
3. Analyzing the clock-time lifetime and event-time lifetime distributions
Running “randomWalkwithMemo-fitting-errorbar-banned.py” you will get:
Running “randomWalkwithMemo-fitting-part.py” you will get:
Running “randomWalkwithMemo-fitting-errorbar-deleted.py” you will get:
Running “randomWalkwithMemo-fitting-errorbar-alive.py” you will get:
Running “lifespan-eventtime-distr.py” you will get the following figure:
4. Analyzing the temporal correlations (memory effect)
Running “P-nB-L-vs-n-data-vs-sim.py” you will get the following figures:
Running “P-nB-L-q-vs-L-data-vs-sim.py” you will get the following figure:
Running “randomWalkwithMemo-velocity-compare.py” you will get:
Running “P-nB-L-vs-n-sim-m.py” you will get the following figures:
5. Analyzing the inter-individual correlations
Run “jidx-sampled-all.py” with the parameter mode set to either “intra” or “inter”, you will get the following two figures (which show the evolution of information quality ratios) in the folder “figs/”:
Running “combinedfigures.py” you will get the following figure in the folder “figs/projected/”:
Running “graph-temporal-new-8states.py” you will get graphs like the following ones in the folder “figs/graphs/”(showing the evolution of the group memberships of the users):
Feedback: comment below or shoot me an email.
Publication: Cao, Z., et al. “Universality and correlations in individuals wandering through an online extremist space.” arXiv preprint arXiv:1706.06627 (2017).