Skip to content

Commit

Permalink
Increase the time interval to 2 weeks for Q2
Browse files Browse the repository at this point in the history
  • Loading branch information
sokovninn committed May 26, 2022
1 parent 8c53d11 commit 3ef990e
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions DataAnalysis/Q2/q2_before_after_russian_tweets.R
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ split_before_after_date <- function(data, date) {
data$Date <- sub(" .*", "", data$Date)
data$Date <- as.Date(data$Date, format="%Y-%m-%d", tz="UTC")

data <- subset(data, Date >= as.Date('2022-02-25') & Date <= as.Date('2022-03-10'))
data <- subset(data, Date >= as.Date('2022-02-18') & Date <= as.Date('2022-03-17'))
data

# Tweets before and after twitter ban
Expand Down Expand Up @@ -40,29 +40,29 @@ conduct_chisq_before_after <- function(data) {
# csv file -- change the file path here
q2_zelensky_russian <- read.csv('UkraineConflictOnTwitter/SentimentAnalysis/data/q2/zelensky_russian_with_sentiment.csv')
conduct_chisq_before_after(q2_zelensky_russian)
# p-value = 0.4434 (insignificant)
# p-value = 0.07444 (insignificant)

q2_putin_russian <- read.csv('UkraineConflictOnTwitter/SentimentAnalysis/data/q2/putin_russian_with_sentiment.csv')
conduct_chisq_before_after(q2_putin_russian)
# p-value = 0.4486 (insignificant)
# p-value = 0.1378 (insignificant)

q2_nato_russian <- read.csv('UkraineConflictOnTwitter/SentimentAnalysis/data/q2/nato_russian_with_sentiment.csv')
conduct_chisq_before_after(q2_nato_russian)
# p-value = 0.05422 (insignificant)
# p-value = 0.0001166 (significant)

# English

q2_zelensky_english <- read.csv('UkraineConflictOnTwitter/SentimentAnalysis/data/q2/zelensky_english_with_sentiment.csv')
conduct_chisq_before_after(q2_zelensky_english)
# p-value = 7.735e-14 (significant)
# p-value = 2.153e-11 (significant)

q2_putin_english <- read.csv('UkraineConflictOnTwitter/SentimentAnalysis/data/q2/putin_english_with_sentiment.csv')
conduct_chisq_before_after(q2_putin_english)
# p-value = p-value = 0.1959 (insignificant)
# p-value = 0.01354 (significant)

q2_nato_english <- read.csv('UkraineConflictOnTwitter/SentimentAnalysis/data/q2/nato_english_with_sentiment.csv')
conduct_chisq_before_after(q2_nato_english)
# p-value = 0.1518 (insignificant)
# p-value = 0.04421 (significant)



0 comments on commit 3ef990e

Please sign in to comment.