Skip to content

Digital-Methods-HASS/SentimentAnalysis

Repository files navigation

Cultural Data Science: Text mining, sentiment analysis, and visualization

In this tutorial you learn how to extract text out of well-formed (digital-born) PDF files and apply tidyverse/tidytext tools to do a bit of text-mining, before learning the basics of sentiment analysis. We will practice with the IPCC (International Panel on Climate Change) Special Report on Climate Change. What sentiments do you expect to find in this sort of document?

Resources:

Packages you'll need:

For text mining & analysis stuff:

  • tidyverse
  • here
  • pdftools
  • textdata
  • tidytext
  • ggwordcloud

Note - before lab for sentiment analysis you will need to:

  • Attach tidytext and textdata packages
  • In the console, Run: get_sentiments(lexicon = "nrc")
  • You should be prompted to install lexicon - choose yes!
  • Once that's done, in the console run get_sentiments(lexicon = "afinn")
  • You should be prompted to install lexicon - choose yes!

Data:

  • IPCC (International Panel on Climate Change) Special Report: Global Warming of 1.5 degrees.

What next?

After you grasp sentiment analysis, apply these skills to another document of choice. What do you think is the range of sentiments in the Game of Thrones?

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages