Social Network Analysis with Python

A session at PyCon US 2012

Thursday 8th March, 2012

9:00am to 12:20pm (PST)

Social Network data permeates our world -- yet we often don't know what to do with it. In this tutorial, I will introduce both theory and practice of Social Network Analysis -- gathering, analyzing and visualizing data using Python and other open-source tools. I will walk the attendees through an entire project, from gathering and cleaning data to presenting results.

SNA techniques are derived from sociological and social-psychological theories and take into account the whole network (or, in case of very large networks such as Twitter -- a large segment of the network). Thus, we may arrive at results that may seem counter-intuitive -- e.g. that Justin Bieber (7.5 mil. followers) and Lady Gaga (7.2 mil. followers) have relatively little actual influence despite their celebrity status -- while a middle-of-the-road blogger with 30K followers is able to generate tweets that "go viral" and result in millions of impressions.

In this tutorial, we will conduct social network analysis of a real dataset, from gathering and cleaning data to analysis and visualization of results. We will use Python and a set of open-source libraries, including NetworkX, NumPy and Matplotlib.


  • Introduction. Why should we do this? What is the data like? Why is this different from other techniques? What can we learn?
  • Centralities: Degree, closeness, betweenness, PageRank, Klout Score
  • Beyond Klout Score: Finding communities of interest, finding clusters in networks
  • Information diffusion in networks -- how do things go viral?

About the speaker

This person is speaking at this event.
Maksim Tsvetovat

Social network analysis, agent-based modeling, artificial intelligence, machine learning, software engineering and jazz. Author of Social Networks for Startups bio from Twitter

Next session in D3

1:20pm Introduction to NLTK by Jacob Perkins

Coverage of this session

Sign in to add slides, notes or videos to this session

Tell your friends!


Time 9:00am12:20pm PST

Date Thu 8th March 2012

Short URL


Official session page


View the schedule



See something wrong?

Report an issue with this session