Search.twitter.com’s “trending topics” algorithm

algorithmsearchtrendingtwitter

What algorithm does twitter use to determine the 10 topics that you can see at search.twitter.com? I would like to implement that algorithm and I would also like to show the 50 most popular topics (instead of 10). Can you describe the most efficient algorithm?

Thanks!

(Twitters API can be found at- http://apiwiki.twitter.com/REST%20API%20Documentation)

Also, I would like to be able to implement the algorithm by searching through the public timeline- http://twitter.com/statuses/public_timeline.rss

Best Solution

Twitter's trending algorithm is not just volume of keywords. That's part of it, but there's also a decay factor so that "justin beiber" isn't top trending forever.

This post on quora backs this up. http://www.quora.com/Trending-Topics-Twitter/What-is-the-basis-of-Twitters-current-Trending-Topics-algorithm?q=trending+algorithm

decay is typically done by using the relative age of the post in the algorithm, giving more weight to newer topics/posts/etc.

see also http://www.quora.com/What-tools-algorithms-or-data-structures-would-you-use-to-build-a-Trending-Topics-algorithm-for-a-high-velocity-stream?q=trending+algorithm