SearchForTweets

Angela Di Serio
January, 2016



Developing Data Product
Course Project

SearchForTweets is a shiny application that allows you to find news and events specifying a set of words.
It is possible to indicate the language used and the maximun number of tweets to be retrieved from Twitter. A word cloud and a Table are showed for the tweets that meet the specified query

Implementation Details

SearchForTweets extracts Twitter data using direct authentication method and the Search Twitter API.

SearchForTweets is a real time application since it uses real data extracted at the moment.

R Code

# Twitter Authentication using direct Authentication
setup_twitter_oauth(consumer_key,consumer_secret,access_token,access_secret) 
[1] "Using direct authentication"
token <- get("oauth_token", twitteR:::oauth_cache)
token$cache()
<Token>
NULL
<oauth_app> twitter
  key:    RCwBUMe5ouuXqnGbS6EmByBAV
  secret: <hidden>
<credentials> oauth_token, oauth_token_secret
---
        twtList<-searchTwitter(searchTw,n, langInput)
        twtLista<- do.call("rbind",lapply(twtList,as.data.frame))
        dim(twtLista)
[1] 50 16
        head(substr(twtLista$text,1,120),5)
[1] "Call 509-443-1111 to donate airline miles and give flights to wishes! https://t.co/tDP3xmXkCP #WishesInflight https://t."
[2] "Carl Barks, \"Magica De Spell, Vesuvius Airline Frequent Flier\", 1980s... https://t.co/7zPq4RiEpx"                      
[3] "Airline profit expectations for the year ahead remain positive, according to IATA<U+0092>s quarterly survey of CFOs - https://t"
[4] "#AirWorldToday: Airline Business Confidence Survey - January 2016 https://t.co/8vVQ7w15gM"                               
[5] "RT @OUTOF_3_9_0: <U+0095><U+0095> Airline Pax's .. get some Manners for a change ! <U+0095> https://t.co/MjxdY6dEFP"                          

Animation

To play with the application, press SearchForTweets