Posts

Showing posts from June, 2013

Customer satisfaction survey by sentiment analysis of tweets using R

Image
Heydi ho.

I'm back to continue my intense love affair with R, this time, notching up the intention a bit more than just popularity analysis. This time it's sentiment analysis of tweets to compare whether people are happy or not with products.

This experiment was done following Jeffrey Breen's brilliant blog post but with different products and brands. I won't bother going into the details of how they were done, (the set of slides on the page sums up everything) ... but I'll go straight into my findings.

Also, a word of caution : the post mentioned above was written in 2011, which was when Twitter had their API version 1.0. Of late, that has changed and given way to the API version 1.1. The primary change is the requirement to authenticate every request to the API using OAuth. To know how to do that, you can refer to the first bit of my post on Twitter popularity analysis using R.

Once you've gotten the text of the tweets, you can follow the instructions in the …

Formula 1 : what lies in store for 2014?

Image
The 2013 season isn't halfway through yet, but going by the looks of it, the 2014 season of the FIA Formula 1 World Championship sure looks to be an absolute cracker. Here's a lowdown of what is brewing behind the paddock.




With heavily revised technical regulations for 2014, which will see the shift to smaller turbo-charged engines (1.6L V6) one would naturally expect Adrian Newey and Red Bull to be on top of things. Turbos have been banned in Formula 1 since 1989 owing to safety concerns but their reintroduction could be a vital factor in defining teams' performances throughout the season.Yes, Red Bull has renewed Sebastian Vettel's contract for one more year, which means our reigning world champion will still be in the prime of things in 2014. And here's the biggie : expect Mark Webber to be replaced by none other than the great Kimi Räikkönen to line up along side Vettel. This partnership could be a double-edged sword - though I'm expecting Red Bull to be imp…

Making a word-cloud for a topic on Twitter using R

Image
This post continues with my new found love for R and Twitter mining. What we'll be trying to do here  is analyse tweets and make a graphical word cloud to find out what people are talking about, about a particular topic.
To get started with R and the new Twitter API 1.1, please check this previous post.

Once you're done with the authentication and stuff, let's chew on some tweets.

For this experiment I chose the ever-in-the-news City of Joy, where I hail from - viz Calcutta. Like in the past, we use the TweetFrame function to get our data frame of latest tweets.

Apologies again for shoddy screenshots, but Blogger's text editor is retarded. Also, I'll make a permanent solution to it soon, by using some CSS here and there. Till then, please make do with this.


Next, we'll extract the text part from these tweets and do some pre-processing. To do string processing, R provides a handy package called stringr. So just click on Tools > Install Packages and do the ne…

Formula 1 popularity analytics using R

Image
Here's what's been keeping me busy this summer - alongside of course, a truck load of movies and TV shows and books.

So we all know what Twitter is. The whole world is out there, and if you aren't yet, you should seriously consider joining.

Second, there's this remarkable statistical analysis tool which is called R. Read about it here. With Twitter, we have a lot of data to analyse, and with R we get the power to analyse all that data. Which is exactly what we're going to do.

So, get yourself a Twitter account, if you haven't already; install R Studio on your system (R Studio is a neat IDE that you can use to write programs in R), and let's proceed to do a pretty cool experiment.

What is our aim?

We're trying to analyse live tweets, to do a popularity analysis of two topics. Since I'm a motorsports buff, I'll choose two Formula 1 drivers as my guinea pigs (Sebastian Vettel and Kimi Raikkonen). You can choose anything you want, from Lady Gaga an…