Recently David Muir of EdCompBlog was looking for a way to use Twitter as a personal response systems (also known as audience response systems, electronic voting systems, clickers …). I’ve previously covered this technology in DIY: A wi-fi student response system, where I propose a solution for creating a voting system which uses wireless enabled devices, so my ears immediately pricked up when I read David’s problem.
At the time David explored a number of solutions, including both free and fee paying, but was left scratching his head. Reading his post I immediately thought of Tony Hirst’s ‘Who’s Tweeting Our Hashtag?’ mashup where he uses Yahoo Pipes to find who’s been tweeting with a particular hashtag. This pipe calculates how many times an author tweets using a particular tag. Tony does an excellent job of explaining how the pipe is designed and modifying it for David required the smallest modification (changing the unique filter from item.author.uri to item.title).
My modified pipe is here. To use it the presenter would pose their question then ask students to tweet a specific hashtag followed by their response (e.g. #comp101 A). Once the responses are in running the pipe entering the hashtag gives a summary of responses (shown).
This pipe has the basic functionality of aggregating responses but having worked with voting systems for a number of years I know the best way to summaries the data so that the information can be conveyed and interpreted quickly is by graphing it.
Having previously used the Google Chart API I wanted to use this to create a graph of the data within the pipe. I found a couple of examples of existing pipes which already did this (including one by Tony Hirst), but couldn’t find a way to build the url required for Google Chart within the pipe. Knowing Tony had a lot more experience of pipes I chanced my luck and dropped him an email. Tony got back to me with some key suggestions. Firstly, I should consider processing the data outside the pipe, and secondly it would be easier to rename some of the items to make them easier to grab.
To process the data outside the pipe I had to use the ‘Web Service’ module. This is designed to push out the data in a JSON format so that it can be processed by an external website and passed back into the pipe, basically a black box.
Collecting the data and processing it was straight forward enough. I had lots of problems passing the data back to the pipe and my first attempts to re-encode the result as JSON failed (I think because of illegal characters in the Google Chart url). On the advice of Tony I tried passing it back as a RSS XML item which worked better. Pipes still had problems parsing the data, which I was able to definitely trace to the Google Chart url. This was easily solved by automatically converting the chart url into a tinyurl.
The code for my little black box is here (I’m not a professional programmer so I’m sure there is a lot of tiding up which can be done). Basically all it does is collect the data from pipes, creates a Google Chart url and then uses this to create a RSS item which is passed back to the pipe.
The final TwEVS Yahoo Pipe is here and I’ve also embedded a poll result below. So if you like TwEVS tweet ‘#twevspoll yes’ or if not ‘#twevspoll no’.
There are numerous ways you could pedagogically and technically use this pipe which are worth a separate post in their own right (something for next week). In the meantime I welcome any suggestions for improvements or any other general feedback (just use the comments link/box below).
BTW David ended up having a number of suggestions which he has followed up in Vote with Twitter. My thanks also go to Tony Hirst for his advice.