RATING ANALYSIS OF UNLOCKED PHONES IN AMAZON USING PYTHON

Ragul Kesavan S
4 min readDec 20, 2018

--

FOR COMPLETE CODE VIEW https://github.com/ragulkesavan/RATING-ANALYSIS-OF-AMAZON-UNLOCKED-MOBILE

OVERVIEW :

UNLOCKED PHONES?

unlocked phone is not associated to a specific phone carrier or and so that you can use with any SIM card from any network carrier in the world. That means:

• You have more models of phones to choose from than what the carriers offer.

• When traveling, you can easily use international SIM cards.

• You can switch carriers without penalty.

• Since it’s unlocked, it usually has a higher resale value.

THEN WHAT LOCKED PHONES ARE?

Many phones sold by carriers come “locked” to that carrier. A “locked” phone can only be used with that carrier and we cannot change the carrier; it cannot be used with another carrier’s service. (Not counting roaming.)

This lock can usually be removed by entering a special code or numeric password. In some situations, some carriers will supply this code upon request by the customer; not all carriers will do this.

DISADVANTAGES OF LOCKED PHONES :

We cannot change the carrier and use an plan of other carriers.

ADVANTAGES OF UNLOCKED PHONES :

  1. With an unlocked phone you have the huge advantage of easily changing your network provider and being able to choose a better plan to suit your needs.
  2. You can save hundreds of dollars when traveling abroad if you have an unlocked phone. Just buy a local SIM card and start making calls at local rates, avoiding roaming charges.
  3. Unlocked phones tend to have higher resale prices than locked phones, and you can easily sell your unlocked device internationally.

AIM :

To know about top highly preferred unlock phones and their accessories and the top companies manufacturing them by analysis of unlock phone and accessories rating by using the amazon dataset of unlocked phone and accessories.

To plot the result of analysis in graph.

To get a summary of top products in unlock phone and accessories dataset of amazon.

DATASET :

Unlocked phone data set of amazon is used here.

the data set has more than 400k data entries of unlocked phone amazon review and rating data set.

OVERVIEW OF DATASET

PREPROCESSING :

The below modules are imported according to purpose..

  • sqlite3
  • pandas
  • time
  • matplotlib
  • texttable
import sqlite3

the above is example for importing modules necessary.All necessary modules are imported.

MAIN ALGORITHM :

1.Import the dataset.

2.For each unique product create a list topten [total_of_rating,total_customers,price,overall_rating,brand].

3.Add all individual customer rating of each product to the total_of_rating in list and increment total_customers by 1 for each rating.

4.Do total_of_rating/total_customers and store in overall rating for each element in the list.

5.Create a separate list companies [total_of_rating_for_each_product,total_customers,overall_rating].

6.For all elements in companies calculate overall_review= total_of_rating_for_each_product/total_customers.

7.Sort both topten based on rating.

8.For top 10 unique ratings in list pick up the product that has high number of customers.

9.Sort the companies by no of customers.

10.Print the top10 products and top 10 companies.

upto step 7 in algorithm list is sorted based on overall rating (visit https://github.com/ragulkesavan/RATING-ANALYSIS-OF-AMAZON-UNLOCKED-MOBILE/blob/master/main.py for code)
step 8 of algorithm, picking up top 10 unique rated products (visit https://github.com/ragulkesavan/RATING-ANALYSIS-OF-AMAZON-UNLOCKED-MOBILE/blob/master/main.py for code)
upto step 10 in algorithm picking top 10 companies (visit https://github.com/ragulkesavan/RATING-ANALYSIS-OF-AMAZON-UNLOCKED-MOBILE/blob/master/main.py for code)

OUTPUT :

The top 10 products and companies are found by processing more than 400k data.

CONTENTS FOR TOP 10 PRODUCTS IN DATABASE
CONTENTS FOR TOP 10 COMPANIES IN DATABASE

ANALYSIS OF OUTPUT :

The results are plotted into graphs and tables.

pie chart for top 10 products based on number of customers-(code at https://github.com/ragulkesavan/RATING-ANALYSIS-OF-AMAZON-UNLOCKED-MOBILE/blob/master/figure_1.py)

--

--