Shiny Sentiments

· wordCount · 1 minute read

After the Leaflet example I was given another assignment in the Coursera Developing Data Products course. This time the goal was to use Shiny to demonstrate some interactive data analysis and visualisation.

I picked two areas I’m fond of, books and sentiment analysis, and combined them to produce the Gutenberg Sentiment Analyser!

Explorer

Here is how to use it:

  1. Search for an author and pick one.
  2. Similarly in the word cloud tab the books are dissected and visualised.
  3. In the sentiment tab an analysis is generated and plotted for all the author’s books from beginning to end of each with normalised book length.

It makes use of the following R packages:

  • gutenbergr
  • tidytext
  • wordcloud

Some examples 🔗

Here’s a word cloud of Jane Austen’s works:

Word Cloud

Dostoyevsky in particular is somewhat depressing:

Word Cloud


To be honest I didn’t have much time to do this so it’s all a bit rushed. The graphs don’t work well for you prolific authors. I would like to figure out a better way of showing sentiment.

The source code is here.