TWEET SENTIMENT ANALYSIS PROGRAM
To run:
- Change the working directory on line 16 to wherever you downloaded the "elon-tweet-analysis" folder to
- Run all by hitting ctrl-alt-R
- A random 60 day period will be selected to plot the sentiment values over
- The range can be reduced or expanded easily by modifying the range variable on line 28
Notes:
- Currently this program analyzes tweets from Elon Musk
- Could modify this program to do sentiment analysis on any sorts of texts that change over time
- Sentiment analysis is based off of number of "positive" and "negative" words
- In the future, would like to expand this to give an emotion back - such as "sad", "excited", etc.
- If you're having troubles running the program, try just calling Setup() instead of the pipelined functions at the bottom, then once Setup() runs once, recall the pipeline
Credits:
- Data set taken from: https://www.kaggle.com/antonaks/analysis-of-elon-musk-s-tweets/data
- Sentiment analysis guided by: https://www.kaggle.com/rtatman/tutorial-sentiment-analysis-in-r