Lesson on Twitter Network and Sentiment Analysis

Here is a lesson I gave at the CUNY Graduate Center on Twitter Network Analysis and Sentiment Analysis.

It is an interactive introductory lesson that covers the following topics:

  1. Very short introduction to Python/Jupyter/NumPy and matplotlib,
  2. Tweet collection using the Twitter Streaming API (using tweepy),
  3. Creation and analysis of the network of interactions between Twitter users (using networkx),
  4. Basics of supervised machine learning classification,
  5. Sentiment analysis applied to the Twitter interaction network (using scikit-learn).

I made it using Jupyter notebooks. You can see it directly on github or download the files and run/edit them on your machine. You need to have python3 installed with Anaconda.

And here is what you should get at the end:

Twitter Network