http://www.interhacktives.com/2017/01/25/scrape-tweets-r-journalists/
rm(list=ls())
library(igraph)
data <- as.matrix(read.csv(“tweet-incid.csv”,row.names=1))
tweet.net <- data %*% t(data)
topic.net <- t(data) %*% data
diag(tweet.net) <- NA
diag(topic.net) <- NA
tweet.g <- graph.adjacency(tweet.net,mode=”undirected”,
weighted=NULL, diag=FALSE)
topic.g <- graph.adjacency(topic.net, weighted=TRUE,
mode=”undirected”, diag=FALSE)
e.wt <- get.edge.attribute(topic.g, “weight”)
la <- layout.fruchterman.reingold(tweet.g)
plot(tweet.g, layout=la, vertex.size=15,edge.width=1)
la <- layout.fruchterman.reingold(topic.g)
plot(topic.g, layout=la, vertex.size=15,edge.width=e.wt)
topic.degree <- degree(topic.g)
plot(topic.g, layout=la, vertex.size=5*topic.degree, edge.width=e.wt)
topic.between <- betweenness(topic.g)
View(topic.between)