BaşlayınÜcretsiz Başlayın

Visualizing word counts using factors

I've added a number of other custom stop words (including the airline names) and tidied the data for you. Now you will create an improved visualization and plot the words arranged in descending order by word count.

Bu egzersiz

Introduction to Text Analysis in R

kursunun bir parçasıdır
Kursu Görüntüle

Egzersiz talimatları

  • Only keep the terms that occur more than 100 times in the non_complaints.
  • Reorder the word column as a factor ordered by word counts.
  • Create a bar plot using the new word column with type factor.

Uygulamalı interaktif egzersiz

Bu örnek kodu tamamlayarak bu egzersizi bitirin.

word_counts <- tidy_twitter %>% 
  filter(complaint_label == "Non-Complaint") %>% 
  count(word) %>% 
  # Keep terms that occur more than 100 times
  ___(___) %>% 
  # Reorder word as an ordered factor by word counts
  ___(word2 = ___(___, ___))

# Plot the new word column with type factor
___(___, aes(___, ___)) +
  ___() +
  ___() +
  ggtitle("Non-Complaint Word Counts")
Kodu Düzenle ve Çalıştır