I am trying to visualize retweet network in order to find out which users are most likely to have most influence on other users. Here is my code:
import networkx as nx
G_retweet = nx.from_pandas_edgelist(translated_iranian_tweets,
source = "userid",
target = "retweet_userid",
create_using = nx.DiGraph())
print('There are {} Nodes inside Retweet Network'.format(len(G_retweet.nodes())))
print('There are {} Edges inside Retweet Network'.format(len(G_retweet.edges())))
import matplotlib.pyplot as plt
#Size varies by the number of edges the node has (its degree)
sizes = [x[1] for x in G_retweet.degree()]
nx.draw_networkx(G_retweet,
pos = nx.circular_layout(G_retweet),
with_labels = False,
node_size = sizes,
width = 0.1,
alpha = 0.7,
arrowsize = 2,
linewidths = 0)
plt.axis('off')
plt.show()
There are 18631 nodes and 35008 edges inside this network. Visualization is horrible, you cannot see anything. Does anyone have any suggestions what should I do about it? Should I try to extract specific type of users with specific tweets in order to reduce size of my dataset and then try to visualize the network, or something else?