Network Analysis from Social Media Data with NetworkX

Network Analysis from Social Media Data with NetworkX

Image from https://nodexl.com/social-media-brand-analysis-guide-nodexlImage from Marketing Stats

  • The provenance of the data? How to get the data? How to build the graph from the collected data?
  • What is the overall structure of the social graph?
  • Who are the important people, or hubs, and communities in the network?

Dataset Preparation

ADROBLES2024 - /r/COVID has it's own chatroom! (If link doesn't work, check the sidebar.
mark1241 - Donald Trump Recovers From Covid-19, "Don't be afraid of COVID"
how_when_why_where - The White House’s Version of Contact Tracing
MarsupialElectrical8 - Coffin Dancers
The50centTourist - Does Anyone Else Think Trump Is Faking Covid?
Miniskrik - Trump says will leave hospital on Monday, "Don't be afraid of Covid."
Julie_Roys - Pastor Greg Laurie becomes the 12th person at the Rose Garden ceremony on Sept. 26 to test positive for COVID-19. Laurie also attended a prayer march the same day with the Vice President, Franklin Graham, and thousands of others.
White_Mlungu_Capital - What special treatment did Trump get to recover from covid so fast?
MickGhee - Trump Claims COVID Vaccine to be Released "Momentarily" in Latest Video
MrDrProfessorScience - Has anyone caught covid from food?
aeb526 - What were your first covid symptoms?
kaushiksridhar83 - “Lives or Livelihoods” – The social cost of COVID-19

Getting Started

Graph information

Nodes:
Node: ADROBLES2024
Node: mbizzer
Node: CyberBunnyHugger
Node: HnTPixelStudio
Node: OliverJones611
Node: Nata2211
Node: ShipAnchorMooClergy
Node: StricklyM3
Edges:
Edge: (Redditor(name='ADROBLES2024'), Redditor(name='mbizzer'))
Edge: (Redditor(name='ADROBLES2024'), Redditor(name='HnTPixelStudio'))
Edge: (Redditor(name='ADROBLES2024'), Redditor(name='OliverJones611'))
Edge: (Redditor(name='ADROBLES2024'), Redditor(name='Nata2211'))
Edge: (Redditor(name='ADROBLES2024'), Redditor(name='ShipAnchorMooClergy'))
Edge: (Redditor(name='ADROBLES2024'), Redditor(name='StricklyM3'))

DegreeView({Redditor(name='ADROBLES2024'): 9, Redditor(name='mbizzer'): 2, Redditor(name='CyberBunnyHugger'): 2, Redditor(name='HnTPixelStudio'): 1, Redditor(name='OliverJones611'): 1, Redditor(name='Nata2211'): 1, Redditor(name='ShipAnchorMooClergy'): 1, Redditor(name='StricklyM3'): 1, Redditor(name='Spore2012'): 1, Redditor(name='ejk8799'): 1, Redditor(name='mark1241'): 8,
... Redditor(name='routineawkward'): 2, Redditor(name='LaSage'): 1, Redditor(name='beelll'): 1, Redditor(name='BizKitten'): 1})

Graph Visualization with NetworkX

Visualization with random nodes and edgesVisualization with nx.draw_circularVisualize nodes with random colors

Community Detection

nx.write_graphml(g, "output.reddit.graphml", prettyprint=False)

Discussion and Conclusion

References