SlideShare a Scribd company logo
1 of 7
Download to read offline
1
Sentiment Analysis on Airlines
Group 5
Mounika Bandam
Piyush Srivastava
Sivannarayana Ravipati
ABSTRACT
Sentiment analysis or opinion mining
refers to the use of natural language
processing (NLP), text analysis and
computational linguistics to identify
and extract subjective information
from the source materials. Business
enterprises can leverage opinion
polarity and sentiment topic
recognition to gain deeper
understanding of the drivers and the
overall scope. We are doing the
sentiment analysis on aviation sector
which can help aviation companies
detect sentiment polarity and
sentiment topics by making use of data
(text) and examining the reputation of
airlines by computing their Airline
Quality Rating (AQR). we have
considered the leading US airliners
Delta, JetBlue and United Airlines to
perform the sentiment analysis by
collecting the data (messages) from the
Twitter. These messages are classified
as positive or neutral or negative with
respect to a query term.
1. INTRODUCTION
Twitter is a popular microblogging
service where users create status
messages (called “tweets”). These
tweets sometimes express opinions
about different topics. This is very
useful because it allows feedback to be
aggregated without manual
intervention. Consumers can use
sentiment analysis to research products
or services before booking a flight.
Marketers can use this to research
public opinion of their company and
products, or to analyze customer
satisfaction. Organizations can also
use this to gather critical feedback
about problems in newly released
products. There has been a large
amount of research in sentiment
classification.
With the large range of topics
discussed on Twitter, it would be very
difficult to manually collect enough
data to do the sentiment analysis for
tweets. Hence, we have used publicly
available twitter datasets.
2
2. EXTRACTING TWEETS
To extract the tweets, we need to
establish a connection with the twitter
and we can do that with TwitterR.
TwitterR offers an easy way to extract
tweets containing a given hashtag,
word or term from a user’s account or
public tweets. However, before
loading TwitterR library and using its
functions, we need to create an app on
dev.twitter.com and then we should
run the following code (We have
written the code R language) to set
authorization to extract tweets.
We need to load the required libraries
for processing the tweets and plot the
graphs as below.
Now we are ready with the libraries
and accessing the tweets. So, the next
step is to import files containing a
dictionary of positive and negative
words. Likewise, text files containing
positive and negative sentiments can
be imported using the below code.
Now we need to extract specific tweets
relating to Delta, JetBlue and United
airlines by querying the twitter for
tweets with the hashtag using the
below code.
3. PROCESSING TWEETS
To process the tweets, we should go
through the following steps.
Step 1: Converting the tweets to a text
format.
Step 2: Calculating the number of
tweets for each airline.
Step 3: Combining the text of all these
airlines.
3
4. SENTIMENT ANALYSIS
APPLICATION
The code below showcases how
sentiment analysis is written and
executed. However, before we proceed
with sentiment analysis, a function
needs to be defined that will calculate
the sentiment score.
Now, we can start processing the
tweets to calculate the sentiment score.
Step 1: Create the variable in scores
data frame.
Step 2: Calculate the positive,
negative and neutral sentiments. There
are many ways to define the sentiment
levels and we have chosen to follow
the below method.
Step 3: Split the data frame into
individual datasets for each airline.
Step 4: Create polarity variable for
each data frame.
4
5. GENERATING GRAPHS
After the above steps are executed, we
can go ahead and create insightful
graphs. The steps below outline the
process to create graphs.
5.1Delta Airlines
5.1.1 Polarity Plot (Customer
Sentiments)
The graph can be drawn by using the
below code.
The bar graph below depicts polarity,
if we closely analyze the graph; it
reveals that out of 5,000 twitter users,
1,100 twitter users have commented in
a negative way, 2,380 users are neutral.
However, 1,520 users are positive
about the airline.
5.1.2 Customer Sentiment
Scores
The graph can be drawn by using the
below code.
5.2JetBlue Airlines
5.2.1 Polarity Plot (Customer
Sentiments)
The graph can be drawn by using the
below code.
The bar graph below represents
polarity. In this case, out of the 5,000
twitter users, 550 users have
commented negatively, 2,700 users
remain neutral, whereas 1,750 users
are positive about the airline.
5
5.2.2 Customer Sentiment
Scores
The graph can be drawn by using the
below code.
5.3 United Airlines
5.3.1 Polarity Plot (Customer
Sentiments)
The graph can be drawn by using the
below code.
The bar graph below represents
polarity. In this case, out of the 5,000
twitter users, 1,350 users have
commented negatively, whereas 2,200
users are neutral and remaining 1,450
users remain positive about the airline.
5.3.2 Customer Sentiment
Scores
The graph can be drawn by using the
below code.
6
6. AIRLINES
COMPARISION
We have seen how each airline is doing
in the above chapter. Now, let’s see the
airline progress when compared to
each other. To get this we need to
calculate the percentage scores of each
airline and this can be done using the
below code.
Step 1: Summarizing the overall
positive, negative and neutral scores.
Step 2: Calculating the total score of
each airline by adding positive,
negative and neutral scores.
Step 3: Calculating the percentage
scores.
6.1Positive Comparative
Analysis
Here is the code to create a positive
comparison pie chart for these three
airlines.
Pie Chart
6.2Negative Comparative
Analysis
Here is the code to create a negative
comparison pie chart for these three
airlines.
7
Pie Chart
6.3Neutral Comparative
Analysis
Here is the code to create a neutral
comparison pie chart for these three
airlines.
Pie Chart
7. CONCLUSION
We can say that the customers like
JetBlue more than the other two with
the above analysis. As can be seen,
sentiment analysis enables enterprises
to understand consumer sentiments in
relation to specific products/services.
Moreover, these insights could be used
to improve their products and services
by gauging consumers’ comments and
feedback using sentiment analysis. In
the long run, sentiment analysis, if
implemented the right way can aid
business enterprises in improving the
overall consumer experience, enhance
brand image and propel business
growth.
8. REFERENCES
• Free online courses and
documents -
http://www.rdatamining.com/re
sources/
• Sentiment Analysis and
Opinion Mining by Bing Liu
(May 2012)
• Step - By – Step Twitter
Sentiment Analysis -
http://ipullrank.com/step-step-
twitter-sentiment-analysis-
visualizing-united-airlines-pr-
crisis/
• Text Mining with R -
https://www.tidytextmining.co
m/sentiment.html

More Related Content

What's hot

Uml Presentation
Uml PresentationUml Presentation
Uml Presentationmewaseem
 
Object relationship model of software engineering,a subtopic of object orient...
Object relationship model of software engineering,a subtopic of object orient...Object relationship model of software engineering,a subtopic of object orient...
Object relationship model of software engineering,a subtopic of object orient...julia121214
 
Software quality
Software qualitySoftware quality
Software qualityjagadeesan
 
Sentiment analysis
Sentiment analysisSentiment analysis
Sentiment analysisAmenda Joy
 
Sentiment Analysis of Twitter Data
Sentiment Analysis of Twitter DataSentiment Analysis of Twitter Data
Sentiment Analysis of Twitter DataSumit Raj
 
Presentation on Sentiment Analysis
Presentation on Sentiment AnalysisPresentation on Sentiment Analysis
Presentation on Sentiment AnalysisRebecca Williams
 
Sentiment Analysis using Twitter Data
Sentiment Analysis using Twitter DataSentiment Analysis using Twitter Data
Sentiment Analysis using Twitter DataHari Prasad
 
2- THE CHANGING NATURE OF SOFTWARE.pdf
2- THE CHANGING NATURE OF SOFTWARE.pdf2- THE CHANGING NATURE OF SOFTWARE.pdf
2- THE CHANGING NATURE OF SOFTWARE.pdfbcanawakadalcollege
 
Twitter sentiment analysis project report
Twitter sentiment analysis project reportTwitter sentiment analysis project report
Twitter sentiment analysis project reportBharat Khanna
 
Twitter sentiment-analysis Jiit2013-14
Twitter sentiment-analysis Jiit2013-14Twitter sentiment-analysis Jiit2013-14
Twitter sentiment-analysis Jiit2013-14Rachit Goel
 
Predict price of car from Vehicles Dataset
Predict price of car from Vehicles DatasetPredict price of car from Vehicles Dataset
Predict price of car from Vehicles DatasetSumit Saini
 
Uml Diagrams for Web Developers
Uml Diagrams for Web DevelopersUml Diagrams for Web Developers
Uml Diagrams for Web DevelopersDave Kelleher
 
Agile Methods - course notes
Agile Methods - course notesAgile Methods - course notes
Agile Methods - course notesEvan Leybourn
 
verification and validation
verification and validationverification and validation
verification and validationDinesh Pasi
 
Software Quality Assurance
Software Quality AssuranceSoftware Quality Assurance
Software Quality AssuranceSachithra Gayan
 

What's hot (20)

Uml Presentation
Uml PresentationUml Presentation
Uml Presentation
 
Object relationship model of software engineering,a subtopic of object orient...
Object relationship model of software engineering,a subtopic of object orient...Object relationship model of software engineering,a subtopic of object orient...
Object relationship model of software engineering,a subtopic of object orient...
 
Trusted intermediaries
Trusted intermediariesTrusted intermediaries
Trusted intermediaries
 
Software quality
Software qualitySoftware quality
Software quality
 
Sentiment analysis
Sentiment analysisSentiment analysis
Sentiment analysis
 
Software quality assurance
Software quality assuranceSoftware quality assurance
Software quality assurance
 
Sentiment Analysis of Twitter Data
Sentiment Analysis of Twitter DataSentiment Analysis of Twitter Data
Sentiment Analysis of Twitter Data
 
Presentation on Sentiment Analysis
Presentation on Sentiment AnalysisPresentation on Sentiment Analysis
Presentation on Sentiment Analysis
 
Ch5 system modeling
Ch5 system modelingCh5 system modeling
Ch5 system modeling
 
Sentiment Analysis using Twitter Data
Sentiment Analysis using Twitter DataSentiment Analysis using Twitter Data
Sentiment Analysis using Twitter Data
 
2- THE CHANGING NATURE OF SOFTWARE.pdf
2- THE CHANGING NATURE OF SOFTWARE.pdf2- THE CHANGING NATURE OF SOFTWARE.pdf
2- THE CHANGING NATURE OF SOFTWARE.pdf
 
Spm unit 3
Spm unit 3Spm unit 3
Spm unit 3
 
Twitter sentiment analysis project report
Twitter sentiment analysis project reportTwitter sentiment analysis project report
Twitter sentiment analysis project report
 
Twitter sentiment-analysis Jiit2013-14
Twitter sentiment-analysis Jiit2013-14Twitter sentiment-analysis Jiit2013-14
Twitter sentiment-analysis Jiit2013-14
 
Predict price of car from Vehicles Dataset
Predict price of car from Vehicles DatasetPredict price of car from Vehicles Dataset
Predict price of car from Vehicles Dataset
 
Uml Diagrams for Web Developers
Uml Diagrams for Web DevelopersUml Diagrams for Web Developers
Uml Diagrams for Web Developers
 
Agile Methods - course notes
Agile Methods - course notesAgile Methods - course notes
Agile Methods - course notes
 
Stream oriented communication
Stream oriented communicationStream oriented communication
Stream oriented communication
 
verification and validation
verification and validationverification and validation
verification and validation
 
Software Quality Assurance
Software Quality AssuranceSoftware Quality Assurance
Software Quality Assurance
 

Similar to Sentiment analysis on airlines

IRJET - Twitter Sentimental Analysis
IRJET -  	  Twitter Sentimental AnalysisIRJET -  	  Twitter Sentimental Analysis
IRJET - Twitter Sentimental AnalysisIRJET Journal
 
Sentiment Analysis on Twitter data using Machine Learning
Sentiment Analysis on Twitter data using Machine LearningSentiment Analysis on Twitter data using Machine Learning
Sentiment Analysis on Twitter data using Machine LearningIRJET Journal
 
IRJET- Fake Review Detection using Opinion Mining
IRJET- Fake Review Detection using Opinion MiningIRJET- Fake Review Detection using Opinion Mining
IRJET- Fake Review Detection using Opinion MiningIRJET Journal
 
Twitter sentiment analysis.pptx
Twitter sentiment analysis.pptxTwitter sentiment analysis.pptx
Twitter sentiment analysis.pptxRishita Gupta
 
Review on Sentiment Analysis on Customer Reviews
Review on Sentiment Analysis on Customer ReviewsReview on Sentiment Analysis on Customer Reviews
Review on Sentiment Analysis on Customer ReviewsIRJET Journal
 
Estimating the Efficacy of Efficient Machine Learning Classifiers for Twitter...
Estimating the Efficacy of Efficient Machine Learning Classifiers for Twitter...Estimating the Efficacy of Efficient Machine Learning Classifiers for Twitter...
Estimating the Efficacy of Efficient Machine Learning Classifiers for Twitter...IRJET Journal
 
Datastream professional getting started guide
Datastream professional   getting started guideDatastream professional   getting started guide
Datastream professional getting started guideIta Kamis
 
RETRIEVING FUNDAMENTAL VALUES OF EQUITY
RETRIEVING FUNDAMENTAL VALUES OF EQUITYRETRIEVING FUNDAMENTAL VALUES OF EQUITY
RETRIEVING FUNDAMENTAL VALUES OF EQUITYIRJET Journal
 
Reviewlattice: review-aggegration-engine-case-study
Reviewlattice: review-aggegration-engine-case-studyReviewlattice: review-aggegration-engine-case-study
Reviewlattice: review-aggegration-engine-case-studyCodelattice
 
IRJET- Sentimental Analysis of Twitter for Stock Market Investment
IRJET- Sentimental Analysis of Twitter for Stock Market InvestmentIRJET- Sentimental Analysis of Twitter for Stock Market Investment
IRJET- Sentimental Analysis of Twitter for Stock Market InvestmentIRJET Journal
 
IRJET - Online Product Scoring based on Sentiment based Review Analysis
IRJET - Online Product Scoring based on Sentiment based Review AnalysisIRJET - Online Product Scoring based on Sentiment based Review Analysis
IRJET - Online Product Scoring based on Sentiment based Review AnalysisIRJET Journal
 
IRJET - Stock Price Prediction using Microblogging Data
IRJET - Stock Price Prediction using Microblogging DataIRJET - Stock Price Prediction using Microblogging Data
IRJET - Stock Price Prediction using Microblogging DataIRJET Journal
 
IRJET- Sentimental Prediction of Users Perspective through Live Streaming : T...
IRJET- Sentimental Prediction of Users Perspective through Live Streaming : T...IRJET- Sentimental Prediction of Users Perspective through Live Streaming : T...
IRJET- Sentimental Prediction of Users Perspective through Live Streaming : T...IRJET Journal
 
IRJET- Movie Success Prediction using Data Mining and Social Media
IRJET- Movie Success Prediction using Data Mining and Social MediaIRJET- Movie Success Prediction using Data Mining and Social Media
IRJET- Movie Success Prediction using Data Mining and Social MediaIRJET Journal
 
IRJET- Sentiment Analysis of Customer Reviews on Laptop Products for Flip...
IRJET-  	  Sentiment Analysis of Customer Reviews on Laptop Products for Flip...IRJET-  	  Sentiment Analysis of Customer Reviews on Laptop Products for Flip...
IRJET- Sentiment Analysis of Customer Reviews on Laptop Products for Flip...IRJET Journal
 
Twitter Sentiment Analysis
Twitter Sentiment AnalysisTwitter Sentiment Analysis
Twitter Sentiment AnalysisIRJET Journal
 

Similar to Sentiment analysis on airlines (20)

IRJET - Twitter Sentimental Analysis
IRJET -  	  Twitter Sentimental AnalysisIRJET -  	  Twitter Sentimental Analysis
IRJET - Twitter Sentimental Analysis
 
Sentiment Analysis on Twitter data using Machine Learning
Sentiment Analysis on Twitter data using Machine LearningSentiment Analysis on Twitter data using Machine Learning
Sentiment Analysis on Twitter data using Machine Learning
 
IRJET- Fake Review Detection using Opinion Mining
IRJET- Fake Review Detection using Opinion MiningIRJET- Fake Review Detection using Opinion Mining
IRJET- Fake Review Detection using Opinion Mining
 
Twitter sentiment analysis.pptx
Twitter sentiment analysis.pptxTwitter sentiment analysis.pptx
Twitter sentiment analysis.pptx
 
Review on Sentiment Analysis on Customer Reviews
Review on Sentiment Analysis on Customer ReviewsReview on Sentiment Analysis on Customer Reviews
Review on Sentiment Analysis on Customer Reviews
 
Estimating the Efficacy of Efficient Machine Learning Classifiers for Twitter...
Estimating the Efficacy of Efficient Machine Learning Classifiers for Twitter...Estimating the Efficacy of Efficient Machine Learning Classifiers for Twitter...
Estimating the Efficacy of Efficient Machine Learning Classifiers for Twitter...
 
Final Report
Final ReportFinal Report
Final Report
 
Datastream professional getting started guide
Datastream professional   getting started guideDatastream professional   getting started guide
Datastream professional getting started guide
 
RETRIEVING FUNDAMENTAL VALUES OF EQUITY
RETRIEVING FUNDAMENTAL VALUES OF EQUITYRETRIEVING FUNDAMENTAL VALUES OF EQUITY
RETRIEVING FUNDAMENTAL VALUES OF EQUITY
 
Reviewlattice: review-aggegration-engine-case-study
Reviewlattice: review-aggegration-engine-case-studyReviewlattice: review-aggegration-engine-case-study
Reviewlattice: review-aggegration-engine-case-study
 
Distimo monitor
Distimo monitorDistimo monitor
Distimo monitor
 
IRJET- Sentimental Analysis of Twitter for Stock Market Investment
IRJET- Sentimental Analysis of Twitter for Stock Market InvestmentIRJET- Sentimental Analysis of Twitter for Stock Market Investment
IRJET- Sentimental Analysis of Twitter for Stock Market Investment
 
IRJET - Online Product Scoring based on Sentiment based Review Analysis
IRJET - Online Product Scoring based on Sentiment based Review AnalysisIRJET - Online Product Scoring based on Sentiment based Review Analysis
IRJET - Online Product Scoring based on Sentiment based Review Analysis
 
IRJET - Stock Price Prediction using Microblogging Data
IRJET - Stock Price Prediction using Microblogging DataIRJET - Stock Price Prediction using Microblogging Data
IRJET - Stock Price Prediction using Microblogging Data
 
Salesforce crm projects
Salesforce crm projects Salesforce crm projects
Salesforce crm projects
 
IRJET- Sentimental Prediction of Users Perspective through Live Streaming : T...
IRJET- Sentimental Prediction of Users Perspective through Live Streaming : T...IRJET- Sentimental Prediction of Users Perspective through Live Streaming : T...
IRJET- Sentimental Prediction of Users Perspective through Live Streaming : T...
 
ClearPass Insight 6.3 User Guide
ClearPass Insight 6.3 User GuideClearPass Insight 6.3 User Guide
ClearPass Insight 6.3 User Guide
 
IRJET- Movie Success Prediction using Data Mining and Social Media
IRJET- Movie Success Prediction using Data Mining and Social MediaIRJET- Movie Success Prediction using Data Mining and Social Media
IRJET- Movie Success Prediction using Data Mining and Social Media
 
IRJET- Sentiment Analysis of Customer Reviews on Laptop Products for Flip...
IRJET-  	  Sentiment Analysis of Customer Reviews on Laptop Products for Flip...IRJET-  	  Sentiment Analysis of Customer Reviews on Laptop Products for Flip...
IRJET- Sentiment Analysis of Customer Reviews on Laptop Products for Flip...
 
Twitter Sentiment Analysis
Twitter Sentiment AnalysisTwitter Sentiment Analysis
Twitter Sentiment Analysis
 

Recently uploaded

Principles and Practices of Data Visualization
Principles and Practices of Data VisualizationPrinciples and Practices of Data Visualization
Principles and Practices of Data VisualizationKianJazayeri1
 
Real-Time AI Streaming - AI Max Princeton
Real-Time AI  Streaming - AI Max PrincetonReal-Time AI  Streaming - AI Max Princeton
Real-Time AI Streaming - AI Max PrincetonTimothy Spann
 
Thiophen Mechanism khhjjjjjjjhhhhhhhhhhh
Thiophen Mechanism khhjjjjjjjhhhhhhhhhhhThiophen Mechanism khhjjjjjjjhhhhhhhhhhh
Thiophen Mechanism khhjjjjjjjhhhhhhhhhhhYasamin16
 
Digital Marketing Plan, how digital marketing works
Digital Marketing Plan, how digital marketing worksDigital Marketing Plan, how digital marketing works
Digital Marketing Plan, how digital marketing worksdeepakthakur548787
 
Easter Eggs From Star Wars and in cars 1 and 2
Easter Eggs From Star Wars and in cars 1 and 2Easter Eggs From Star Wars and in cars 1 and 2
Easter Eggs From Star Wars and in cars 1 and 217djon017
 
INTRODUCTION TO Natural language processing
INTRODUCTION TO Natural language processingINTRODUCTION TO Natural language processing
INTRODUCTION TO Natural language processingsocarem879
 
The Power of Data-Driven Storytelling_ Unveiling the Layers of Insight.pptx
The Power of Data-Driven Storytelling_ Unveiling the Layers of Insight.pptxThe Power of Data-Driven Storytelling_ Unveiling the Layers of Insight.pptx
The Power of Data-Driven Storytelling_ Unveiling the Layers of Insight.pptxTasha Penwell
 
Data Analysis Project : Targeting the Right Customers, Presentation on Bank M...
Data Analysis Project : Targeting the Right Customers, Presentation on Bank M...Data Analysis Project : Targeting the Right Customers, Presentation on Bank M...
Data Analysis Project : Targeting the Right Customers, Presentation on Bank M...Boston Institute of Analytics
 
Data Factory in Microsoft Fabric (MsBIP #82)
Data Factory in Microsoft Fabric (MsBIP #82)Data Factory in Microsoft Fabric (MsBIP #82)
Data Factory in Microsoft Fabric (MsBIP #82)Cathrine Wilhelmsen
 
Student Profile Sample report on improving academic performance by uniting gr...
Student Profile Sample report on improving academic performance by uniting gr...Student Profile Sample report on improving academic performance by uniting gr...
Student Profile Sample report on improving academic performance by uniting gr...Seán Kennedy
 
Identifying Appropriate Test Statistics Involving Population Mean
Identifying Appropriate Test Statistics Involving Population MeanIdentifying Appropriate Test Statistics Involving Population Mean
Identifying Appropriate Test Statistics Involving Population MeanMYRABACSAFRA2
 
Minimizing AI Hallucinations/Confabulations and the Path towards AGI with Exa...
Minimizing AI Hallucinations/Confabulations and the Path towards AGI with Exa...Minimizing AI Hallucinations/Confabulations and the Path towards AGI with Exa...
Minimizing AI Hallucinations/Confabulations and the Path towards AGI with Exa...Thomas Poetter
 
RABBIT: A CLI tool for identifying bots based on their GitHub events.
RABBIT: A CLI tool for identifying bots based on their GitHub events.RABBIT: A CLI tool for identifying bots based on their GitHub events.
RABBIT: A CLI tool for identifying bots based on their GitHub events.natarajan8993
 
Learn How Data Science Changes Our World
Learn How Data Science Changes Our WorldLearn How Data Science Changes Our World
Learn How Data Science Changes Our WorldEduminds Learning
 
Defining Constituents, Data Vizzes and Telling a Data Story
Defining Constituents, Data Vizzes and Telling a Data StoryDefining Constituents, Data Vizzes and Telling a Data Story
Defining Constituents, Data Vizzes and Telling a Data StoryJeremy Anderson
 
Top 5 Best Data Analytics Courses In Queens
Top 5 Best Data Analytics Courses In QueensTop 5 Best Data Analytics Courses In Queens
Top 5 Best Data Analytics Courses In Queensdataanalyticsqueen03
 
Predictive Analysis for Loan Default Presentation : Data Analysis Project PPT
Predictive Analysis for Loan Default  Presentation : Data Analysis Project PPTPredictive Analysis for Loan Default  Presentation : Data Analysis Project PPT
Predictive Analysis for Loan Default Presentation : Data Analysis Project PPTBoston Institute of Analytics
 
Generative AI for Social Good at Open Data Science East 2024
Generative AI for Social Good at Open Data Science East 2024Generative AI for Social Good at Open Data Science East 2024
Generative AI for Social Good at Open Data Science East 2024Colleen Farrelly
 
SMOTE and K-Fold Cross Validation-Presentation.pptx
SMOTE and K-Fold Cross Validation-Presentation.pptxSMOTE and K-Fold Cross Validation-Presentation.pptx
SMOTE and K-Fold Cross Validation-Presentation.pptxHaritikaChhatwal1
 
Decoding the Heart: Student Presentation on Heart Attack Prediction with Data...
Decoding the Heart: Student Presentation on Heart Attack Prediction with Data...Decoding the Heart: Student Presentation on Heart Attack Prediction with Data...
Decoding the Heart: Student Presentation on Heart Attack Prediction with Data...Boston Institute of Analytics
 

Recently uploaded (20)

Principles and Practices of Data Visualization
Principles and Practices of Data VisualizationPrinciples and Practices of Data Visualization
Principles and Practices of Data Visualization
 
Real-Time AI Streaming - AI Max Princeton
Real-Time AI  Streaming - AI Max PrincetonReal-Time AI  Streaming - AI Max Princeton
Real-Time AI Streaming - AI Max Princeton
 
Thiophen Mechanism khhjjjjjjjhhhhhhhhhhh
Thiophen Mechanism khhjjjjjjjhhhhhhhhhhhThiophen Mechanism khhjjjjjjjhhhhhhhhhhh
Thiophen Mechanism khhjjjjjjjhhhhhhhhhhh
 
Digital Marketing Plan, how digital marketing works
Digital Marketing Plan, how digital marketing worksDigital Marketing Plan, how digital marketing works
Digital Marketing Plan, how digital marketing works
 
Easter Eggs From Star Wars and in cars 1 and 2
Easter Eggs From Star Wars and in cars 1 and 2Easter Eggs From Star Wars and in cars 1 and 2
Easter Eggs From Star Wars and in cars 1 and 2
 
INTRODUCTION TO Natural language processing
INTRODUCTION TO Natural language processingINTRODUCTION TO Natural language processing
INTRODUCTION TO Natural language processing
 
The Power of Data-Driven Storytelling_ Unveiling the Layers of Insight.pptx
The Power of Data-Driven Storytelling_ Unveiling the Layers of Insight.pptxThe Power of Data-Driven Storytelling_ Unveiling the Layers of Insight.pptx
The Power of Data-Driven Storytelling_ Unveiling the Layers of Insight.pptx
 
Data Analysis Project : Targeting the Right Customers, Presentation on Bank M...
Data Analysis Project : Targeting the Right Customers, Presentation on Bank M...Data Analysis Project : Targeting the Right Customers, Presentation on Bank M...
Data Analysis Project : Targeting the Right Customers, Presentation on Bank M...
 
Data Factory in Microsoft Fabric (MsBIP #82)
Data Factory in Microsoft Fabric (MsBIP #82)Data Factory in Microsoft Fabric (MsBIP #82)
Data Factory in Microsoft Fabric (MsBIP #82)
 
Student Profile Sample report on improving academic performance by uniting gr...
Student Profile Sample report on improving academic performance by uniting gr...Student Profile Sample report on improving academic performance by uniting gr...
Student Profile Sample report on improving academic performance by uniting gr...
 
Identifying Appropriate Test Statistics Involving Population Mean
Identifying Appropriate Test Statistics Involving Population MeanIdentifying Appropriate Test Statistics Involving Population Mean
Identifying Appropriate Test Statistics Involving Population Mean
 
Minimizing AI Hallucinations/Confabulations and the Path towards AGI with Exa...
Minimizing AI Hallucinations/Confabulations and the Path towards AGI with Exa...Minimizing AI Hallucinations/Confabulations and the Path towards AGI with Exa...
Minimizing AI Hallucinations/Confabulations and the Path towards AGI with Exa...
 
RABBIT: A CLI tool for identifying bots based on their GitHub events.
RABBIT: A CLI tool for identifying bots based on their GitHub events.RABBIT: A CLI tool for identifying bots based on their GitHub events.
RABBIT: A CLI tool for identifying bots based on their GitHub events.
 
Learn How Data Science Changes Our World
Learn How Data Science Changes Our WorldLearn How Data Science Changes Our World
Learn How Data Science Changes Our World
 
Defining Constituents, Data Vizzes and Telling a Data Story
Defining Constituents, Data Vizzes and Telling a Data StoryDefining Constituents, Data Vizzes and Telling a Data Story
Defining Constituents, Data Vizzes and Telling a Data Story
 
Top 5 Best Data Analytics Courses In Queens
Top 5 Best Data Analytics Courses In QueensTop 5 Best Data Analytics Courses In Queens
Top 5 Best Data Analytics Courses In Queens
 
Predictive Analysis for Loan Default Presentation : Data Analysis Project PPT
Predictive Analysis for Loan Default  Presentation : Data Analysis Project PPTPredictive Analysis for Loan Default  Presentation : Data Analysis Project PPT
Predictive Analysis for Loan Default Presentation : Data Analysis Project PPT
 
Generative AI for Social Good at Open Data Science East 2024
Generative AI for Social Good at Open Data Science East 2024Generative AI for Social Good at Open Data Science East 2024
Generative AI for Social Good at Open Data Science East 2024
 
SMOTE and K-Fold Cross Validation-Presentation.pptx
SMOTE and K-Fold Cross Validation-Presentation.pptxSMOTE and K-Fold Cross Validation-Presentation.pptx
SMOTE and K-Fold Cross Validation-Presentation.pptx
 
Decoding the Heart: Student Presentation on Heart Attack Prediction with Data...
Decoding the Heart: Student Presentation on Heart Attack Prediction with Data...Decoding the Heart: Student Presentation on Heart Attack Prediction with Data...
Decoding the Heart: Student Presentation on Heart Attack Prediction with Data...
 

Sentiment analysis on airlines

  • 1. 1 Sentiment Analysis on Airlines Group 5 Mounika Bandam Piyush Srivastava Sivannarayana Ravipati ABSTRACT Sentiment analysis or opinion mining refers to the use of natural language processing (NLP), text analysis and computational linguistics to identify and extract subjective information from the source materials. Business enterprises can leverage opinion polarity and sentiment topic recognition to gain deeper understanding of the drivers and the overall scope. We are doing the sentiment analysis on aviation sector which can help aviation companies detect sentiment polarity and sentiment topics by making use of data (text) and examining the reputation of airlines by computing their Airline Quality Rating (AQR). we have considered the leading US airliners Delta, JetBlue and United Airlines to perform the sentiment analysis by collecting the data (messages) from the Twitter. These messages are classified as positive or neutral or negative with respect to a query term. 1. INTRODUCTION Twitter is a popular microblogging service where users create status messages (called “tweets”). These tweets sometimes express opinions about different topics. This is very useful because it allows feedback to be aggregated without manual intervention. Consumers can use sentiment analysis to research products or services before booking a flight. Marketers can use this to research public opinion of their company and products, or to analyze customer satisfaction. Organizations can also use this to gather critical feedback about problems in newly released products. There has been a large amount of research in sentiment classification. With the large range of topics discussed on Twitter, it would be very difficult to manually collect enough data to do the sentiment analysis for tweets. Hence, we have used publicly available twitter datasets.
  • 2. 2 2. EXTRACTING TWEETS To extract the tweets, we need to establish a connection with the twitter and we can do that with TwitterR. TwitterR offers an easy way to extract tweets containing a given hashtag, word or term from a user’s account or public tweets. However, before loading TwitterR library and using its functions, we need to create an app on dev.twitter.com and then we should run the following code (We have written the code R language) to set authorization to extract tweets. We need to load the required libraries for processing the tweets and plot the graphs as below. Now we are ready with the libraries and accessing the tweets. So, the next step is to import files containing a dictionary of positive and negative words. Likewise, text files containing positive and negative sentiments can be imported using the below code. Now we need to extract specific tweets relating to Delta, JetBlue and United airlines by querying the twitter for tweets with the hashtag using the below code. 3. PROCESSING TWEETS To process the tweets, we should go through the following steps. Step 1: Converting the tweets to a text format. Step 2: Calculating the number of tweets for each airline. Step 3: Combining the text of all these airlines.
  • 3. 3 4. SENTIMENT ANALYSIS APPLICATION The code below showcases how sentiment analysis is written and executed. However, before we proceed with sentiment analysis, a function needs to be defined that will calculate the sentiment score. Now, we can start processing the tweets to calculate the sentiment score. Step 1: Create the variable in scores data frame. Step 2: Calculate the positive, negative and neutral sentiments. There are many ways to define the sentiment levels and we have chosen to follow the below method. Step 3: Split the data frame into individual datasets for each airline. Step 4: Create polarity variable for each data frame.
  • 4. 4 5. GENERATING GRAPHS After the above steps are executed, we can go ahead and create insightful graphs. The steps below outline the process to create graphs. 5.1Delta Airlines 5.1.1 Polarity Plot (Customer Sentiments) The graph can be drawn by using the below code. The bar graph below depicts polarity, if we closely analyze the graph; it reveals that out of 5,000 twitter users, 1,100 twitter users have commented in a negative way, 2,380 users are neutral. However, 1,520 users are positive about the airline. 5.1.2 Customer Sentiment Scores The graph can be drawn by using the below code. 5.2JetBlue Airlines 5.2.1 Polarity Plot (Customer Sentiments) The graph can be drawn by using the below code. The bar graph below represents polarity. In this case, out of the 5,000 twitter users, 550 users have commented negatively, 2,700 users remain neutral, whereas 1,750 users are positive about the airline.
  • 5. 5 5.2.2 Customer Sentiment Scores The graph can be drawn by using the below code. 5.3 United Airlines 5.3.1 Polarity Plot (Customer Sentiments) The graph can be drawn by using the below code. The bar graph below represents polarity. In this case, out of the 5,000 twitter users, 1,350 users have commented negatively, whereas 2,200 users are neutral and remaining 1,450 users remain positive about the airline. 5.3.2 Customer Sentiment Scores The graph can be drawn by using the below code.
  • 6. 6 6. AIRLINES COMPARISION We have seen how each airline is doing in the above chapter. Now, let’s see the airline progress when compared to each other. To get this we need to calculate the percentage scores of each airline and this can be done using the below code. Step 1: Summarizing the overall positive, negative and neutral scores. Step 2: Calculating the total score of each airline by adding positive, negative and neutral scores. Step 3: Calculating the percentage scores. 6.1Positive Comparative Analysis Here is the code to create a positive comparison pie chart for these three airlines. Pie Chart 6.2Negative Comparative Analysis Here is the code to create a negative comparison pie chart for these three airlines.
  • 7. 7 Pie Chart 6.3Neutral Comparative Analysis Here is the code to create a neutral comparison pie chart for these three airlines. Pie Chart 7. CONCLUSION We can say that the customers like JetBlue more than the other two with the above analysis. As can be seen, sentiment analysis enables enterprises to understand consumer sentiments in relation to specific products/services. Moreover, these insights could be used to improve their products and services by gauging consumers’ comments and feedback using sentiment analysis. In the long run, sentiment analysis, if implemented the right way can aid business enterprises in improving the overall consumer experience, enhance brand image and propel business growth. 8. REFERENCES • Free online courses and documents - http://www.rdatamining.com/re sources/ • Sentiment Analysis and Opinion Mining by Bing Liu (May 2012) • Step - By – Step Twitter Sentiment Analysis - http://ipullrank.com/step-step- twitter-sentiment-analysis- visualizing-united-airlines-pr- crisis/ • Text Mining with R - https://www.tidytextmining.co m/sentiment.html