Twitter US Airline Sentiment Analysis.
Here I present analysis of sentiments towards US Airlines as expressed in tweets on twitter. Data set can be found here on kaggle. Click here for more information on the author.
*Scroll down to read more.
Data
14640 tweets from 7700 users were analyzed. Twitter data was scraped from February of 2015 and contributors were asked to first classify positive, negative, and neutral tweets, followed by categorizing negative reasons (such as "late flight" or "rude service").
*If graphs don't appear, scroll up or down.
Overall Sentiment
About 60% of the reported sentiments were negative. I therefore focus primarily on negative comments. I next investigate how the sentiments vary across airlines.
*If graphs don't appear, scroll up or down.
Sentiment by airline
I next plotted how sentiments varies across different airlines. United had the most tweets with negative sentiment, however, it also has the maximum number of tweets. The number of tweets about an airline may be correlated to the number of planes the airline operates. I next normalize the number of individual sentiments by the total number of tweets to make relative comparisons.
*If graphs don't appear, scroll up or down.
Normalized sentiment by airline
I next plotted how the relative number of the individual sentiments varies across different airlines. United had the most negative tweets, however, it also has the most tweets. The number of tweets about an airline may be correlated to the number of planes the airline operates. I therefore divided the tweets with individual sentiments by total number of tweets. It appears that US Airways has relatively higher tweets with negative sentiments. I investigated the reason for negative sentiments.
*If graphs don't appear, scroll up or down.
Reason for negative comments
I next plotted the reason for negative comment reported in the tweets. I excluded data where the reason was nor specified or reason was given as 'can't tell'. This reduced the number of negative comments to The plot shows that the most common reason for negative sentiment was customer service issue, followed by late fight and canceled flights.
*If graphs don't appear, scroll up or down.
Reason by Airline
I next grouped the reason for negative comments by airline, and plot them in stacked bar graphs. United had most number of negative tweets, however, the relative distribution of negative comments was different for different airlines. Southwest had the most number of negative comments due to customer service issues. I next normalize the reason for negative comment by total number of negative tweets for each airline.
*If graphs don't appear, scroll up or down.
Normalized Reason by Airline
After normalizing, the contribution of negative tweets due to poorer customer service is higher (more than 50%) for Virgin America, Delta and Southwest. US Airways had the least fractions of negative tweets due to customer service issues. US airways and American Airlines have as much complaints due to customer service as due to lost luggage.
*If graphs don't appear, scroll up or down.
Tweets by location
I next plotted tweets by location. Of the 14640 tweets, only 841 had data on location. I plotted location of tweets across USA. Tweets appear to be clustered aroung big airports, like New York, Chicago, Los Angeles, etc. I therefore got data for the 30 busiest airports locations from wikipedia, and assigned each tweet to the airport nearest to it. I make an assumption that each tweet was made closest to the corresponding airport. This works well in most cases except when airports are very close to each other, for example New york's airprots (JFK, LaGuardia and Newark Liberty) are too close to one another, and most people may choose one or other based on cost, instead of proximity.
*If graphs don't appear, scroll up or down.
Main findings
  • More than 60% of the tweets were negative.
  • United had the most number of tweets, followed by US airways and American airlines
  • United, US airways and American airlines have higher proportions of negative comments. Whereas, Soutwest, Delta and Virgin America had lower proportion of negative comments.
  • Two main reasons for negative comments were customer service issues and late flights.
  • US Airways had the highest proportion of negative tweets due to customer servce issues.
  • The main reason for negative comments was customer service issue.
I next plot tweets for each airline across USA for you to read and explore further.

Filter Tweets by:

Thanks for visiting. For more information, http://vxy10.github.io/vivek-resume/index.html
*If graphs don't appear, scroll up or down.

Aknowlegements