开始使用免费开始使用

情感可视化

让我们创建一个 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(___)
编辑并运行代码