Git Product home page Git Product logo

bigtwitter's Introduction

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:

  • Capability of using multiple Twitter keys! If you have 10 keys then you can download the data 10 times faster (using one line of code)!
  • The functions return the complete output as a datatable object (other packages trim the data!)

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
#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/

bigtwitter's People

Contributors

morshahrezaye avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.