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 airbnb Alex Baransky alumni Alumni Interview Alumni Reviews Alumni Spotlight alumni story Alumnus API Application artist aws 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 Bundles California Cancer Research capstone Career Career Day citibike clustering Coding Course Demo Course Report D3.js data Data Analyst data science Data Science Academy Data Science Bootcamp Data science jobs Data Science Reviews Data Scientist Data Scientist Jobs data visualization Deep Learning Demo Day Discount dplyr employer networking feature engineering Finance Financial Data Science Flask gbm Get Hired ggplot2 googleVis Hadoop higgs boson Hiring hiring partner events Hiring Partners Industry Experts Instructor Blog Instructor Interview Job Job Placement Jobs Jon Krohn JP Morgan Chase Kaggle Kickstarter lasso regression Lead Data Scienctist Lead Data Scientist leaflet linear regression Logistic Regression machine learning Maps matplotlib Medical Research Meet the team meetup Networking neural network Neural networks New Courses nlp NYC NYC Data Science nyc data science academy NYC Open Data NYCDSA NYCDSA Alumni Online Online Bootcamp Online Training Open Data painter pandas Part-time Portfolio Development prediction Prework Programming PwC python Python Data Analysis python machine learning python scrapy python web scraping python webscraping Python Workshop R 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 Selenium sentiment analysis Shiny Shiny Dashboard Spark Special Special Summer Sports statistics streaming Student Interview Student Showcase SVM Switchup Tableau team TensorFlow Testimonial tf-idf Top Data Science Bootcamp twitter visualization web scraping Weekend Course What to expect word cloud word2vec XGBoost yelp