Book, The Virtual Library, an R Shiny Application

Posted on Mar 3, 2020

The Objective

Organizing books by genre falls far short of telling a perspective reader if that book is of any interest to them.  Any one book can fall into dozens of categories while two books in the same category share almost nothing in common.  This makes identifying a good read extremely difficult, so authors add book descriptions.  Book descriptions can be helpful but without knowing anything about the author it can be hard to know if the book fits other criteria you may be interested in.  This Shiny app aims to solve that problem.  It provides readers with a database of over fifty thousand books.  Simply select your favorite and a suggestion will be provided.  Peruse authors, compare genres and most importantly, easily identify your next read.  Click here to view the app: Virtual Library 

Book Recommender

When the application is opened the user is given the opportunity to input a book.  The book recommendation system then suggests a book most similar to the selected book.  The recommendation system works using Doc2Vec on the book descriptions.  The book title, cover, description, author and genre are all included.

Author Investigation

So, you have input your favorite book and the book recommender returned a book by an author you have never heard of.  Maybe you just want to know more about an author you already love.  The author section of this application allows you to investigate authors one at a time.  The top of the page provides an average rating, average number of pages and the highest rated book.  Let's investigate my personal favorite author, Patrick Rothfuss. 

Clearly Patrick Rothfuss writes long books and they are well received.  The page also includes two graphs.  The first is a scatter plot of every book written by that author.  The x-axis is the rating of that book and the y-axis is the number of pages.  Hovering over a book will show you the book title. 

Here, you can see that almost all of his books are above 500 pages and get high ratings.  The second graph is a bar graph showing the performance of that author in each genre.  

Unsurprisingly Patricks highest rated genres are Adult, Epic and Adventure.  Those are the top genres of The King Killer Chronicals, the series he is best known for.  

Genre Analysis

In this section of the application the user has the ability to compare genres by page count, average rating and rating by page count.  Two genres are selected and three graphs are output.  These graphs can be manipulated based on a selected page range.  Continuing our investigating, we decide that Patricks books are too long for our current interests but that we like his writing style and want to stay in his top genres.  Lets compare Epic Fantasy and Adventure.  

This density plot shows the distribution of page counts within a genre.  Here it is clear that the Adventure category has shorter books, generally.  We can then look at the box plot to compare avergare rating of different genres.  Here it is clear that the two genres aren't very different but Epic Fantasy receives higher reviews.

Finally, we can look at the ratings of each genre by bucketing the books into their respective page counts.

We are looking for a shorter book, so we can potentially look into Adventure books or Epic Fantasys in the lower range because they receive fairly good ratings on average.

Future work

In the future I would like to collect more book samples.  If more resources were available I would like to train the description vectorization model on the entire book text instead of the descriptions of the books.

My Github

My LinkedIn

About Author

Michael Emmert

Michael Emmert graduated from The George Washington University in May of 2019 with a Bachelors degree in Mechanical Engineering. Through his Bachelors he gained skills in mathematics, communicating ideas to non-technical groups, data manipulation and trend identification as...
View all posts by Michael Emmert >

Related Articles

Leave a Comment

No comments found.

View Posts by Categories


Our Recent Popular Posts


View Posts by Tags

#python #trainwithnycdsa 2019 2020 Revenue 3-points agriculture air quality airbnb airline alcohol Alex Baransky algorithm alumni Alumni Interview Alumni Reviews Alumni Spotlight alumni story Alumnus ames dataset ames housing dataset apartment rent API Application artist aws bank loans beautiful soup Best Bootcamp Best Data Science 2019 Best Data Science Bootcamp Best Data Science Bootcamp 2020 Best Ranked Big Data Book Launch Book-Signing bootcamp Bootcamp Alumni Bootcamp Prep boston safety Bundles cake recipe California Cancer Research capstone car price Career Career Day citibike classic cars classpass clustering Coding Course Demo Course Report covid 19 credit credit card crime frequency crops D3.js data data analysis Data Analyst data analytics data for tripadvisor reviews data science Data Science Academy Data Science Bootcamp Data science jobs Data Science Reviews Data Scientist Data Scientist Jobs data visualization database Deep Learning Demo Day Discount disney dplyr drug data e-commerce economy employee employee burnout employer networking environment feature engineering Finance Financial Data Science fitness studio Flask flight delay gbm Get Hired ggplot2 googleVis H20 Hadoop hallmark holiday movie happiness healthcare frauds higgs boson Hiring hiring partner events Hiring Partners hotels housing housing data housing predictions housing price hy-vee Income Industry Experts Injuries Instructor Blog Instructor Interview insurance italki Job Job Placement Jobs Jon Krohn JP Morgan Chase Kaggle Kickstarter las vegas airport lasso regression Lead Data Scienctist Lead Data Scientist leaflet league linear regression Logistic Regression machine learning Maps market matplotlib Medical Research Meet the team meetup methal health miami beach movie music Napoli NBA netflix Networking neural network Neural networks New Courses NHL nlp NYC NYC Data Science nyc data science academy NYC Open Data nyc property NYCDSA NYCDSA Alumni Online Online Bootcamp Online Training Open Data painter pandas Part-time performance phoenix pollutants Portfolio Development precision measurement prediction Prework Programming public safety PwC python Python Data Analysis python machine learning python scrapy python web scraping python webscraping Python Workshop R R Data Analysis R language R Programming R Shiny r studio R Visualization R Workshop R-bloggers random forest Ranking recommendation recommendation system regression Remote remote data science bootcamp Scrapy scrapy visualization seaborn seafood type Selenium sentiment analysis sentiment classification Shiny Shiny Dashboard Spark Special Special Summer Sports statistics streaming Student Interview Student Showcase SVM Switchup Tableau teachers team team performance TensorFlow Testimonial tf-idf Top Data Science Bootcamp Top manufacturing companies Transfers tweets twitter videos visualization wallstreet wallstreetbets web scraping Weekend Course What to expect whiskey whiskeyadvocate wildfire word cloud word2vec XGBoost yelp youtube trending ZORI