Andreas Weigend, Social Data Revolution | MS&E 237, Stanford University, Spring 2011 | Syllabus

I'm getting an error trying to import twitter_util and/or twitter_login, what's going on?

These two files, twitter_util and twitter_login, are files that the author of the text wrote which wrap around various friend/follower getting methods that he uses frequently throughout the chapter (hence it made sense to just write those functions into files which can be imported when building future scripts). Please see pg. 92 of the book for details, and also where you can download those files if you really wish to use them in your code.

What happens if I need an extension on an assignment?

As Andreas mentioned in class at the beginning of the quarter, each student will have 3 late days that they can use on any of the assignments/dogfoods. Because of this, no personal extensions will be granted (unless we decide to extend the deadline of the assignment in general).

Where do I find the assignments on the course wiki?

They are all on the left hand side navigation bar - if you can't see them, trying clicking "see more".

Can I take this class for less than 3 units?

Unfortunately you cannot. I spoke to the department about this, and this class can only be offered for 3 units.

I am not registered yet, what do I do?

  • Register on Axess so that you'll receive future emails we send out to the class list that Axess provides.
  • Submit ASAP your answers to

If you have any problems, email the Course Assistant at

What level of programming is required?

For those who are familiar with Stanford CS courses, we would recommend a working knowledge of CS106A, 106B, and preferably 107. Many of the assignments will be done in Python, and so knowledge of Python (or any scripting language, even MATLAB or R) would definitely help. Also, many of the "programming" aspects to this class will involve working with APIs from different companies and being able to know enough code to successfully query for data using those APIs.

For those who are still unsure, we would recommend using the first assignment as a gauge. If you find yourself struggling immensely with it then this might be an indicator for how much trouble you will have with the other homeworks. However if you are able to complete it within a reasonable amount of time and with a reasonable amount of effort then you should be fine.

Is there a textbook?

The book Mining the Social Web is needed for some of the homeworks. E.g., for Homework 1, read Chapters 1 and 2 and focus especially on the Twitter-Python API section of Chapter 1, and also the web-scraping examples of Chapter 2.