First, we fetch real-time twitter tweets data using authentication keys and tokens and then convert it to a data frame using the twListToDF() method from the twitterR package. Afterward, we use the first 500 tweets as network analysis and visualization is computationally intensive and split it into tweets and reTweets datasets.
Next, we add sender information to the reTweets data frame with the mutate() function from dplyr and use the sender information to create an edge list of the reTweet network.
Then we create the reTweet graph data from the reTweet data frame using the graph_from_data_frame() method from the igraph package, and finally plot the reTweet graph using the plot function. The vertex.size attribute of the