Q&D analysis of Tim’s Chirps data from SKO.
library(data.table)
library(fasttime)
library(syuzhet) # for sentiment analysis
library(ggplot2)
library(grid)
library(dplyr)
library(tidyr)
chirps <- fread("all_chirps.csv", sep="~")
chirps$timestamp <- fastPOSIXct(chirps$timestamp)
Number of tweets over time. There’s clearly a few peaks during the day:
Now, we can also see the relation between the predicted ‘confidence’ and the sentiment of the text.
R can also do sentiment analysis, so let’s compare:
R_sentiment <- data.frame(get_nrc_sentiment(chirps$chirp), nlp_sentiment=chirps$sentiment_text)
Just showing the pos/neg of one versus the other. Luckily, there is some correlation:
We can also compare to all categories of R’s sentiment analysis: