NYC Data Science Academy| Blog
Bootcamps
Lifetime Job Support Available Financing Available
Bootcamps
Data Science with Machine Learning Flagship πŸ† Data Analytics Bootcamp Artificial Intelligence Bootcamp New Release πŸŽ‰
Free Lesson
Intro to Data Science New Release πŸŽ‰
Find Inspiration
Find Alumni with Similar Background
Job Outlook
Occupational Outlook Graduate Outcomes Must See πŸ”₯
Alumni
Success Stories Testimonials Alumni Directory Alumni Exclusive Study Program
Courses
View Bundled Courses
Financing Available
Bootcamp Prep Popular πŸ”₯ Data Science Mastery Data Science Launchpad with Python View AI Courses Generative AI for Everyone New πŸŽ‰ Generative AI for Finance New πŸŽ‰ Generative AI for Marketing New πŸŽ‰
Bundle Up
Learn More and Save More
Combination of data science courses.
View Data Science Courses
Beginner
Introductory Python
Intermediate
Data Science Python: Data Analysis and Visualization Popular πŸ”₯ Data Science R: Data Analysis and Visualization
Advanced
Data Science Python: Machine Learning Popular πŸ”₯ Data Science R: Machine Learning Designing and Implementing Production MLOps New πŸŽ‰ Natural Language Processing for Production (NLP) New πŸŽ‰
Find Inspiration
Get Course Recommendation Must Try πŸ’Ž An Ultimate Guide to Become a Data Scientist
For Companies
For Companies
Corporate Offerings Hiring Partners Candidate Portfolio Hire Our Graduates
Students Work
Students Work
All Posts Capstone Data Visualization Machine Learning Python Projects R Projects
Tutorials
About
About
About Us Accreditation Contact Us Join Us FAQ Webinars Subscription An Ultimate Guide to
Become a Data Scientist
    Login
NYC Data Science Acedemy
Bootcamps
Courses
Students Work
About
Bootcamps
Bootcamps
Data Science with Machine Learning Flagship
Data Analytics Bootcamp
Artificial Intelligence Bootcamp New Release πŸŽ‰
Free Lessons
Intro to Data Science New Release πŸŽ‰
Find Inspiration
Find Alumni with Similar Background
Job Outlook
Occupational Outlook
Graduate Outcomes Must See πŸ”₯
Alumni
Success Stories
Testimonials
Alumni Directory
Alumni Exclusive Study Program
Courses
Bundles
financing available
View All Bundles
Bootcamp Prep
Data Science Mastery
Data Science Launchpad with Python NEW!
View AI Courses
Generative AI for Everyone
Generative AI for Finance
Generative AI for Marketing
View Data Science Courses
View All Professional Development Courses
Beginner
Introductory Python
Intermediate
Python: Data Analysis and Visualization
R: Data Analysis and Visualization
Advanced
Python: Machine Learning
R: Machine Learning
Designing and Implementing Production MLOps
Natural Language Processing for Production (NLP)
For Companies
Corporate Offerings
Hiring Partners
Candidate Portfolio
Hire Our Graduates
Students Work
All Posts
Capstone
Data Visualization
Machine Learning
Python Projects
R Projects
About
Accreditation
About Us
Contact Us
Join Us
FAQ
Webinars
Subscription
An Ultimate Guide to Become a Data Scientist
Tutorials
Data Analytics
  • Learn Pandas
  • Learn NumPy
  • Learn SciPy
  • Learn Matplotlib
Machine Learning
  • Boosting
  • Random Forest
  • Linear Regression
  • Decision Tree
  • PCA
Interview by Companies
  • JPMC
  • Google
  • Facebook
Artificial Intelligence
  • Learn Generative AI
  • Learn ChatGPT-3.5
  • Learn ChatGPT-4
  • Learn Google Bard
Coding
  • Learn Python
  • Learn SQL
  • Learn MySQL
  • Learn NoSQL
  • Learn PySpark
  • Learn PyTorch
Interview Questions
  • Python Hard
  • R Easy
  • R Hard
  • SQL Easy
  • SQL Hard
  • Python Easy
Data Science Blog > Data Visualization > Sentiment Data Analysis of Amazon's Decaying Product Ratings

Sentiment Data Analysis of Amazon's Decaying Product Ratings

SWETA PRABHA
Posted on Oct 23, 2021
The skills I demoed here can be learned through taking Data Science with Machine Learning bootcamp with NYC Data Science Academy.

Github| Sweta Prabha Linkedin 

Introduction

Sentiment Analysis, also known as opinion mining is a sub of Natural Language Processing that helps businesses to understand the brand and product sentiments of a consumer. It helps enterprises to gauge customers’ opinions through analysis of reviews, blogs, social media, news, etc. to conduct market research and predict the market data trends to cater products accordingly. Sentiment-bearing phrases are identified from broken down texts collected through different sources and a sentiment score is assigned. In more sophisticated models, multiple layer scores are combined for analysis.

For this project, I have performed a sentiment analysis of amazon's beauty product that dropped its rating from 2014 to 2021. A starter data set containing product features including ratings and reviews from 2014  is used for comparison with newly scraped reviews and ratings of the same product. The project is divided into four parts. Data Scraping, Data Cleaning, Exploratory Data Analysis, and Sentiment Analysis. This is unsupervised Machine Learning as there is no target variable.

Data Scraping

The first step was data collection. The majority of time on this project was spent cleaning and scraping data. Raw text data for amazon's beauty products containing 9 features and 12101 unique asins was downloaded from the UCSD repository which is shared with the public for research purposes. Fig 1 shows the 9 features downloaded from the repository. The unique asin numbers were put on a list for future scrapping using selenium and beautiful soup. Fig 2 shows the 7 features extracted from 2021 of 4242 unique asins for the products that are still available in 2021.

Fig 1: Amazon Beauty Product dataset from UCSD repository (12101 unique asins)


Fig 2: Scraped data of amazon beauty products (4242 entries, 7 features)


Data Cleaning

The two datasets were merged on unique asin numbers. Unwanted columns were removed and 12 features were retained for analysis. The dataset was stored in pandas data frame and data cleaning was done using regular expression and nltk libraries. nltk is a text preprocessing library that is frequently used in NLP. The reviews from 2014 and 2021 were prepared for further analysis by converting all texts to lower case, formatting empty space, expanding contractions (eg mgmt. to management), filtering punctuation and stop words (like have, has), and finally lemmatization (the process of extracting root words, eg. better: lemma good). Fig 3 lists all the 12 features in the the final data frame that will be used for further analysis.

Sentiment Data Analysis of Amazon's Decaying Product Ratings

Fig 3. Features in the final dataframe

Exploratory Data Analysis

The old and scraped data was visualized for any trend in buying habits within each category. Graph 1 shows the top 10 categories in terms of count within the given dataset of amazon's beauty products. It can be seen that most products are listed within skincare, haircare and makeup categories. The product features from these 3 groups are separated for further exploratory analysis. Graph 2 shows the distribution of price within the products for each of the 3 top groups. It can be seen that hair products have the highest range of prices.

Graph 1: Top 10 categories in terms of number of listed products
Graph 2: Boxplot of price distribution within the three categories


Skincare Products Data:

Skincare products comprises the majority of amazon's beauty and health product within the dataset. For this project, number of product ratings is considered an estimation of number of sales. Fig 3.i) indicates the distribution of number of products within each price range. Fig 3.iii) is a microscopic view of graph 3.ii) showing the number of ratings (which in turn is an estimate of number of sales) for each price range in skincare products. It can be seen that maximum products are listed between 10-20$ and that's about the range which attracts highest number of customers.

 

Fig 4.i)Distribution of #products within each price range
Fig4.ii)Distribution of #ratings(sales) in each price range
Fig4.iii) Microscopic view of Fig 4. ii)


Haircare Products Data:

Haircare products are the second-highest number after skincare products from this dataset. Fig 4. i), ii) and iii) follow the same pattern for hair care products as Fig 3 for skincare products. It was seen that customers usually spend more money online on hair products than skincare or makeup products. On the contrary, there is comparatively lesser number of products listed in the range of $30-$50, and based on the given buying pattern, more products in this range can be listed.

Fig 5.i)Distribution of #products within each price range
Fig 5.ii)Distribution of #ratings(sales) in each price range
Fig 5.iii) Microscopic view of Fig 5.ii)


Makeup Products Data:

Makeup products are the third-largest number sold in beauty and health category from the dataset. There is a trend of people spending the least on makeup products. Most products are listed in the range of $0-10 and also the maximum reviews (sales) is seen in the same range.

Fig 6.i)Distribution of #products within each price range
Fig 6.ii)Distribution of #ratings(sales) in each price range
Fig 6.iii) Microscopic view of Fig 6.ii)


Top 10 products that dropped ratings from 2014-2021

The difference of rating for each product in the three groups from 2014-2021 was calculated and top 10 products with highest drop were analyzed. Fig 7. ,8 and 9 gives the top 10 products in each categry with the highest drop. The sentiment analysis for these products will be done to understand the trend and change in opinion for each of these product categories.

Sentiment Data Analysis of Amazon's Decaying Product Ratings

Fig 7. Top 10 skincare products that dropped ratings in last 6 years

 

Sentiment Data Analysis of Amazon's Decaying Product Ratings

Fig 8. Top 10 haircare products that dropped ratings between 2014-2021

 

Fig 9. Top 10 haircare products that dropped ratings between 2014-2021

Data Sentiment Analysis

Since the sentiment analysis was done on the deteriorated product ratings, the polarity was assumed to be negative. Word cloud and N-gram was used for Natural Language Processing. For this project, the reviews of all 10 products in each category were concatenated to observe if anything stood out. Ideally, comparison of word cloud for each brand should be done to understand the sentiment towards the brand but since the number of reviews scraped for each product was between five to eight, all reviews were concatenated for a better understanding.

Findings and Recommendations

Skincare Products:

Wordcloud (single words and 2N-grams) for skincare products

2014 Wordcloud (skincare products)
2021 Wordcloud (skincare products)


Recommendations

For skincare category of amazon's beauty products,

  • There are more reviews with words like can not, not really, not work, not know in 2021 compared to 2014 implying quality of products have gone down
  • The phrase side effects has been used frequently in 2021 and from sellers' point of view, contents of the product can be reevaluated for any side effect causing factor
  • Words like soft, smooth were more frequent in 2014 but hard, dry is seen more in 2021, change in ingredients could be tracked
  • not really was used frequently in 2014 too indicating sign of complaints in 2014 and could be inspected back then
  • word cloud for reviews each of the 10 products can give a much better picture about how the sentiment of customers changed over 6 year

Data on Hair care Products:

Wordcloud (single words and 2N-grams) for haircare products

Wordcloud from 2014 Reviews (hairproducts)
Wordcloud from 2021 Reviews(hairproducts)


Recommendations

  • Phrases like can not, not work, not really have increased in the reviews of 2021
  • shampoo conditioner 2 in 1 appears frequently which could be possible reason for reduced quality
  • Word related to smell like coconut smell appears in 2014 reviews and old smell in 2021. This can be further analyzed
  • spray nozzle appears a lot in 2021 and not in 2014, which could be a possible trend
  • kid hair, tear free appeared more frequently in 2014, implying possible change in ingredients by 2021

Data on Makeup Products:

Wordcloud (single words and 2N-grams) for haircare products

Wordcloud from 2014 Reviews (Makeup products)
Wordcloud from 2021 Reviews(Makeup Products)


Recommendations

β€’ not work, would not are the most appeared phrases in 2021 reviews implying drop in popularity from 2014

β€’ Lot of discussion around the word color, like hot pink, purple lipstick, black lipstick in 2021 compared to just pink in 2014 implying possible change in taste

β€’ 100% Pure has been used a lot in 2021, which could be possible concern about ingredients in the products

Conclusion and Future Work

Sentiment Analysis can be used in e-commerce industry to understand the trend and improve brand value. In this project word cloud was used to analyze the changing trend and figure out customer concerns through reviews. This work can be further extended by scraping more reviews for each product and studying the changing sentiment and factors effecting the drop in popularity of each product.

 

Reference:

Ups and downs: Modeling the visual evolution of fashion trends with one-class collaborative filtering
R. He, J. McAuley WWW, 2016

Image-based recommendations on styles and substitutes
J. McAuley, C. Targett, J. Shi, A. van den Hengel SIGIR, 2015

 

 

 

 

 

 

About Author

SWETA PRABHA

Data Scientist with 5 years experience in Academic Research and supply chain Industry. Expertise in Problem Solving, statistical analysis and machine learning models.
View all posts by SWETA PRABHA >

Related Articles

Capstone
Catching Fraud in the Healthcare System
Capstone
The Convenience Factor: How Grocery Stores Impact Property Values
Capstone
Acquisition Due Dilligence Automation for Smaller Firms
Machine Learning
Pandemic Effects on the Ames Housing Market and Lifestyle
Machine Learning
The Ames Data Set: Sales Price Tackled With Diverse Models

Leave a Comment

No comments found.

View Posts by Categories

All Posts 2399 posts
AI 7 posts
AI Agent 2 posts
AI-based hotel recommendation 1 posts
AIForGood 1 posts
Alumni 60 posts
Animated Maps 1 posts
APIs 41 posts
Artificial Intelligence 2 posts
Artificial Intelligence 2 posts
AWS 13 posts
Banking 1 posts
Big Data 50 posts
Branch Analysis 1 posts
Capstone 206 posts
Career Education 7 posts
CLIP 1 posts
Community 72 posts
Congestion Zone 1 posts
Content Recommendation 1 posts
Cosine SImilarity 1 posts
Data Analysis 5 posts
Data Engineering 1 posts
Data Engineering 3 posts
Data Science 7 posts
Data Science News and Sharing 73 posts
Data Visualization 324 posts
Events 5 posts
Featured 37 posts
Function calling 1 posts
FutureTech 1 posts
Generative AI 5 posts
Hadoop 13 posts
Image Classification 1 posts
Innovation 2 posts
Kmeans Cluster 1 posts
LLM 6 posts
Machine Learning 364 posts
Marketing 1 posts
Meetup 144 posts
MLOPs 1 posts
Model Deployment 1 posts
Nagamas69 1 posts
NLP 1 posts
OpenAI 5 posts
OpenNYC Data 1 posts
pySpark 1 posts
Python 16 posts
Python 458 posts
Python data analysis 4 posts
Python Shiny 2 posts
R 404 posts
R Data Analysis 1 posts
R Shiny 560 posts
R Visualization 445 posts
RAG 1 posts
RoBERTa 1 posts
semantic rearch 2 posts
Spark 17 posts
SQL 1 posts
Streamlit 2 posts
Student Works 1687 posts
Tableau 12 posts
TensorFlow 3 posts
Traffic 1 posts
User Preference Modeling 1 posts
Vector database 2 posts
Web Scraping 483 posts
wukong138 1 posts

Our Recent Popular Posts

AI 4 AI: ChatGPT Unifies My Blog Posts
by Vinod Chugani
Dec 18, 2022
Meet Your Machine Learning Mentors: Kyle Gallatin
by Vivian Zhang
Nov 4, 2020
NICU Admissions and CCHD: Predicting Based on Data Analysis
by Paul Lee, Aron Berke, Bee Kim, Bettina Meier and Ira Villar
Jan 7, 2020

View Posts by Tags

#python #trainwithnycdsa 2019 2020 Revenue 3-points agriculture air quality airbnb airline alcohol Alex Baransky algorithm alumni Alumni Interview Alumni Reviews Alumni Spotlight alumni story Alumnus ames dataset ames housing dataset apartment rent API Application artist aws bank loans beautiful soup Best Bootcamp Best Data Science 2019 Best Data Science Bootcamp Best Data Science Bootcamp 2020 Best Ranked Big Data Book Launch Book-Signing bootcamp Bootcamp Alumni Bootcamp Prep boston safety Bundles cake recipe California Cancer Research capstone car price Career Career Day ChatGPT citibike classic cars classpass clustering Coding Course Demo Course Report covid 19 credit credit card crime frequency crops D3.js data data analysis Data Analyst data analytics data for tripadvisor reviews data science Data Science Academy Data Science Bootcamp Data science jobs Data Science Reviews Data Scientist Data Scientist Jobs data visualization database Deep Learning Demo Day Discount disney dplyr drug data e-commerce economy employee employee burnout employer networking environment feature engineering Finance Financial Data Science fitness studio Flask flight delay football gbm Get Hired ggplot2 googleVis H20 Hadoop hallmark holiday movie happiness healthcare frauds higgs boson Hiring hiring partner events Hiring Partners hotels housing housing data housing predictions housing price hy-vee Income industry Industry Experts Injuries Instructor Blog Instructor Interview insurance italki Job Job Placement Jobs Jon Krohn JP Morgan Chase Kaggle Kickstarter las vegas airport lasso regression Lead Data Scienctist Lead Data Scientist leaflet league linear regression Logistic Regression machine learning Maps market matplotlib Medical Research Meet the team meetup methal health miami beach movie music Napoli NBA netflix Networking neural network Neural networks New Courses NHL nlp NYC NYC Data Science nyc data science academy NYC Open Data nyc property NYCDSA NYCDSA Alumni Online Online Bootcamp Online Training Open Data painter pandas Part-time performance phoenix pollutants Portfolio Development precision measurement prediction Prework Programming public safety PwC python Python Data Analysis python machine learning python scrapy python web scraping python webscraping Python Workshop R R Data Analysis R language R Programming R Shiny r studio R Visualization R Workshop R-bloggers random forest Ranking recommendation recommendation system regression Remote remote data science bootcamp Scrapy scrapy visualization seaborn seafood type Selenium sentiment analysis sentiment classification Shiny Shiny Dashboard Spark Special Special Summer Sports statistics streaming Student Interview Student Showcase SVM Switchup Tableau teachers team team performance TensorFlow Testimonial tf-idf Top Data Science Bootcamp Top manufacturing companies Transfers tweets twitter videos visualization wallstreet wallstreetbets web scraping Weekend Course What to expect whiskey whiskeyadvocate wildfire word cloud word2vec XGBoost yelp youtube trending ZORI

NYC Data Science Academy

NYC Data Science Academy teaches data science, trains companies and their employees to better profit from data, excels at big data project consulting, and connects trained Data Scientists to our industry.

NYC Data Science Academy is licensed by New York State Education Department.

Get detailed curriculum information about our
amazing bootcamp!

Please enter a valid email address
Sign up completed. Thank you!

Offerings

  • HOME
  • DATA SCIENCE BOOTCAMP
  • ONLINE DATA SCIENCE BOOTCAMP
  • Professional Development Courses
  • CORPORATE OFFERINGS
  • HIRING PARTNERS
  • About

  • About Us
  • Alumni
  • Blog
  • FAQ
  • Contact Us
  • Refund Policy
  • Join Us
  • SOCIAL MEDIA

    Β© 2025 NYC Data Science Academy
    All rights reserved. | Site Map
    Privacy Policy | Terms of Service
    Bootcamp Application