Visualise networks of Twitter interactions.
gt_edges & gt_edges_bind - get edges.gt_co_edges & gt_co_edges_bind - get co-mentionsgt_nodes - get nodes, with or without metadata.gt_dyn - create dynamic graph.gt_graph - create igraph graph object.gt_save - save the graph to filegt_collect - collect nodes and edges.gt_add_meta - Add meta data to nodes (from 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 gt_nodes.