Your SlideShare is downloading. ×
Parsing real-time data using Twitter Streaming API
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Parsing real-time data using Twitter Streaming API

5,765

Published on

Published in: Technology, Business
0 Comments
5 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
5,765
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
62
Comments
0
Likes
5
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Parsing Real-time Tweets Ramanujam Parthasarathy Monetate @ramanujam http://github.com/ramanujamWednesday, May 30, 12
  • 2. Why? • Freely available public intelligence • News reaches twitter super fast and spreads • 250 million tweets per day (Oct ‘11) • Track keywords, sentiment analysis, data mining • Because you can!Wednesday, May 30, 12
  • 3. Twitter Streaming API https://stream.twitter.com/1/statuses/filter.jsonWednesday, May 30, 12
  • 4. Twitter Streaming API curl https://stream.twitter.com/1/ statuses/filter.json? track=SEARCH_PARAMETER - uUSERNAME:PASSWORDWednesday, May 30, 12
  • 5. Twitter Python Libraries • Tweepy • Python Oauth2 • Python Twitter • Twython • Twitty Twister • Tweetstream Use a library that has support for OauthWednesday, May 30, 12
  • 6. Get your auth keysWednesday, May 30, 12
  • 7. Basic keyword/hashtag tracking Set the keywords to track Print the status File: tracker.pyWednesday, May 30, 12
  • 8. Save to MongoDB Pymongo (http://api.mongodb.org/python/2.2/ index.html) is a recommended way to work with MongoDB from PythonWednesday, May 30, 12
  • 9. Plot some data Pie chart of the devices used by people who tweet about Obama and Romney File: plotapps.pyWednesday, May 30, 12
  • 10. Play some music #pugmusic http://tinysong.com/6OABWednesday, May 30, 12
  • 11. Play some music File: playmusic.pyWednesday, May 30, 12
  • 12. Enqueue more songs • Grooveshark javascript api • addSongsByID • window.Grooveshark.addSongsByID(13766524)Wednesday, May 30, 12
  • 13. Notify Twilio API to send a text or make a call based on an event trigger (eg: > 10 statuses in a 10 second window) setTerms = [$AAPL, down, 530] setTerms = [‘aws’, ‘down’] setTerms = [‘phillies’, ‘win’] File: sendtext.pyWednesday, May 30, 12
  • 14. Thank You! http://github.com/ramanujam/pugtalkWednesday, May 30, 12

×