Monday, June 26, 2006

News boxes.

Another project I spent some time on, about a year ago now, with significant amounts of help from Richard Pope, is some way of easily putting democracy news onto webpages. Think googleads, but for local democracy information.


Behind the scenes, it again uses the TheGovernmentSays.com model, of pulling in RSS feeds and then spitting them out of the database. Instead of aiming at big webpages and sites, it is targetted at small fragments of html. You visit the site, enter your postcode, pick which information you want included (based on your postcode, it tells you who your mp is and localises what you see), then you get given a fragment of html to paste into your webpages. That's it.

Whenever someone looks at your website after inclusion of the fragment, they get the latest democracy news for your area, what your mp has been doing, saying, and what pledgebank pledges are happening in your area. We hope to add more sources of information over time, but this is what we're starting with (as the information is easily accessible).

While this implementation is focussed on democracy, there is very little which is tied to democracy. It could be reused for any area of interest where there are multiple feeds of interest which need aggregation, in a simple fashion.

Over time, an enhancement could be to, where a browser has an override cookie, show information local to the browser itself, rather than to the website owner. But that's going to be left as an exercise for the reader.

mySociety panopticon / rss aggregator

Something that I've recently built, but isn't quite live (at time of writing) is the mysociety panopticon - which is just a web based rss aggregator with a fancy name. See http://panopticon.mysociety.org/

mySociety and it's sites get a large number of mentions in many places around the web. The panopticon uses google blogs and other search to pick up where they get mentioned and stores them all. The new panopticon (replacing one based on drupal by John Handelaar) is in the panopticon directory of mysociety cvs, and should be pretty easy to reuse if you wish to do so (see the README in the cvs directory for the simple instructions).

It's heavily based on the code used for displaying thegovernmentsays.com, extended to cope with topics (e.g. pledgebank, theyworkforyou) which entries are tagged with based on the feed that they come in through. Multiple feeds can use the same tag to put entries into categories.

TheGovernmentSays.com server updates

After being hosted on the end of my ADSL line for the last few months, TheGovernmentSays.com has moved to a large shiny new server as part of the "mysociety friends and family" projects.

Various other projects will land there shortly, but it does mean that TGS now has reliable hosting. Apologies to those who have been affected by the problems caused by me moving house and the fan falling off the cpu of the box that previously hosted it.

One of the benefits of this is that we can much more easily scale up the processing. A single fetch/process/update cycle for TGS used to be about 30 minutes. And since we rerun the process every hour early in the mornings, that was about the limit.

You may have noticed from the vast numbers of posts today that I've added in all of the missing major departments (about 30 new feeds were added today). I have another 40 or 50 to add when the next major feature arrives - which is versions of TGS for each of the regions (and Wales, Scotland and Northern Ireland). Various bits of stuff will be added over the next few weeks and months, but hopefully it'll be all done by the end of the summer.