README.md

Description

This is a simple R package that is developed to enable researchers downloading data from Twitter API using multiple keys. This package is developed for research and teaching purposes.

The main advantages of this package over the other R packages are:

There is no gurantee that the functions perform as intended and there might be bugs in the code!

This package is for Linux operating system optimized and might not work properly in other operating systems (specially in Windows!).

Sample use

Downloading the complete list of friends of a Twitter user

```{r, echo = FALSE}

install and load the package

devtools::install_github("MorShahrezaye/bigTwitter", force = TRUE) library(bigTwitteR)

read the keys from the csv file

auth_df <- read.keys("keys.csv")

define the query user

queryUser <- "MorShahrezaye"

download the friendsof the query user

friends <- getFriendIDs(screen_name_list = queryUser, auth_df = auth_df, sleepTime = 1, verbose = T)

downliad the friends of each friend of the query user (max 50k friends per user)

friendsLevel2 <- getFriendIDs(user_id_list = friends[[1]], auth_df = auth_df, sleepTime = 1, verbose = F, max_per_user = 50000)

form the friendship network

g <- userEdgeList2graph(friends, friendsLevel2, friendsLevel3, directed = F) ```

Recommended urls

1- Twitter API documentation: https://developer.twitter.com/en/docs 2- A tutorial to rtweet package: https://mkearney.github.io/nicar_tworkshop/#1 3- A tool to visualize huge networks efficiently: https://gephi.org/users/download/



MorShahrezaye/bigTwitter documentation built on Oct. 26, 2020, 3:41 p.m.