Back to Blogs

Want to add a twitter tag cloud to your website? It is easy with Couchbase Server!

Don Pinto of Couchbase Published

Filter blogs by:

I’ve always been curious to learn what folks say about a new technology. Twitter is an excellent hub for this kind of information, but what are the important topics related to a new technology (say ‘NoSQL’) on Twitter? A tag-cloud is a great way of visualizing the important topics. Aside from the actual links themselves, which can be used to drill-down to get more information about a specific topic, tag clouds can also show how popular the different topics are (the bigger the text size of the topic, the more popular it is).

To discover what folks have been talking about on twitter and additionally to learn more about Couchbase, I thought that it would be cool to try something more hands-on with Couchbase Server and the web. After browsing through a few open source libraries in python for twitter, creating a simple Couchbase Server 2.0 view using mapreduce in javascript and putting together an html page to host the tag cloud, the twitter-couchbase project was born on GitHub.

So what does it take to build a tag cloud like this?

First, you need to download and install the latest Couchbase Server builds available here and create a simple view using javascript map and reduce functions. More information on how to create views using Couchbase Server 2.0 can be found here.

Next, clone the github project available here and modify the python script to set the twitter API credentials. Run the python script and watch new twitter tweets stream into a Couchbase Server database.

Finally, view the tagcloud using the webpage. Optionally, you can also use  jquery search if you wish to integrate a simple javascript based tag cloud text search feature to filter different topics in the tag cloud.

Simple isn't it ! Moral of the story? Adding a twitter tag cloud backed by Couchbase Server is simple. Enjoy!

«   Back to blogs