開始使用免費開始

視覺化情緒

來建立一個 word_counts 資料集,並探索在 Twitter 資料中,各種情緒分別與哪些字詞相關。

本練習屬於課程

R 文字分析入門

檢視課程

動手互動練習

試著完成這個範例程式碼,體驗一下這個練習。

word_counts <- tidy_twitter %>% 
  # Append the NRC dictionary and filter for positive, fear, and trust
  ___(___) %>% 
  ___(___) %>%
  # Count by word and sentiment and keep the top 10 of each
  ___(___) %>% 
  group_by(___) %>% 
  ___(___) %>% 
  ungroup() %>% 
  # Create a factor called word2 that has each word ordered by the count
  mutate(___)
編輯並執行程式碼