I stumbled across this tutorial by Julianhi and decided to give it a go. If you want to start messing with your own twitter data I suggest following his easy steps to get your twitter app started and opened in R.
After that we can use the twitteR package with ggplot2 to make our graphs.
First we need to set the user,
user <- getUser("twitterusername")
Then we will grab and merge some relevant data
Friends <- user$getFriends() Followers <- user$getFollowers() twitdata <- union(userFollowers, userFriends) twitdata.df = twListToDF(userNeighbors)
Then we will use log() to create a more easily manageable data set,
twitdata.df[twitdata.df=="0"]<-1 twitdata.df$logFollowersCount <-log(twitdata.df$followersCount) twitdata.df$logFriendsCount <-log(twitdata.df$friendsCount) twitdata.df$statusesCount <-log(twitdata.df$statusesCount)
Then we plot! One of the most important things I think you can glean from this information comes from the verified status, which usually means a famous person. In the graph posted here I colored by verified user and put the size as the value of the log of their count of status updates. Essentially it is showing that there is, at least in my twitter user world, a distinct difference between the regular user and verified user in terms of friends to follower ratio as well as number of statuses.
ggplot(twitdata.df, aes(x=logFriendsCount, y=logFollowersCount, color=verified, size=statusesCount)) +geom_point(alpha=.5)