Sentiment Analysis for Airlines via Twitter

July 5, 2011
By

(This article was first published on Revolutions, and kindly contributed to R-bloggers)

Last weekend here in the states was the 4th of July long weekend, one of the busier air travel days of the year. As anyone who flies in the States knows, with air travel often comes frustration, and in this social media age many express their frustration on Twitter:

Airline sentiment

The image above comes from a tutorial on text mining with R given by Jeffrey Breen to a joint meeting of the Boston Predictive Analytics and Greater Boston useR MeetUp groups. In the talk, Jeffrey showed how you can use the R language to download tweets mentioning airlines in conjunction with positive ("love", "best", etc.) and negative ("hate", "sucks", etc.) sentiments using the Twitter API, and then score each tweet according to the sentiment expressed. Some airlines did better than others. For example, tweets mentioning Delta Airlines were weighted towards negative sentiment: 

Delta sentiment

But how meaningful is sentiment as expressed on Twitter, really? To assess this, Jeffrey showed how he compared the sentiment rankings to ranking scraped from the American Customer Satisfaction Survey for airlines, and there was a strong relationship. So this could be a useful tool for airlines to monitor their performance in real time. For more details see Jeffrey's full slide deck at the link below.

Jeffrey Breen: slides from my R tutorial on Twitter text mining #rstats

[*] The Boston R User Group is proudly sponsored by Revolution Analytics.

To leave a comment for the author, please follow the link and comment on his blog: Revolutions.

R-bloggers.com offers daily e-mail updates about R news and tutorials on topics such as: visualization (ggplot2, Boxplots, maps, animation), programming (RStudio, Sweave, LaTeX, SQL, Eclipse, git, hadoop, Web Scraping) statistics (regression, PCA, time series, trading) and more...



If you got this far, why not subscribe for updates from the site? Choose your flavor: e-mail, twitter, RSS, or facebook...

Tags: , ,

Comments are closed.