Understanding customer behavior is vital for any e-commerce business aiming to improve user experience, increase retention, and boost sales. While customer reviews provide emotional feedback, transactional data reveals behavioral patterns. This project combines both:
By integrating these perspectives, we deliver actionable insights for improving product offerings, delivery experience, and personalized marketing.
The dataset is a blend of transactional and textual feedback, consisting of the following key features:
Customer_IDOrder_IDOrder_Date, Delivery_DateCustomer_Review (Review Text)Delivery_StatusShipping_PartnerCity, StateQuantity, Unit Price, TotalSource: Google Analytics API and customer review systems
Time Period: Dec 2023 – May 2025
We approached this analysis in two major parts:
Sentiment Analysis with VADER
To automatically classify thousands of customer reviews into detailed emotional categories.
Customer Segmentation with RFM & K-Means
To profile customers based on their purchase recency, frequency, and monetary value.
Together, these methods offer a 360° view of customer behavior — what they feel and how they act.
SentimentIntensityAnalyzer from nltk.sentiment.vaderpos (positive), neu (neutral), neg (negative), compound (overall)
Max Score 0.8047
Min Score -0.6369
We used the compound score from VADER to classify each review into five sentiment categories:

Bar Chart: Count of reviews in each sentiment category (Positive, Mixed Positive, Neutral, Mixed Negative, Negative).
Helps identify which sentiments are most common among customers

k


| Sentiment Analysis | Customer Segmentation |
|---|---|
| Python | Python |
| NLTK (VADER) | Pandas, NumPy |
| Pandas | Scikit-learn (KMeans) |
| Matplotlib, Seaborn | Matplotlib, Seaborn |
| Jupyter Notebook | Jupyter Notebook |
This combined project showcases how textual feedback and purchase behavior can be jointly analyzed to drive customer-centric decisions. The sentiment layer surfaces emotional trends, while RFM clustering uncovers structural segments in the customer base.