Perform sentiment analysis
You have extracted the sentiment scores for tweets on "Climate change" in the previous exercise.
Can you plot and analyze the most prevalent sentiments among people and see how the collective sentiment varies?
The data frame with the extracted sentiment scores has been pre-loaded as sa.value.
The library ggplot2 has been pre-loaded for this exercise.
แบบฝึกหัดนี้เป็นส่วนหนึ่งของหลักสูตร
Analyzing Social Media Data in R
แบบฝึกหัดเชิงโต้ตอบแบบลงมือทำ
ลองทำแบบฝึกหัดนี้โดยเติมโค้ดตัวอย่างนี้ให้สมบูรณ์
# Calculate sum of sentiment scores
score <- colSums(___[,])
# Convert the sum of scores to a data frame
score_df <- data.frame(___)