Create interactive Twitter network graph that displays tweet when mouse is hovered over edge

240 views Asked by At

I scraped tweets and created a dataframe similar to the one below:

df = pd.DataFrame({'user':['a','b','c','d','e'],'mention':['a1','b1','c1','d1','e1'],'text':['abc','def','ghi','jkl','mno']
})
user  mention  text
a     a1       abc
b     b1       def
c     c1       ghi
d     d1       jkl
e     e1       mno

I then converted the data frame to a Graph object:

test = nx.from_pandas_edgelist(
    df,
    source='user',
    target='mentioned',
)

I am now looking for a method to create an interactive directed graph that would have the nodes labeled by 'user'. I would also like to be able to visualize the 'text' associated with the edge object. How would I accomplish this?

0

There are 0 answers