Kayla Duskin (1, 2), Jevin West (1,2) and Joseph B. Bak-Coleman(3)
- University of Washington Center for an Informed Public
- eScience Institute
- Craig Newmark Center, Columbia University}]
This repository provides all code and data necessary to generates results, tables, and figures found in the article "Suspension of prominent accounts minimally impacts follower engagements",
Health-related misinformation online poses threats to individual well-being and undermines public health efforts. In response, many social media platforms have taken to permanently removing accounts that repeatedly spread misinformation. Here we examine the impact on engagement following removal of seven prominent accounts during the COVID19 pandemic. Focusing on a subset of users that engaged highly with the removed accounts, we find that removal did not meaningfully reduced their use of the platform in most cases. Moreover, we examine whether removal of prominent accounts reduced their engagement with coronavirus-related posts and the extent to which it impacted the diversity of their information consumption.
If you plan on using this code for any purpose, please see the license and please cite our work as below:
Citation and BiBTeX record to come.
polarization-analysis.ipynb: Primary analysis file as an ipython notebook.src: The Bayesian Models (*.stan), code used to clean the raw data, code for generating figures, and utilities used in the primary analysis.figures.pyfunctions to generate figures*.stanStan model codemodel.pyHelper funcitons for running the main gaussian process model.utils.pyMiscellaneous utilities.
dat: data files in comma-separated values (.csv) formats./: raw data files
out: output files (generated by running)out/figures: Figures generated from resultsout/posteriors: Posterior objects for each follower saved as .json filesout/split_data: The larger dataset split into individual followers for ease of processingprocessing_df: DF used to keep track of followers, conditions, and processing statuschanges.csv: Computed changes in activity across removed users and conditionschanges_grouped.csv: Changes.csv grouped by outcome, group (med, top), and suspended user
You can reproduce the analysis, including all figures and tables by following the guide below. Please note that minor, non-qualitative differences may exist due to difference in pseudorandom number generation.
First download this repository. Either download directly or open a command line and type:
git clone https://github.com/josephbb/TwitterSuperUserRemovals
You will an Anaconda or python installation and command-line interface. The simplest way to install the requirements is to navigate to the directory and type pip install -r requirements.txt. You may, however, wish to install these in a virtual environment to avoid conflicts with your currently installed python packages. Note that installing these packages, particularly Stan and Pystan can take time and require compilation on your local machine.
The simplest approach is to navigate to the directory and simply type:
jupyter nbconvert --execute ./analysis.ipynb --ExecutePreprocessor.timeout -1
This will generate a rendered output of the notebook(.HTML) that you can open in your browswer, along with all figures and tables on your local machine. Please note that this code can take a long time (perhaps hours) to run, necessitating timeout being set to -1 in the command above. . You may prefer simply to open and review the notebook using
jupyter notebook
Once the full analysis has been run, figures can be found in out/figures, posterior predictive figures for every follower in out/figures/posteriors``` and MCMC chains in out/posteriors``.
#System Specifications
Beyond what is in requirements.txt, this analysis was run on a machine with the following configuration.
- MacBook Pro (16-inch, 2021)
- CPU: Apple M1 Pro
- Memory: 16 GiB
- OS: MacOS Montery 12.15.1
- Python: 3.11.0
- Conda: 22.9.0
- Pystan 3.3.0
- clang 14