Treemapping Council Committees Using OpenlyLocal Data

Some time ago, I started exploring how treemap representations might be used to provide a quick overview of the make-up of the membership of local council committees (Glanceable Committee Memberships with Treemaps).

Following a lazyweb request to @countculture about expressing complete council committee membership data from Openly Local (Topical Versions of Local Council Websites… Give Us the Data and We’ll Work It For You), and the rapid fulfilment of that request ;-), here’s a proof of concept about how to use that data to power a treemap from the Javascript InfoViz Toolkit (JIT) to provide a glanceable display of the make-up of Isle of WIght Council committees, colour coded by party:

Council cttee treemap

Each committee is represented as follows:

{children: [
 {children: [],
  data: {
   $area: "3", $pcolor: "purple",members:"Jonathan Francis Bacon, Paul Fuller, Heather Humby, "}, id :"ccl12_0", name: "Independent"
 },
 {
  children: [],
  data: {
   $area: "5", $pcolor: "blue",members:"Ivan Bulwer, Susan Jane Scoccia, Albert Taylor, Jerry White, David G Williams, "},
   id :"ccl12_1",
   name: "Conservative"},
{
  children: [],
  data: {
   $area: "1", $pcolor: "darkorange",members:"Colin Richards, "},
   id :"ccl12_2",
   name: "Liberal-Democrat Group"}
], data: {$area: 9}, id: "ccl12", name: "Licensing and General Purposes Committee"}

With another quick bash at the code, I should be able generate these views on the fly from the JSON data feeds provided on the OpenlyLocal site. (At the moment, the route I take to generate the Javscript object that powers the treemap is a really clunky one:-(

What never ceases to amaze me, though, is how a tweak from one representation of a dataset (that is, the JSON data published by OpenlyLocal), to another (the JIT treemap representation) allows the creation of interactive visuliastions as if by magic :-)

If you want to play with your own treemaps in the meantime, this bit of Javascript will produce a simple representation of committee. member and party data that can be visualised within Many Eyes WIkified:

for (var i=0;i< c.committees.length;i++){
  for (var j=0;j< c.committees[i].members.length; j++){
  	document.write("\""+c.committees[i].title.replace("&", "and")+"\""+","+"\""+c.committees[i].members[j]["first_name"]+" "+c.committees[i].members[j]["last_name"]+"\""+","+"\""+c.committees[i].members[j]["party"]+"\""+"<br/>");
  }
}

(where c is the javascript object that is published as the JSON feed from a committee page on OpenlyLocal, such as this one for the Isle of Wight).

Here’s an example:

Whilst this treemap doesn’t allow you to fix the colours in the way that the JIT component does:

TM.Squarified.implement({  
   'setColor': function(json) {  
     return json.data.$pcolor; 
   }  
 });

($pcolor is a variable I set for each committee member saying what colour should be displayed for them…), the Many Eyes Wikified does allow you to manipulate the tree representation that powers the treemap, e.g. by reordering the way in which the different elements are displayed:

What I really need now is a way of creating the hierarchical JIT objects on the fly from a table based representation… Hmmm….

Author: Tony Hirst

I'm a Senior Lecturer at The Open University, with an interest in #opendata policy and practice, as well as general web tinkering...

7 thoughts on “Treemapping Council Committees Using OpenlyLocal Data”

  1. Interested in your visualisation of council committee memberships. Usually you’d expect party representation on the committees to be roughly proportional to the overall council makeup. So it is interesting to see where there might be differences to what you’d expect

    Many councils will also have lists of allowed substitutes for each committee. So who actually attends isn’t necessarily the same as who is on the Committee e.g. look at the Agenda here http://committeepapers.barnet.gov.uk/democracy/meetings/meetingdetail.asp?MeetingID=5702

    It would be interesting to see a comparison between the expected and actual committee makeup/attendance. But that would probably mean wading through the published committee papers. Unless any councils publish the attendance details in a usable form?

    1. I just posted about the next step (generating the treemaps from “live” Openlylocal data) here:
      https://ouseful.wordpress.com/2010/02/27/some-of-my-dev8d-tinkerings-cross-domain-json-with-jquery-and-council-committee-treemaps-from-openlylocal/
      For the next pass, (next few days) I’ll do a version of the page that can be easily put into an iframe so it can be embedded on a web page (if your publishing system supports user-pasted iframes, that is; which things like WordPress.com hosted blogs don’t:-(

      A wordpress plugin might be an idea though… are you volunteering?;-)

Comments are closed.