Filter based on tweet popularity
Popular tweets are tweets that are retweeted and favorited several times.
They are useful in identifying current trends. A brand can promote its merchandise and build brand loyalty by identifying popular tweets and retweeting them.
In this exercise, you will extract tweets on "Chelsea" that have been retweeted a minimum of 100 times and also favorited at least by 100 users.
The library rtweet has been pre-loaded for this exercise.
Diese Übung ist Teil des Kurses
Analyzing Social Media Data in R
Anleitung zur Übung
- Extract tweets with a minimum of 100 retweets and 100 favorites using filters.
- Create a data frame with the retweet and favorite counts.
- View the tweets.
Interaktive Übung
Vervollständige den Beispielcode, um diese Übung erfolgreich abzuschließen.
# Extract tweets with a minimum of 100 retweets and 100 favorites
tweets_pop <- search_tweets("Chelsea ___:___ AND ___:___")
# Create a data frame to check retweet and favorite counts
counts <- tweets_pop[c("___", "favorite_count")]
head(counts)
# View the tweets
head(tweets_pop$text)