LoslegenKostenlos starten

Sentiment visualisieren

Lass uns einen Datensatz word_counts erstellen und untersuchen, welche Wörter in unseren Twitter-Daten mit welchem Sentiment verbunden sind.

Diese Übung ist Teil des Kurses

<Kurs>Einführung in die Textanalyse mit R</Kurs>
Kurs ansehen

Interaktive praktische Übung

Versuche dich an dieser Übung, indem du diesen Beispielcode vervollständigst.

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(___)
Code bearbeiten und ausführen