Code Monkey home page Code Monkey logo

conferencecoverage's Introduction

conferenceCoverage

Version Licenceworks on my machine

ABOUT

Get twitter conference coverage based on a hashtag over time with R twitteR package.

Visualization made with ggplot2, scales and wordcloud packages

USAGE

./conferenceCoverage.R -a HASTAG -d DATE -l LENGTH [-f MINFILTER -u MAXUSERS -t MAXTWEETS]
  • HASTAG is the hastag for the conference (without #)
  • DATE is the first day of the conference in YYYY-MM-DD format
  • LENGTH is the length in days of the conference
  • MINFILTER is the minimum number of tweets/user in the top user graph [default is 3]
  • MAXUSERS is the maximum number of users in the top user graph [default is 40]
  • MAXTWEETS is the maximum number of tweet/day required by the API [default is 1500]

EXAMPLES

./conferenceCoverage.R -a JOBIM2016 -d 2016-06-26 -l 5
./conferenceCoverage.R -a JOBIM2016 -d 2016-06-26 -l 5 -f 5 -u 25 -t 1000

HELP

How to install twitteR and RCurl package on Ubuntu

In Shell:

sudo apt-get install r-base r-base-dev libxml2-dev libcurl4-openssl-dev curl libcairo-dev

If problems with svglite, check github.com/hadley

In R console:

install.packages("devtools")
install.packages("RCurl")
install.packages("twitteR")
install.packages("ggplot2")
install.packages("tm")
install.packages("scales")
install.packages("wordcloud")
install.packages("optparse")

How to get pass the twitter credentials working with twitteR

  • Log to your account on twitter.com (or create a new one)
  • Go to dev.twitter.com
  • Create an app to get a consumerKey and a consumerSecret

In a R console :

library(twitteR)  
consumer_key <- 'YOURCONSUMERKEY'
consumer_secret <- 'YOURCONSUMERSECRET'
access_token <- 'YOURACCESSTOKEN'
access_secret <- 'YOURACCESSSECRET'
save(list = c("consumer_key", "consumer_secret", "access_token", "access_secret"), file="cred")

The cred file just created contain all your credentials for Twitter, so don't share it on Github ;-). Now you just had to load it and you can authentify yourself with it.

TO DO

  • Add more stuff:
    • Choice of color theme
    • Shiny

NOTES

Script is mostly copied and slightly adapted on Neil and Stephen twitter analysis:

Informations for installing twitteR and RCurl on Ubuntu:

conferencecoverage's People

Contributors

maxulysse avatar waffle-iron avatar

Watchers

 avatar  avatar  avatar

Forkers

waffle-iron

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.