Assignment 2: Real-world text in another language
Due Thursday, February 23

Your task

  • Find text in a language you don't understand on Twitter. Maybe surrounding a particular term, or maybe just by searching for common words in that language.
  • Come up with a definition of what would constitute a "trending topic".
  • Collect Twitter data on multiple different days, so you have a basis for finding a trending topic.
  • Choose such a trending topic. What does it mean?
  • What are the words that appear particularly frequently along with this topic? Use the tools you've learned so far to answer this question.

The tweetstream module makes it relatively easy to access the Twitter API from Python. See the tweetstream documentation.

Assignment guidelines

  • The assignment is due on Thursday, February 23.
  • What you should turn in consists of code and a brief writeup describing what you did.
  • It's okay to get advice from other people, but the code in this assignment should be code you wrote yourself.
  • Some helpful background appears in chapter 3 of the book.
  • Turn in the assignment by e-mailing it to You can do this in one of two ways:
    • Make a zip file of your code, writeup, and any supporting materials you need, and attach the zip file in the e-mail.
    • Or put up the writeup as a Web page, linking to the code and any supporting materials, and e-mail a link to the page.