Visualise networks of Twitter interactions.
install.packages("graphTweets") # CRAN release v0.4 devtools::install_github("JohnCoene/graphTweets") # dev version
gt_edges_bind- get edges.
gt_co_edges_bind- get co-mentions
gt_nodes- get nodes, with or without metadata.
gt_dyn- create dynamic graph.
gt_save- save the graph to file
gt_collect- collect nodes and edges.
Functions are meant to be run in a specific order.
One can only know the nodes of a network based on the edges, so run them in that order. However, you can build a graph based on edges alone:
library(igraph) # for plot tweets <- rtweet::search_tweets("rstats") tweets %>% gt_edges(text, screen_name, status_id) %>% gt_graph() %>% plot()
This is useful if you are building a large graph and don’t need any meta data on the nodes (other than those you can compute from the graph, i.e.:
degree like in the example above). If you need meta data on the nodes use