https://github.com/neha1399/amazon-product-recommendation
https://github.com/neha1399/amazon-product-recommendation
glob numpy pandas python
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/neha1399/amazon-product-recommendation
- Owner: neha1399
- Created: 2024-12-17T04:06:37.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-12-22T14:21:10.000Z (over 1 year ago)
- Last Synced: 2025-06-19T06:51:18.102Z (about 1 year ago)
- Topics: glob, numpy, pandas, python
- Language: Jupyter Notebook
- Homepage:
- Size: 38.1 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# Amazon Product Ratings Analysis
---
## Overview
This project analyzes Amazon product ratings from multiple datasets and generates insights in both tabular and visual formats. The analysis includes:
1. **Average Ratings by Category**
2. **Total Number of Ratings by Category**
3. **Top 5 Products by Ratings in Each Category**
Additionally, the project creates interactive visualizations using Plotly to represent the data effectively.
---
## Features
1. **Data Processing**:
- Combines multiple datasets of product ratings.
- Handles inconsistencies such as missing values or invalid data types.
- Ensures uniform column names across datasets.
2. **Analysis**:
- Calculates average ratings for each category.
- Identifies the total number of ratings per category.
- Extracts the top 5 products by ratings for each category.
3. **Visualizations**:
- **Bar Chart**: Average ratings by category.
- **Bar Chart**: Total number of ratings by category.
- **Table**: Top 5 products with their categories, ratings, and number of ratings.
- **Pie Chart**: Distribution of ratings across categories.
---
## Files
1. **Scripts**:
- `analysis.py`: Main script for data analysis and visualization.
- `visualizations.py`: Contains functions to generate visualizations using Plotly.
2. **Input**:
- CSV files containing Amazon product data, stored in the `notebooks/data/` directory.
3. **Output**:
- CSV files saved in the `output/` directory:
- `average_ratings_by_category.csv`
- `total_ratings_by_category.csv`
- `top_5_by_category.csv`
- Interactive visualizations displayed in the browser.
---
## Visualizations
1. **Bar Chart (Average Ratings)**:
Displays the average ratings for each product category.
2. **Bar Chart (Total Ratings)**:
Shows the total number of ratings for each category.
3. **Table**:
Lists the top 5 rated products for each category, with columns:
- Product Name
- Category
- Rating
- Number of Ratings
4. **Pie Chart (Ratings Distribution)**:
Illustrates the proportion of ratings contributed by each category. The highest-rated category is highlighted.
---
## Dependencies
- **Pandas**: Data manipulation and processing.
- **NumPy**: Numerical operations.
- **Plotly**: Interactive visualizations.
- **glob**: File pattern matching for multiple datasets
- **OS**: File and directory management.