Skip to content

Lovekumar-Creative/HanuAi-ML-Assignment

Repository files navigation

Task 1: BestBuy Canada Reviews Scraper + Sentiment Analysis (Selenium)

This project scrapes publicly available product reviews from BestBuy Canada and performs sentiment analysis on the review text.

It extracts key review fields, applies sorting filters (when available), handles pagination (Show More / Load More), and generates a structured dataset in CSV/Excel format. The sentiment analysis categorizes reviews into Positive / Neutral / Negative using VADER.


📌 Features

✅ Web Scraping (BestBuy Canada)

  • Scrapes reviews from a BestBuy Canada product page (50+ reviews).
  • Uses Selenium because reviews load dynamically using JavaScript.
  • Handles pagination using “Show More / Load More” style buttons.
  • Attempts sorting filters:
    • Most Helpful
    • Newest
    • Highest Rating
    • Lowest Rating
    • Most Relevant

✅ Extracted Fields

The scraper collects (minimum required fields):

  • primary_key
  • title
  • review_text
  • date (YYYY-MM-DD)
  • rating_out_of_5
  • source
  • reviewer_name
  • filter_used

✅ Sentiment Analysis

  • Uses VADER Sentiment Analyzer
  • Adds:
    • sentiment_score
    • sentiment → Positive / Neutral / Negative

✅ Output Files

  • bestbuy_reviews_with_sentiment.csv
  • bestbuy_reviews_with_sentiment.xlsx

🧰 Tech Stack

  • Python 3.x
  • Selenium
  • ChromeDriver
  • Pandas
  • vaderSentiment
  • openpyxl

⚙️ Setup Instructions (Windows)

1) Install Python Libraries

pip install selenium pandas vaderSentiment openpyxl

Task 2: Advanced EDA and Text Mining (Python + NLP)

📌 Overview

This project performs EDA + Text Mining on the provided dataset (1000 rows, 20 columns) containing customer complaints and technician notes related to infotainment/audio/navigation failures.
The goal is to convert unstructured complaint text into structured tags, identify patterns, and generate actionable stakeholder insights.


🔍 Overall Synthesis (Data Understanding)

The dataset contains:

  • Structured fields: CAUSAL_CD_DESC, COMPLAINT_CD_DESC, MAKE, MODEL, PLANT, dates
  • Free-text fields: CUSTOMER_VERBATIM, CAUSAL_VERBATIM, CORRECTION_VERBATIM

Most business value comes from the free-text columns, where failure details and repair actions are described.


📊 EDA Outcomes

  • No duplicate rows found.
  • Some columns (Trigger/Failure/Fix fields) contain ~995 missing values → likely not maintained consistently.
  • Trend analysis was performed using Opened date to observe event frequency over time.

🧠 Text Mining Outcomes

Free-text was mined to extract:

  • Component tags (radio, display, wiring, usb, bluetooth, software, etc.)
  • Symptom tags (no power, black screen, frozen, reboot, no audio, etc.)

Based on extracted tags, complaints were categorized into:

  • Software / Firmware
  • Electrical / Wiring
  • Internal Component Failure
  • Display / Touch Issue
  • Other

📌 Clustering / Topic Modelling

Applied TF-IDF + KMeans clustering (k=8) to group similar complaint narratives and identify recurring failure modes.


✅ Stakeholder Insights + Business Impact

Key Patterns

  • Most complaints relate to software/firmware instability and electrical/wiring issues.
  • Repeated failure themes include radio inoperable, screen issues, communication faults, and shorts/grounding.

Actionable Recommendations

  • Improve infotainment software testing and release monitoring.
  • Strengthen wiring/connector QC checks at plant level.
  • Track high-frequency clusters as KPIs for engineering and supplier teams.

📌 Key Learnings

  • Free-text fields provide the strongest insights.
  • Tag extraction + clustering makes complaint analysis scalable.
  • Even simple NLP rules provide useful structured outputs.

🧰 Tech Stack

  • Python
  • NumPy
  • Pandas
  • Matplotlib
  • Sklearn

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages