非苦情の可視化
それでは、非苦情に紐づく単語数を可視化してみましょう。
この演習はコースの一部です
Rで始めるテキスト分析
演習の手順
- 非苦情のみを残します。
- 新しい
word_countsを使って棒グラフを作成します。 - プロットのタイトルを "Non-Complaint Word Counts" にします。
実践的なインタラクティブ演習
このサンプルコードを完成させて、この演習に挑戦してみましょう。
word_counts <- tidy_twitter %>%
# Only keep the non-complaints
___(___) %>%
count(word) %>%
filter(n > 150)
# Create a bar plot using the new word_counts
ggplot(___, aes(___, ___)) +
___() +
coord_flip() +
# Title the plot "Non-Complaint Word Counts"
___(___)