Exercise

Visualizing the NRC sentiments

We've seen how visualizations can give us a better idea of patterns in data than counts alone. Let's visualize the sentiments from the nrc dictionary. I've loaded the tidyverse and tidytext packages for you already.

Instructions

100 XP
  • Extract the nrc dictionary, count the sentiments and reorder them by count to create a new factor column, sentiment2.
  • Visualize sentiment_counts using the new sentiment factor column.
  • Change the title to "Sentiment Counts in NRC", x-axis to "Sentiment", and y-axis to "Counts".