From chambers to echo chambers: quantifying polarization with a second-neighbor approach applied to Twitter’s climate discussion
Code for Kolic and Aguirre-Lopez' 2025 article: From chambers to echo chambers: Quantifying polarization with a second-neighbor approach applied to Twitter's climate discussion (arXiv), published in the Journal of Complex Networks (2025).
To reproduce the analysis and plots from the paper:
- Install the required Python (
python >= 3.10) libraries via
pip3 install -r requirements.txt
- Download the anonymized weekly retweet networks from Zenodo and paste them at
data/networks_anonymized - Run every cell of
notebooks/plots.ipynb. This notebook runsmain.pyand then creates each plot of the paper.
Additionally, check the /example folder and the chamber_example_higgs-boson.ipynb notebook for a tutorial on how to use the code with a real retweet network about the discovery of the Higgs Boson in 2012.
By using this code, you agree to the following points:
- The code is provided without any warranty or conditions of any kind. We assume no responsibility for errors or omissions in the results and interpretations resulting from the application of the code.
- We would appreciate it if you cite our paper in publications where you use or modify it.
@article{kolic2025chambers,
title={From chambers to echo chambers: quantifying polarization with a second-neighbor approach applied to Twitter’s climate discussion},
author={Kolic, Blas and Aguirre-L{\'o}pez, Fabi{\'a}n and Hern{\'a}ndez-Williams, Sergio and Gardu{\~n}o-Hern{\'a}ndez, Guillermo},
journal={Journal of Complex Networks},
volume={13},
number={4},
pages={cnaf020},
year={2025},
publisher={Oxford University Press}
}
Kolic, B., Aguirre-López, F., Hernández-Williams, S., & Garduño-Hernández, G. (2025). From chambers to echo chambers: quantifying polarization with a second-neighbor approach applied to Twitter’s climate discussion. Journal of Complex Networks, 13(4), cnaf020.
This project is licensed under the MIT License.