Understanding the Book-Crossing Dataset: Visualizing Status Data

Understanding the Book-Crossing Dataset: Visualizing Status Data

In the previous entry, we went over several “status” data on Treasure Data cloud data warehouse. Today, we are focusing on “action” data, or rather, a type of inaction: how can we identify users who are lazy about rating books?

When you look around Amazon for book reviews, you notice that some users are consistently harsher than others. For example, some users never give five stars. This observation goes the other way around too. Some users are so generous with stars that the worst they would ever give is three out of five even if the review itself is a litany of complaints. Let's call them Harsh and Generous, respectively.

And there is another group of users that we might conflate with Harsh and Generous: Lazy. Lazy users do not put much effort into rating books. They just pick an arbitrary rating because they have an extrinsic motivation (ex: getting something for free by cranking out reviews). If lazy users decide to always rate books at 5/10 or 10/10, they might appear harsh or generous although they are just lazy in reality.

Defining Harsh, Generous and Lazy

Recall the following graph from the previous entry

image

Based on this graph, let's define Harsh, Generous and Laxy as follows:

  • Generous: Always gives 9 or higher.
  • Harsh: Always gives 5 or lower.
  • Lazy: Always gives the same rating and has rated more than 5 times.

The “;more than 5 times”; condition for the Lazy is intended to filter out infrequent reviewers (Hence, the Lazy is not so lazy after all — at least they submit a lot of reviews!)

Get Treasure Data blogs, news, use cases, and platform capabilities.

Thank you for subscribing to our blog!

Query 1: Counting Harsh, Generous and Lazy

Result     :
+-------------+-----+
| rating_type | cnt |
+-------------+-----+
| Generous    | 137 |
| Harsh       | 64  |
| Lazy        | 137 |
+-------------+-----+

There are 105283 users that have rated at least one book, so, Generous/Harsh/Lazy all account for ~0.1% of the users.

A closer look at the Lazy

Let's look at the distribution of lazy users.

Query 2: Distribution of lazy users.

Result     :
+-------------+-----+
| book_rating | cnt |
+-------------+-----+
| 5.0         | 53  |
| 6.0         | 1   |
| 7.0         | 3   |
| 8.0         | 8   |
| 9.0         | 4   |
| 10.0        | 68  |
+-------------+-----+

image

Interestingly, lazy users prefer to give 5 (the middle rating in this 1-10 scale) or 10 (the maximum) to any other numbers.

Notes on the Harsh and the Generous

To wrap up this entry, I will give a few remarks about the Harsh and the Generous. Here is a question: which books are affected the most by the Harsh and the Generous?

Query 3 and 4 answer this question. Because the original definition of the Harsh and the Generous had very few samples, we relaxed the definitions to “those who rate 6 or lower” and “those who rate 8 or higher”. Those Hive queries are pretty hairy, but it goes to show how much analysis you can actually do just in HiveQL. Those queries list books that are 20 books most impacted by the Generous and the Harsh, respectively.

Top 20 impacted by the Generous

image

Top 20 impacted by the Harsh

image

What's intriguing is that the two lists do not overlap at all. The lack of overlap suggests that the Harsh and the Generous might be attracted to different types of books. Finding out which feature effectively separates the Harsh from the Generous can bring insights to both authors and publishers.

What's next?

This is the last leg of our three-part, hands-on tour of Treasure Data. In the next entry, we will talk about data analytics for social gaming. Stay tuned!

Taka Inoue
Taka Inoue
Taka Inoue is Chief Data Scientist at Treasure Data. He began his career as one half data engineer (he founded the MongoDB User Group Japan) and one half statistician at a gaming studio. Taka's deep expertise of "real world" data science is a boon to our customers.