Hey guys, it was fun getting to show you around the text analysis stuff.
The data file I was using is a bit too large to store here on github, so instead here is a link to it on Google Drive
To replicate what we went over today you will need to do the following:
- Download the main data file from the google drive link: here
- Download intro.txt and tutorial.r from the github folder
- Install the following packages for R:
- readtext
- quanteda
- quanteda.textplots
- ggplot2
- The code is commented out so you are able to see what each section is intended to do/ what question it is answering
Packages for R can be installed as follows:
1) In RStudio's top menu choose "Tools"
2) Select "Install Packages" from the drop down menu
3) Enter the names of the packages you'd like to install (seperating each by a comma)
4) Ensure that the "Install dependencies" box is checked
5) Click install
Here are some useful resources:
Regular expressions cheat sheet
Quanteda quick start guide
Quanteda commands reference