Twitter + voting/polling + Yahoo Pipes = TwEVS (The Making Of)

Flickr Tag Error: Call to display photo '3859791831' failed.

Error state follows:

  • stat: fail
  • code: 1
  • message: Photo "3859791831" not found (invalid ID)

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).

imageMy 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.

6 Responses to “Twitter + voting/polling + Yahoo Pipes = TwEVS (The Making Of)”


  • Brilliant! A couple of sneaky tricks and you’ve created a working Twitter polling tool. I thought that turning the URL of the feed into a tiny.url equivalent (to avoid awkward characters) was a particularly brilliant idea!

    I’ll certainly be giving it a go with some students soon and I’ll let you know how it goes.

  • Hi David - thanks again for the inspiration! Interested to hear how you get on using it with students. One of the things I haven’t had a chance to test is how quickly the graphs are updated.

  • I had a test the other day and it was disappointingly slow. Twitter Search picks it up more or less immediately. However, the pipe took over thirty minutes. :-( Not sure why. Something to do with the Twitter Search APIs? Do they deliberately limit how fast things are transferred?

  • I was worried about how long yahoo pipes would take to refresh. Basically Yahoo caches the pipes results (probably refreshing them every 30-60minutes). You appear to be able to force the pipe to refresh by changing one of the input variables. You obviously want to keep the ‘search term’ the same, but if you change the ‘limit responses’ then rerun the pipe it will look for new data. If you get a chance let me know if this works for you.

    Martin

  • Any update on this issue or you guys left it there?
    Just wondering as i was going to venture into doing this my self - of course the inspiration is from you guys and Tony Hirst :)
    Manish

  • I recently coded the pipe directly into PHP. This gives more control over caching. The code is here (using the SimplePie library and you can see it in action here . Lots of angles you could go in: different chart types, recording results etc

Leave a Reply

About

This blog is authored by Martin Hawksey e-Learning Advisor (Higher Education) at the JISC RSC Scotland N&E.

JISC RSC Scotland North & East logo

If you would like to subscribe to my monthly digest please enter your email address in the box below (other ways are available to subscribe from the button below):

Subscribe to MASHe to monthly email updates

Loading...Loading...


The MASHezine (tabloid)

It's back! A tabloid edition of the latest posts in PDF format (complete with QR Codes). Click here to view the MASHezine

Preview powered by:
Bluga.net Webthumb

The MASHezine (eBook)

MASHe is also available in ebook and can be downloaded in the following formats:

Visit feedbooks.com to manage your subscription

Archives

Opinions expressed in this blog are not necessarily those of the JISC RSC Scotland North & East.

JISC Advance Logo

JISC Advance is a new organisation that brings together the collective expertise of established JISC services:

For further information visit www.jiscadvance.ac.uk

Creative Commons Licence
Unless otherwise stated this work is licensed under a Creative Commons Attribution-ShareAlike 2.5 UK: Scotland License