Do books with more reviews get better ratings?
By: Mubarak Ganiyu
Tags: Data Science, Data Visualization, Books, Reading, Life

Do books with more reviews get better ratings?

How factors like number of ratings and number of reviews have an impact on book ratings.

Book-reading is an activity that a lot of people enjoy. It is one that places one’s mind in a different setting while providing one with an empathetic feeling. I, myself, love reading books. My favorite genre is mystery mixed with thriller. I remember reading The Da Vinci Code by Dan Brown.

It was an awesome book that instilled a love for mystery genre books in me. Everything about the book from the plot twists to the storytelling was epic. I was puzzled about who the actual antagonist was while reading the book. Moreover, I was amazed by how detailed the book was in the portrayal of the architectural buildings like the cathedral and Robert Langdon’s mannerism in solving the murders.

After I read this book, I went online to find out more about the book. I discovered that this beautiful piece of work got a rating of 3.8/5 from Goodreads, which is a book collection website.

Stunned by this discovery, I decided to look into the highest rated books on Goodreads. As I got higher up the list, I noticed a trend that highly rated books generally got more reviews.

Therefore, it became a task for me to confirm this hypothesis of mine which is: Do books with more reviews get better ratings?

Getting the Data

The dataset that contains all the information regarding books and their ratings on Goodreads was obtained from Kaggle via this link.

The dataset had multiple features such as book id, title, isbn, number of pages, ratings count, authors, average rating, language and text review count. The dataset got reduced to include the important features such as title, ratings count and text reviews count.

It was further truncated to include only books that got more than 1000 people to rate them and more than 100 people to review them. The code used to carry out this task can be seen below:

## The dataset was truncated to include relevant information

df_books = df_books[df_books['ratings_count'] > 1000]

df_books = df_books[df_books['text_reviews_count'] > 100]

The newly formed dataset was further analyzed then clustered.

A table of the first five rows of the new dataset.

Analyzing the dataset

The dataset was analyzed to arrange the books’ ratings in descending order to examine the top ten books. Then, an inference was made to see whether books’ ratings increase with text reviews count and ratings count.

The top ten books based on average ratings.

It turns out that the books’ ratings do not necessarily mean higher ratings count or text reviews count than the ones below or above them. However, the dataset has 4815 rows. Thus, making an educational guess based on ten rows is not good enough. It would be better if we examine the entire dataset by clustering the rows into groups.

Clustering the dataset

The dataset was clustered to find out if there is significant difference between groups that got a lot of ratings and reviews and those that didn’t get as much. Clustering the dataset was done using a method called k-means clustering.

K-means clustering is an unsupervised machine learning algorithm in which the dataset learns to classify data points into groups based on their similarities with other data points.

The dataset can be clustered into a defined number of group. The book dataset was clustered into three groups. After grouping the dataset, each row was given a figure of either 0, 1 or 2.

The first 25 rows of the dataset after it was grouped into three groups.

A new column was appended to the table called group to signify what group each book was categorized under.

The Results

Upon further examination, a 3-d image was created to perfectly show how the relationship occurred between the books’ average ratings, the text reviews count and the ratings count. Below is a diagrammatic representation of the clustered dataset:

A 3-d representation of the dataset.

The three groups’ data points got colored purple, yellow, and green. The group labelled 0 was colored purple while groups with label 1 and 2 were colored green and yellow respectively.

The purple group had most of its data points spread out across the average ratings axis but had the least number of ratings count and text reviews count. Generally, the yellow group had a smaller range compared to the purple group in terms of ratings but it had a higher number of ratings count and text reviews count than the purple group.

The green group had a similar ratings’ range to the yellow group but it had a higher number of ratings count and text reviews count than the yellow group overall.

A table was created to show how each of the groups differ on average.

A table showing the average of each group’s average rating, ratings count, text reviews count and graphical color.

Based on the table, It turns out that the purple group was far behind in terms of every aspect compared to the yellow and the green group. The purple group has an average rating of 3.94, ratings count of 25,900 and text reviews count of 968. The yellow group has an average rating of 4.03, ratings count of 570,000 and text reviews count of 13,923. The green group has an average rating of 4.12, ratings count of 2,157,575 and text reviews count of 38639.

Below are scatter plots showing the relationships between the groups:

A scatter plot of the average rating versus ratings count for the groups.

A scatter plot of the average ratings vs text reviews count for the groups.

Based on the two scatter plots, my hypothesis has been fully confirmed. In general, the more reviews a book gets, the higher its rating.

Books are rated by fans and critics. Critics are more likely to review books in a very scrutinizing manner than fans are. However, there are very few critics reviewing books compared to fans. Thus, the more popular a book is, the more fans are likely to rate it as perfect which means popularity is likely a confounding variable.

The full version of the code that was used to build this clustering model can be seen here.