Main content

Home

Menu

Loading wiki pages...

View
Wiki Version:
# Political Astroturfing on Twitter: How to Coordinate a Disinformation Campaign ### Franziska B. Keller, David Schoch, Sebastian Stier, JungHwan Yang ## Replication materials The data and code provided here enables the replication of all analyses in ***Political Astroturfing on Twitter: How to Coordinate a Disinformation Campaign***. ## Content The archive contains raw and aggregated data, R scripts and bash scripts underlying the analysis in the paper and supplementary material. ## R packages Most of the analyses were done in R. The used packages are listed below together with the code to install them. ```{r libs, eval =FALSE} rm(list=ls()) if (!requireNamespace("pacman", quietly = TRUE)) { install.packages(pacman) } if (!requireNamespace("remotes", quietly = TRUE)) { install.packages(remotes) } pacman::p_load(tidyverse, tidytext, lubridate, igraph, extrafont, rvest, data.table, blockcluster, rtweet, update = FALSE) # add github packages (specific commit is given as ref argument) if (!requireNamespace("patchwork", quietly = TRUE)) { remotes::install_github("thomasp85/patchwork",ref="fd7958b") } ``` ## R scripts | script | description| |---|--| | `figures.R` | script that produces the figures of the paper and supplementary material | | `text_analysis.R` | script that reproduces the text analysis results | | `detection.R` | script for all detection methods | |` analysis.R` | code that can only be run with deanonymized data (only shared for completeness) | ## Bash scripts The co(re)-tweets were computed using a series of bash scripts. The scripts are shared as-is but need the un-anonymized data to run properly. The code assumes the following structure of a raw tweet file: - `user_name`: user\_screen\_name of the account - `user_id`: user\_id of the account - `date`: datetime of the tweet - `text`: text of the tweet - `rt_user`: user\_screen\_name of retweeted account or `NA` if tweet is not a retweet columns should be separated by ";". ## System requirements All analyses where run on a Ubuntu 18.04 ThinkPad with 16GB of RAM and R version 3.5.1. ## Data files All data to reproduce the results of the main paper are provided with this document. - rds/RDS files are readable in R with `readRDS()`. - RData files are readable in R with `load()`. - graphml files are readable with `igraph::read_graph()`. NOTE: R sometimes throws an error with graphml files. Try visone (visone.info) instead All `user_names` and `user_id`s of accounts not related to the NIS campaign (including suspect accounts) were anonymized to protect the identities of these users. NIS `user_names` and `user_id`s are given without anonymization. Existing accounts with a (former) NIS user_name are accounts that were registered after 2012 and are thus **not** related to the campaign. ### Data to reproduce all figures | data file | description | | --- | --- | | `times.RData` | contains three data frames of tweet counts per hour, day and weekday for regular and NIS accounts | | `nis_retweet_network.graphml` | retweet network among NIS accounts | | `cotweet_nis_60.graphml` | co-tweet network among NIS accounts (60 second threshold) | | `coretweet_nis_60.graphml` | co-retweet network among NIS accounts (60 second threshold) | | `hourly_activity_suspects.rds` | data frame of tweet counts per hour of suspect accounts | | `weekday_activity_suspects.rds` | data frame of tweet counts per weekday of suspect accounts | | `impact_data.RData` | contains three data frames including the number of followers, mentions and retweets received of NIS, suspects, opinion leader and regular accounts | | `nis_tweets.csv` | tweets sent by NIS accounts excluding the tweet text | | `suspect_tweets.csv` | tweets sent by suspect accounts excluding the tweet text (anonymized) | | `cotweets_nis_threshold/` | folder containing all raw co-tweet network data of NIS accounts with different thresholds | | `coretweets_nis_threshold/` | folder containing all raw co-retweet network data of NIS accounts with different thresholds | | `cotweet_all_times.csv` | all co-tweets occuring in the dataset as an edgelist together with time difference of posting (non-NIS accounts are anonymized) | | `coretweet_all_times_aggreg.rds` | number of detected accounts via co-retweeting when time threshold is altered | | `rt_counts_retweeted_by_nis.rds` | data frame of retweet counts of accounts that received a retweet by an NIS account broken down into categories (NIS, opinion leaders and randomly sampled accounts) | | `retweets_network.csv` | retweet network of the whole dataset as an edgelist | | `cotweet_network.rds` | complete co-tweet network of the dataset (60 second threshold) | | `coretweet_network.rds` | complete co-retweet network of the dataset (60 second threshold) | | `rt_received_by_group.rds` | list of two vectors. number of retweets received by regular, NIS and opinion leader accounts. The first vector includes the suspect accounts in the group of regular users; in the second vector suspects are grouped with NIS accounts. | | `rt_received_by_group_pol.rds` | list of two vectors. number of retweets received by regular, NIS and opinion leader accounts (tweets with political keywords only). The first vector includes the suspect accounts in the group of regular users; in the second vector suspects are grouped with NIS accounts. | | `ko_word_pattern.txt` | list of Korean stopwords and stemming patterns | | `rt_account.RDS` | retweeted acccounts by different groups of accounts | | `word_count.RDS` | counts of words used by different groups of accounts by day | | `words_by_group.RDS` | counts of words used by different groups of accounts by day excluding retweets | | `words_by_week.RDS` | counts of words used by different groups of accounts by week |
OSF does not support the use of Internet Explorer. For optimal performance, please switch to another browser.
Accept
This website relies on cookies to help provide a better user experience. By clicking Accept or continuing to use the site, you agree. For more information, see our Privacy Policy and information on cookie use.
Accept
×

Start managing your projects on the OSF today.

Free and easy to use, the Open Science Framework supports the entire research lifecycle: planning, execution, reporting, archiving, and discovery.