January 24, 2008

YUI Sortable Data Tables

I've been meaning to hava play with the YUI Library data tables for some time, so I had a quick play just now to see how easy it was to style a legacy HTML data table - and it's trivial.

I scraped together a table showing the budgets of Isle of Wight Primary schools (using data found on the eduwight website, specifically), along with their fate under each of the three options the Isle of Wight Council has slated for them in the current schools reorganisation plan, to go along with the Google maps view of Proposed School Closure Plans on the Isle of Wight.

2008-01-24_0207

You can find the table at Table of Primary School Budgets. Click on the heading of any table to sort the table on that column (either increasing or decreasing - just keep clicking;-)

All I had to do to make the table sortable was include the YUI datatable libraries, and a handful lines of code in the page containing a simple HTML marked up table.

As it uses YUI components, I'm hoping that it'll work on all browsers:-)

The next thing I want to try out is Automatic conversion from simple, accessible data tables to YUI Charts, which does exactly what it says on the tin - it generates a YUI chart from a data table, automagically...

...but I'm not sure that the school budget data would really make sense viewed that way, so I won't try it with that data just now...(plus it's late, and I really should go to bed!)

PS though I'm sure there's nothing in this, a quick tally of cost savings (using the figures I found) and child places lost (according to 2007 attendance figures) are as follows: option 1: (10,424,081, and 3186 places), option 2: (15,488,947, and 4727 places), option 3: (10,530,348, and 3164 places).

Blogged with Flock

Tags: ,

Posted by ajh59 at January 24, 2008 02:15 AM
Comments