Extract user information
Analyzing twitter user data provides vital information which can be used to plan relevant promotional strategies.
User information contains data on the number of followers and friends of the twitter user.
The user information may have multiple instances of the same user as the user might have tweeted multiple times on a given subject. You need to take the mean values of the follower and friend counts in order to consider only one instance.
In this exercise, you will extract the number of friends and followers of users who tweet on #skincare
or #cosmetics
.
Tweets on #skincare
or #cosmetics
, extracted using search_tweets()
, have been pre-loaded as tweet_cos
.
The libraries rtweet
and dplyr
have also been pre-loaded.
This exercise is part of the course
Analyzing Social Media Data in R
Hands-on interactive exercise
Have a go at this exercise by completing this sample code.
# Extract user information from the pre-loaded tweets data frame
user_cos <- ___(tweet_cos)
# View first 6 rows of the user data
head(___)