Skip to content

Analysis on Amazon's vine review program using PySpark and AWS RDS with PostgreSQL

Notifications You must be signed in to change notification settings

nicoserrano/Amazon_Vine_Analysis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Amazon_Vine_Analysis

Analysis on Amazon's vine review program using PySpark and AWS RDS with PostgreSQL

Overview

In this project I used US Apparel product reviews from Amazon. The goal was to analyze if it would be worth it to subscribe to a Vine program if we were to sell similar products through their platform. The vine review program is an incentive model in which customers are gifted free stuff when they write good reviews. I was able to use PySpark to extract, transform, and load (ETL) the data to a AWS RDS I created and connected to my PostgreSQL server to be able to query it and extract my finished tables from there. Part of the data transformation was made using pandas as well.

The objective of this project was to familiarize myself with Spark. Apache Spark is a unified analytics engine for large-sacale data processing. This means that when working with big data, Spark is one of the best technologies out there to use because of its in-memory computation instead of disk-based solution. It allows for lazy evaluation and delaying expressions or commands until its needed.

Resources

  • Datasets:

  • Technologies used:

    • Google Colab (to run PySpark)
    • Jupyter Notebook
    • AWS S3 and RDS
    • PostgreSQL

Roadmap

The first step was to extract the dataset from an AWS S3 using PySpark in order to transform it and load it to AWS again. Please refer to Amazon_Reviews_ETL.ipynb to see the code. Note that I downloaded it as a jupyter notebook file, but it was originally created in Google Colab for PySpark to run. There, I basically divided the whole dataframe into 4 smaller dataframes for better analysis. These dataframes were then loaded to AWS RDS using a a connection from PySpark to PostgreSQL.

Screen Shot 2021-08-31 at 2 43 06 PM Screen Shot 2021-08-31 at 2 43 14 PM Screen Shot 2021-08-31 at 2 43 22 PM Screen Shot 2021-08-31 at 2 43 29 PM

Due to the size of the dataframes it took some time to load to PostgreSQL and the RDS. I then did a few quick queries to check that everything ran smoothly.

Screen Shot 2021-08-29 at 10 21 45 PM

Screen Shot 2021-08-29 at 10 47 21 PM

Screen Shot 2021-08-29 at 11 21 27 PM

Screen Shot 2021-08-29 at 11 25 19 PM

And lastly, I worked with the last table called vine_table to perform the Vine program analysis to filter the best reviews, and see if there were significantly more 5-star reviews in the paid and incentivized (vine) program. The best reviews were those that were highly voted as helpful. Then, I filtered to see which of those were part of the vine program and which were not. Please refer to the Amazon_Vine_Analysis.ipynb

Results

  • Paid Vine Program

    • 33 total reviews
    • 15 5-star reviews
    • 45.5% of vine reviews were 5-star
  • Unpaid reviews

    • 45,388 total reviews
    • 23,733 5-star reviews
    • 52.3% of unpaid reviews were 5-star

Summary

In conclusion, the vine program might just not be worth it for the apparel category. As it can be seen, there were not many helpful reviews that made part of it (total of 33), and only around half of them were 5-star rated (45%). Very similarly to the unpaid reviews which also only half of them were 5 star rated (52%). Even though the percentages may be misleading as the volume of reviews in the vine and non-vine programs vary so much, this itself is a sign that the vine program is not very popular in this category. We might not want to pay for it as it is not incentivizing the people to write better reviews.

This allows us to conclude that customers don't feel a positivity bias for leaving good reviews in the paid program as there are so few and not so many well-rated. Nevertheless, if we were to further analyze we could calculate the mean of the star ratings on each programs' reviews to see if there's a significant incentive.

Screen Shot 2021-09-02 at 1 10 18 PM

In fact, there is a slight 0.2 difference in the average review star-rating in favor of the vine program. However, there is still not enough information to enroll in it. A great recommendation would be to apply a NLP sentiment analysis to check for the words used in the majority of the reviews. This way we could see if vine reviews are more touching and detailed, that we can feel customers have an incentive to leave great reviews.

About

Analysis on Amazon's vine review program using PySpark and AWS RDS with PostgreSQL

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published