1. Let's talk about our feelings
Welcome to Sentiment Analysis in R. In this course we build upon your previous Bag of Words tool set and introduce basic methods for sentiment analysis on books, lyrics and apply it to a real use case!
2. Definition: sentiment analysis
First start by defining sentiment analysis. Sentiment analysis as I think about it is defined as the process of extracting an author’s emotional intent from text. This can take a lot of forms, from simple “positive and negative” feelings to specific emotions like “surprised” or “angry.”
3. Why is sentiment analysis important?
Sentiment analysis is used everyday in various applications. For example, academics study ethnographic interviews, marketers apply sentiment analysis to understand how an ad campaign is affecting a customer’s brand perception over time, and some even trade stocks based on company announcements and their sentiment.
4. Data formats in this course
The emotion that an author tries to convey in a piece of writing is often important metadata. Sentiment analysis is important because it unlocks the emotions from messy text data into a structured form that is easy to analyze and quantify. In contrast, bag of words methods simply organize text and perform matrix analyses without regard to the author’s emotion. In this course we still borrow bag of word tools like the document term matrix, or vector based analysis, but also add the tidytext data format called a “tibble.”
5. Chapter 1: qdap's polarity() function
In chapter 1 we will cover basic polarity, that is to say the degree of positive or negative expression within text. It’s quick and dirty but lets you jump right in!
6. Chapter 2: tidytext inner joins
Largely the tidytext method uses simple database join techniques to match text to known expressive words like “awful” or “wonderful.” You will learn the basics of the inner join and other tidy principles in this course. Plus DataCamp has several courses on tidying data.
7. Chapter 3: Visualizing sentiment
Since so many analyses require a visual read out, chapter 3 is devoted to visualizing sentiment outputs. For example, tracking sentiment over time would use a line chart, while comparing emotions could utilize a radar chart. For added learning we introduce some of the JavaScript visuals from htmlwidgets-dot-org.
8. Chapter 4: Case study on property rentals
Lastly, we wrap it all up in a real case study. You will perform a sentiment analysis on real property rental reviews in the Boston area. In this use case, you are trying to understand what makes a good rental experience versus a poor one in case you want to rent out your own place.
At the end of the course you will understand the basics of sentiment analysis and be able to apply it to text using R.
9. Let's practice!
Let's get to it!