Your verification ID is: guDlT7MCuIOFFHSbB3jPFN5QLaQ Big Computing: Twitter api with R
Showing posts with label Twitter api with R. Show all posts
Showing posts with label Twitter api with R. Show all posts

Tuesday, February 23, 2016

Setting up the Twitter R package for text analytics

The Twitter R package by Jeff Gentry is a great way to get started in Text Analytics. This tutorial is about how to get setup to pull twitter data into R so that you can do some text analytics with it. Basically it is only the first step of getting data in a text analytics Workflow. I should also give a shout out here to Ted Kawartler for getting me interested in learning more about text analytics.

The first thing you need to do is downloadd the twitteR package and make it available in your R session.

library(twitteR)

Now on the Twitter side you need to do a few things to get setup if you have not done them already. I will go through this step by step so no one gets lost. It drives me crazy when people go too fast on the setup so I can't use the tool.



You need to have a twitter account. if you do not have one go to http://twitter.com/signup and set one up. Also you need to have a modile number as part of this account.





Now that you have created a twitter account you need to go to https://apps.twitter.com and sign on with your twitter account.



Once you have signed in you should see the following screen, and simply click on the button that says "Create New App".




Once you click on the "Create New App" button you will go to the Create an Application screen. There are three fields, a click box and a button you need to click on this page. The three fields are Name, Description and Website. The name of the application must be unique so this may take a few tries. The description needs to be at least 10 character long, and put in a website. If you do not have one you can use https://bigcomputing.blogspot.com. Now click the "Yes, I agree" box for the license agreement and click the "Create your Twitter application".





Once you successfully create an appplication you will be taken to the application page. Once there click on the "key and access token" tab. From that page you are going to need four things.

1. Consumer Key (API Key)
2. Consumer Secret (API Secret)

click the "Create my access token" button.

3. Access Token
4. Access Token Secret

Now re-open your R session and enter the following code using those four pieces of information.


consumer_key <- "your_consumer_key"
consumer_secret <- "your_consumer_secret"
access_token <- "your_access_token"
access_secret <- "your_access_secret"

setup_twitter_oauth(consumer_key, consumer_secret, access_token, access_secret)


Now you are set up on the Twitter side and the R side you should be ready to go. I will cover doing some basic data pulls from Twitter in my next post

n

Thursday, May 5, 2011

Things are heating up in Boston

I just came back from the Greater Boston useRs Group. In the past few months this group has really taken off. Last nights opening speaker was from frequent presenter Jeffrey Breen on using R with Databases. His topics are so relevant to such a large portion of the community that it has already been posted by R blogs  like David Smith's Revolutions Blog.

After that Mike Kane of Yale University presented the EsperR package that was written by Bryan Lewis. While the talk really delt with working on financial data streams, the application is usable in any field that does analysis of streaming data.

Another attendee of the Meeting was John Verostek. He runs the Predictive Analytics Meetup in Boston.There is a great deal of synergies between the two groups. They have an upcoming event on Text Mining Utilizing the Twitter API with R. The Greater Boston useRs Group next Meetup is June 1 with Vincent Carey on BioConductor.