Documentation for the project “Universality and correlations in individuals wandering through an online extremist space”

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

  1. Installation
  2. Preprocessing the datasets (optional)
  3. Analyzing the clock-time lifetime and event-time lifetime distributions
  4. Analyzing the temporal correlations (memory effect)
  5. Analyzing the inter-individual correlations
  6. Miscellaneous

1. Installation

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:

lifespan-sim-with-mem-fitting-err-banned

Running “randomWalkwithMemo-fitting-part.py” you will get:

lifespan-sim-with-mem-fitting-err-part-banned.png

Running “randomWalkwithMemo-fitting-errorbar-deleted.py” you will get:

lifespan-sim-with-mem-fitting-err-deleted.png

Running “randomWalkwithMemo-fitting-errorbar-alive.py” you will get:

lifespan-sim-with-mem-fitting-err-alive.png

Running “lifespan-eventtime-distr.py” you will get the following figure:

lifespan-eventtime-disr.png

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:

PnB-L-q-vs-L-data

Running “randomWalkwithMemo-velocity-compare.py”  you will get:

velocity-vs-q-sim-with-mem.png

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/”:

 

6. Miscellaneous

Running “combinedfigures.py” you will get the following figure in the folder “figs/projected/”:

combined.jpg

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).

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s