Subscribe via RSS

Tuesday, October 20, 2009

CIS 8020 Assignment 2 [PC] [Twitter check]

| |

Scenario:
A company wants to monitor trends of their brand on the internet. To do so, they monitor Twitter for words, and will keep records of what words are being used in tweets that are referencing their brand. Over time, they will be able to see a rough map of what words were associated with the brand over time.

How:
They will do this by using Google Chart's API with data coming from Twitter's API.

Implementation:





Words used in tweets for:






Explanation:
  • Uses Google's AJAX Libraries API to load the Prototype javascript framework from google's massive content delivery network.
  • Uses Prototype to load the twitter search API. The format requested to the RESTful API is JSON, so it is automatically evaluated as a javascript data structure.
  • Uses the porter stemming algorithm (ported to javascript) to get the root of each word, compare them to other words, and keep tallies of how often each root word is used.
  • Uses Google Charts API to display data.
  • Specifically designed to be one file.


Note:
Only tested in firefox 3.5 on Ubuntu (shiretoko)
It is possible that this will not work in other browsers, as this requires a form of Cross Site Scripting, which has only been recently re-enabled on the web.

Original Source: http://dl.getdropbox.com/u/1078297/mashup.html

4 comments:

phillc said...

Works on firefox 3.5 and safari on mac as well.

jesspanda said...

Works in Chrome.

phillc said...

One thing that sucks about pulling live data, is that I don't control it.

If you are looking at this right this very minute, you will see that it is not working. (There is supposed to be a google pie chart displaying the top 10 words used)

If you are seeing what I see, some data I hadn't seen before had made its way in... so some punctuation has broken the chart. That being said, maybe I'll fix it this weekend...

Michael Morgan said...

This is excellent - I see some user names and passwords in this twitter list, along with a couple of student IDs. Always love to see people tweet user names and passwords, and general neglect for security. Nice post.

Post a Comment