a measure of subjective well-being computed for each country separately, might also correlate with historical events, such as wars, the Roaring '20s, and other economic indicators, such as gross domestic product (GDP) and longevity.
sentiment tends to be quite resilient over time. People bounce back from wars and fall predictably from highs.
new methods developed by psychologists and computer scientists allow us to examine written text to predict the emotional state of the author reliably. This is called "sentiment analysis" and it involves using words rated on scales of positivity and negativity. When one takes thousands of such rated words and applies them to thousands of words of written text, one can compute the overall positivity and negativity of the text. This, in turn, has been shown to correlate with the emotional attitude of the author.