Friday, September 22, 2006

Latest Google Searches Gadget (beta)

Wouldn't it be cool to see what types of things people are searching for? Google have a projection of the current Google searches at the Googleplex (so I have read), so I thought it would be cool to make this into a Google Personalized Homepage widget. Again, it uses a PHP/MySQL backend, but a different AJAX technique. I wrote this as an inline gadget.

You can check out the webpage at http://search.gadgets.googlepages.com/. If you want to take it for a spin, click here: Add to Google. Only one catch: if you use the Gadget, your searches will also be recorded, but in a completely anonymous form. No personal information is recorded. None.

So I think that's about it for me and Google Gadgets. They are really fun, and a great idea! But this last Gadget will definitely kill my hosting! Good thing its a new month soon, so I will have some more bandwidth available!

I really want to enhance the Gadget to include some neat effects when it updates the queries, eg: a fade/fly-in effect for new queries. If there is enough interest in the Gadget then I will definitely improve it! I have written it in with the objective of usability and reducing the bandwidth load on my PHP server, so it is nothing fancy.

You can specify how often it updates (lowest to every 10s, again, for bandwidth reasons). If/when I make the improvements it will update in realtime and will look really cool.

I wish I worked for Google! I would have so much fun stuff to do in my 20% time!

Please email me any feedback, either good or bad. Unlike my previous gadget, this one doesn't require the XmlHttp object (rather, it dynamically creates script tags), so it should work with more browsers. This is still very beta, but it has been tested in Firefox 1.5 and Internet Explorer 6. I might just leave this as 'beta' for a while...It seams that might be a pre-requisite to working for Google! And nothing on a Google page is truly complete until you add that magic 4-letter word! :)

Thursday, September 21, 2006

Have Your Say! Google Gagdet

I decided to make a Google Personalized Homepage Gadget for some fun.

It is a very simple Gadget, it lets you post a message that other people using the gadget can see. I only records the last 5 or so posts. You can choose a nickname, an emoticon and it records your country. I also does some basic filtering to remove foul language.

To give it a go, click this button Add to Google to add it to your Google Personalized Homepage.

It is running on my development server, and I only have 200 MB bandwidth/month, with will not go far, so use it while you can! And if it disappears, wait until the start of next month! Sorry, but I am a poor student, and this is the best hosting I can afford at the moment!

It uses a PHP/MySQL backend, CSS/JavaScript (AJAX) client side. I hacked it together quickly, so there are probably some bugs. Sorry about that. For info, goto http://shout.gadgets.googlepages.com.

Monday, September 18, 2006

Global News Trends

I thought it would be interesting to globally map the news. So I developed a Java app to aggregate 16 news feeds for different regions in the world, and devised an algorithm to contextually rank the individual news articles, and then calculate a rank for each region. The news score (NS) was then normalized. A NS of -100 means very bad news, 100 means very good news, -10 means bad, 0 means roughly neutral etc. The more negative the number, the more negative the news.

Using these normalized values (in the range [0,1]), I wrote a Java Servlet to generated a colour-coded world map. Hovering over different regions display the region news statistics (AJAX client-side, Java servlet and daemon server-side). The results were quite interesting. The data is generated every 10 minutes.

The scale at the bottom of the image is interpreted as: blue=really good news, red=really bad news, pink = neutral news.

I used the Yahoo! RSS news feed (since Google sadly doesn't supply one yet) and a small database I developed of positive and negative words. Eg: war's negative, peace is positive.

Below is a pretty picture showing the map.