This repository contains code for the 21 Recipes for Mining Twitter (O'Reilly, 2011.) The code in this repository has been freshened to be compatible with Twitter's v1.1 API changes that affected nearly all of this book in mid-April 2013, but the text of the book has not been updated. If you benefit from the code in this repository, the best way to show your appreciation would be by liking the Mining the Social Web Facebook page, following @SocialWebMining on Twitter, and pre-ordering Mining the Social Web, 2nd Edition as soon as it's available. It's going to be a amazing book that will be a significant rewrite of the 1st Edition and will incorporate all of these recipes and many more in an expanded part of the book on Twitter.
Millions of public Twitter streams harbor a wealth of data, and once you mine them, you can gain some valuable insights. This short and concise book offers a collection of recipes to help you extract nuggets of Twitter information using easy-to-learn Python tools. Each recipe offers a discussion of how and why the solution works, so you can quickly adapt it to fit your particular needs. The recipes include techniques to:
- Use OAuth to access Twitter data
- Create and analyze graphs of retweet relationships
- Use the streaming API to harvest tweets in realtime
- Harvest and analyze friends and followers
- Discover friendship cliques
- Summarize webpages from short URLs
This book is a perfect companion to Mining the Social Web.
