O'Reilly logo

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

21 Recipes for Mining Twitter

Book Description

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 O’Reilly's Mining the Social Web.

Table of Contents

  1. Preface
    1. Introduction
    2. Conventions Used in This Book
    3. Using Code Examples
    4. Safari® Books Online
    5. How to Contact Us
  2. 1. The Recipes
    1. Using OAuth to Access Twitter APIs
      1. Problem
      2. Solution
      3. Discussion
      4. See Also
    2. Looking Up the Trending Topics
      1. Problem
      2. Solution
      3. Discussion
      4. See Also
    3. Extracting Tweet Entities
      1. Problem
      2. Solution
      3. Discussion
      4. See Also
    4. Searching for Tweets
      1. Problem
      2. Solution
      3. Discussion
      4. See Also
    5. Extracting a Retweet’s Origins
      1. Problem
      2. Solution
      3. Discussion
      4. See Also
    6. Creating a Graph of Retweet Relationships
      1. Problem
      2. Solution
      3. Discussion
    7. Visualizing a Graph of Retweet Relationships
      1. Problem
      2. Solution
      3. Discussion
      4. See Also
    8. Capturing Tweets in Real-time with the Streaming API
      1. Problem
      2. Solution
      3. Discussion
      4. See Also
    9. Making Robust Twitter Requests
      1. Problem
      2. Solution
      3. Discussion
      4. See Also
    10. Harvesting Tweets
      1. Problem
      2. Solution
      3. Discussion
      4. See Also
    11. Creating a Tag Cloud from Tweet Entities
      1. Problem
      2. Solution
      3. Discussion
      4. See Also
    12. Summarizing Link Targets
      1. Problem
      2. Solution
      3. Discussion
    13. Harvesting Friends and Followers
      1. Problem
      2. Solution
      3. Discussion
      4. See Also
    14. Performing Setwise Operations on Friendship Data
      1. Problem
      2. Solution
      3. Discussion
    15. Resolving User Profile Information
      1. Problem
      2. Solution
      3. Discussion
      4. See Also
    16. Crawling Followers to Approximate Potential Influence
      1. Problem
      2. Solution
      3. Discussion
    17. Analyzing Friendship Relationships such as Friends of Friends
      1. Problem
      2. Solution
      3. Discussion
    18. Analyzing Friendship Cliques
      1. Problem
      2. Solution
      3. Discussion
      4. See Also
    19. Analyzing the Authors of Tweets that Appear in Search Results
      1. Problem
      2. Solution
      3. Discussion
    20. Visualizing Geodata with a Dorling Cartogram
      1. Problem
      2. Solution
      3. Discussion
    21. Geocoding Locations from Profiles (or Elsewhere)
      1. Problem
      2. Solution
      3. Discussion
  3. About the Author
  4. Copyright