Skip to content

elenacandellone/negative-ties-polarization

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Negative Ties Highlight Hidden Extremes in Social Media Polarization

Open source data and code for the research paper:

E. Candellone,* S. A. Babul,* Ö. Togay, A. Bovet, and J. Garcia-Bernardo

Negative Ties Highlight Hidden Extremes in Social Media Polarization

Pre-print: https://arxiv.org/abs/2501.05590

Data: DOI

*shared first authors

Contents of the repository

  • /bertopic/: BERTopic intermediate results and model specifications
  • /data/: CA and SHEEP embeddings and network files
  • /figures/: paper figures
  • /hsbm/: TM-hSBM intermediate results and model specifications
  • /ideology_twitter/: validation with Twitter data and PoliticalWatch
  • /notebooks/
    • 1_topic_modelling.ipynb: script to perform BERTopic and TM-hSBM topic modelling
    • 2_compare_hsbm_bert.ipynb: comparison of the two methods to have robust topics
    • 3a_create_attitudes.ipynb: create network embeddings using SHEEP and CA
    • 3b_sheep_null_model.ipynb: null model to compare SHEEP and CA
    • 4_figures_paper.ipynb: code to reproduce the figures of the paper
  • /src/
    • create_snapshot.py: code to extract and clean data from scraped webpage.
    • topicmodelling.py helper functions for topic modelling.
    • meneame.py, s3_create_attitudes.py: helper functions for creating embeddings.

Instructions

  1. Create conda environment:
conda env create -f polarization.yml
conda activate polarization
  1. Run the notebooks

Contact

About

Repository of the paper "Negative Ties Highlight Hidden Extremes in Social Media Polarization"

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published