gephi.gif
Visualise networks of Twitter interactions
Features three functions:
getEdges
: build edge table from tweetsgetNodes
: get nodes from edgesdynamise
: make a temporal graphBuild edge table and vertices to plot social network.
See NEWS.md
for changes.
# load twitteR to get tweets
library(twitteR)
token <- setup_twitter_oauth(consumer_key, consumer_secret,
access_token=NULL, access_secret=NULL)
tweets <- searchTwitter("rstats", n = 200)
tweets <- twListToDF(tweets)
library(graphTweets)
edges <- getEdges(data = tweets, tweets = "text", source = "screenName")
nodes <- getNodes(edges)
# plot
g <- igraph::graph.data.frame(edges, directed=TRUE, vertices = nodes)
plot(g)
See my other projects at http://johncoene.github.io/projects/