Topic Modeling and Sentiment Analysis of Electric Vehicles of Twitter Data

H. P. Suresha *

REVA Academy for Corporate Excellence, REVA University Bengaluru, India.

Krishna Kumar Tiwari

ML AI Community, Bengaluru, India.

*Author to whom correspondence should be addressed.


Twitter is a well-known social media tool for people to communicate their thoughts and feelings about products or services. In this project, I collect electric vehicles related user tweets from Twitter using Twitter API and analyze public perceptions and feelings regarding electric vehicles. After collecting the data, To begin with, as the first step, I built a pre-processed data model based on natural language processing (NLP) methods to select tweets. In the second step, I use topic modeling, word cloud, and EDA to examine several aspects of electric vehicles. By using Latent Dirichlet allocation, do Topic modeling to infer the various topics of electric vehicles. The topic modeling in this study was compared with LSA and LDA, and I found that LDA provides a better insight into topics, as well as better accuracy than LSA.In the third step, the “Valence Aware Dictionary (VADER)” and “sEntiment Reasoner (SONAR)” are used to analyze sentiment of electric vehicles, and its related tweets are either positive, negative, or neutral. In this project, I collected 45000 tweets from Twitter API, related hashtags, user location, and different topics of electric vehicles. Tesla is the top hashtag Twitter users tweeted while sharing tweets related to electric vehicles. Ekero Sweden is the most common location of users related to electric vehicles tweets. Tesla is the most common word in the tweets related to electric vehicles. Elon-musk is the common bi-gram found in the tweets related to electric vehicles. 47.1% of tweets are positive, 42.4% are neutral, and 10.5% are negative as per VADER Finally, I deploy this project work as a fully functional web app.

Keywords: Twitter, tweets, topic modeling, sentiment analysis, VADER, SONAR, pyLDA, Latent Dirichlet Allocation (LDA), Latent Semantic Analysis (LSA), machine learning, natural language processing, streamlit, heroku, deployment, polarity, word cloud

How to Cite

Suresha, H. P., & Kumar Tiwari, K. (2021). Topic Modeling and Sentiment Analysis of Electric Vehicles of Twitter Data. Asian Journal of Research in Computer Science, 12(2), 13–29.


Download data is not yet available.