Course Content
Projeccts
RFM Analysis https://statso.io/rfm-analysis-case-study/ Stock Market Performance Analysis https://statso.io/stock-market-performance-case-study/ B2B Courier Charges Accuracy Analysis https://statso.io/b2b-ecommerce-fraud-case-study/ User Engagement Analysis https://statso.io/bounce-rate-case-study/ Customer Lifetime Value Analysis https://statso.io/customer-lifetime-value-analytics-case-study/ Supply Chain Analysis https://statso.io/supply-chain-analysis-case-study/ Demand & Supply Analysis https://statso.io/demand-and-supply-case-study/ Recession Analysis https://statso.io/recession-case-study/ Store Sales & Profit Analysis https://www.kaggle.com/datasets/vivek468/superstore-dataset-final Exploratory Data Analysis https://statso.io/instagram-reach-analysis-case-study/ Accelerometer Data Analysis https://statso.io/accelerometer-data/ User Funnel Analysis https://statso.io/user-funnels-case-study/ Algorithmic Trading https://thecleverprogrammer.com/2021/12/21/get-stock-price-data-using-python/ A/b Testing https://statso.io/a-b-testing-case-study/ T20 World Cup 2022 Analysis https://statso.io/t20-world-cup-2022-dataset/ Twitter Timeline in the Stock Market Analysis https://statso.io/twitter-stock-market-analysis-case-study/ Instagram Reach Analysis https://statso.io/instagram-reach-analysis-case-study/ Screen Time Analysis https://statso.io/screen-time-analysis-case-study/ Stock Market Analysis https://thecleverprogrammer.com/2021/12/21/get-stock-price-data-using-python/ Smartwatch Data Analysis https://thecleverprogrammer.com/2022/05/31/smartwatch-data-analysis-using-python/ Virat Kohli Performance Analysis https://thecleverprogrammer.com/2022/05/10/virat-kohli-performance-analysis-using-python/ Google Search Analysis https://thecleverprogrammer.com/2021/04/27/google-search-analysis-with-python/ Survey Analysis https://www.kaggle.com/datasets/kulturehire/understanding-career-aspirations-of-genz Social Progress Index Analysis https://thecleverprogrammer.com/2022/12/26/social-progress-index-analysis-using-python/ Career Aspirations Survey Analysis https://www.kaggle.com/datasets/kulturehire/understanding-career-aspirations-of-genz iPhone Sales Analysis https://www.kaggle.com/datasets/komalkhetlani/apple-iphone-data Diamond Price Analysis https://www.kaggle.com/datasets/shivam2503/diamonds Covid-19 Impacts Analysis https://www.kaggle.com/datasets/shashwatwork/impact-of-covid19-pandemic-on-the-global-economy IPL 2022 Analysis https://thecleverprogrammer.com/2022/05/03/ipl-2022-analysis-using-python/ Ukraine Vs Russia: Twitter Sentiment Analysis https://www.kaggle.com/datasets/towhidultonmoy/russia-vs-ukraine-tweets-datasetdaily-updated Waiter Tips Analysis and Prediction https://thecleverprogrammer.com/2022/02/01/waiter-tips-prediction-with-machine-learning/ Flipkart Reviews Sentiment Analysis https://thecleverprogrammer.com/2022/02/15/flipkart-reviews-sentiment-analysis-using-python/ Time Series Analysis https://thecleverprogrammer.com/2022/01/17/time-series-analysis-using-python/ TikTok Reviews Sentiment Analysis https://thecleverprogrammer.com/2022/04/12/tiktok-reviews-sentiment-analysis-using-python/ Tinder Reviews Sentiment Analysis https://thecleverprogrammer.com/2022/05/24/tinder-reviews-sentiment-analysis-using-python/ Uber Trips Analysis https://thecleverprogrammer.com/2021/04/21/uber-trips-analysis-using-python/ WhatsApp Chats Analysis https://thecleverprogrammer.com/2021/04/09/whatsapp-chat-analysis-with-python/ Water Quality Analysis https://thecleverprogrammer.com/2021/08/19/water-quality-analysis/ Squid Game Sentiment Analysis https://thecleverprogrammer.com/2021/11/03/squid-game-sentiment-analysis-using-python/ Twitter Sentiment Analysis https://thecleverprogrammer.com/2021/09/13/twitter-sentiment-analysis-using-python/ Movie Rating Analysis for Beginners https://thecleverprogrammer.com/2021/09/22/movie-rating-analysis-using-python/ Worldwide Billionaires Analysis https://thecleverprogrammer.com/2021/06/24/billionaires-analysis-with-python/ Unemployment Analysis https://thecleverprogrammer.com/2021/07/12/unemployment-analysis-with-python/ WhatsApp Chats Sentiment Analysis https://thecleverprogrammer.com/2021/06/06/whatsapp-chat-sentiment-analysis-using-python/ Covid-19 Vaccine Analysis https://thecleverprogrammer.com/2021/04/13/covid-19-vaccines-analysis-with-python/ Financial Budget Analysis https://thecleverprogrammer.com/2021/04/05/financial-budget-analysis-with-python/ Best Streaming Service Analysis https://thecleverprogrammer.com/2021/01/21/best-streaming-service-analysis-with-python/ Data Science Project on Birth Rate Analysis https://thecleverprogrammer.com/2020/05/08/birth-rate-analysis/ Data Science Project on Time Series https://thecleverprogrammer.com/2020/05/08/data-science-project-on-time-series/ Data Science Project on Area and Population https://thecleverprogrammer.com/2020/05/09/data-science-project-on-area-and-population/ Amazon Product Reviews Sentiment Analysis https://thecleverprogrammer.com/2021/07/20/amazon-product-reviews-sentiment-analysis-with-python/ Hotel Reviews Sentiment Analysis https://thecleverprogrammer.com/2021/07/03/hotel-reviews-sentiment-analysis-with-python/ Google Play Store Sentiment Analysis https://thecleverprogrammer.com/2021/05/31/google-play-store-sentiment-analysis-using-python/ Instagram Reach Analysis https://thecleverprogrammer.com/2022/03/22/instagram-reach-analysis-using-python/ Amazon Alexa Reviews Sentiment Analysis https://thecleverprogrammer.com/2021/06/12/amazon-alexa-reviews-sentiment-analysis-using-python/ Real-time Sentiment Analysis https://thecleverprogrammer.com/2021/03/09/real-time-sentiment-analysis-using-python/ Customer Personality Analysis https://thecleverprogrammer.com/2021/02/08/customer-personality-analysis-with-python/ Netflix Data Analysis https://thecleverprogrammer.com/2021/01/16/netflix-data-analysis-with-python/ Covid-19 Vaccine Sentiment Analysis https://thecleverprogrammer.com/2021/01/11/covid-19-vaccine-sentiment-analysis/ Cohort Analysis https://thecleverprogrammer.com/2021/01/08/cohort-analysis-with-python/
0/12
Python Project for Data Analytics
About Lesson

Sentiment Analysis is an application of natural language processing that is used to understand people’s opinions. Today, many companies use real-time sentiment analysis by asking users about their service. In this article, I’ll walk you through real-time sentiment analysis using Python.

Real-Time Sentiment Analysis

The main purpose of sentiment analysis is to analyze the opinions of users of a particular product or service, which helps customers understand the quality of the product. For example, every time Apple releases a new iPhone, we see a lot of people giving their opinion on it, some like it and some criticize it, in the end, all people’s opinions help us decide whether we should buy the new iPhone or not.

Opinions are nothing more than people’s feelings about a particular product, which helps a business improve its product and helps customers decide whether or not to buy the product. Now, what if you want to analyze people’s feelings in real-time, i.e. ask a user about your product and understand your product in real-time. In the section below, I’ll walk you through a simple way of real-time sentiment analysis using Python.

Real-Time Sentiment Analysis using Python

To analyze feelings in real-time, we need to request input from the user and then analyze user feelings given by him/her as input. So for this real-time sentiment analysis task using Python, I will be using the NLTK library in Python which is a very useful tool for all the tasks of natural language processing. So let’s import the NLTK library and start with sentiment analysis:

 
 
 

So, I will be using the SentimentIntensityAnalyzer() class provided by the NLTK library in Python. Now let’s take a user input and have a look at the sentiment score:

 
 
 
Please Rate Our Services >>: great
{'neg': 0.0, 'neu': 0.0, 'pos': 1.0, 'compound': 0.6249}

Final Step:

So the sentiments score looks like a dictionary with keys as ‘neg’, ‘neu’, ‘pos’, ‘compound’. The above output says that the sentiment of the user is 100% positive. So we can use an if-else statement by passing a condition that if the value of the key(neg) is not 0.0 then the sentiment is negative and otherwise it’s positive. So here is the complete Python code for real-time sentiment analysis:

 
 
 
Please Rate Our Services >>: not bad
Positive

Please Rate Our Services >>: not good
Negative

So now we can see positive or negative as an output instead of the sentiment scores. I hope you liked this article on Realtime Sentiment Analysis using Python. Feel free to ask your valuable questions in the comments section below.