talideon.com

Fnord

June 20, 2006 at 4:58AM Dáil visualisation a go-go!

Yes kids, now you too can see the changing face of the Irish political landscape proceed faster than its usual glacial pace! After Damien’s lazyweb plea for an applet to visualise the representation of the various political parties in Dáil Éireann, i set to work hacking together some code to do just that. It’s online now for those of you who want a look.

It’s a bit ugly right now, but now that it’s functional, I can think about a nicer way of visualising the data. The data itself is available for download here in the from of a Java .properties file and I’ll make the source available once it’s in a state where I’m not cringing at the very thought of anybody else looking at it.

Updates

On Seamus’s suggestion, I made the background of the visualisation white and shifted the controls to the bottom. Damien suggested adding the slideshow button too. There’s a one second delay on each frame. The underlying code’s a lot better too, but I have to divvy up the actual visualisation code ‘cause right now it’s all just a big ball of mud.

And it’s now internationalised too.

And it now works properly in IE (having found a workaround) too and I abandoned the <applet/> tag for <object/> so it validates now. Stupid IE.

<linkwhore>Plugs will be greatfully accepted.</linkwhore> [smile]

2006-06-25: For all practical purposes, the applet is complete. Here’s a list of the changes made:

Ciaran mentioned below in the comments that some of the data is inaccurate. I’m going to look through the file again and correct whichever bits he mentioned.

Technorati Search Technorati Search Irish Bloggers

Comments

1 On June 20, 2006 at 9:28, Daniel wrote:

Keith, this is the first thing you have ever written in the 6 or so years I know you that actually made me go wow. Not only have you selected the correct language to write it in (instead of using something like Ajax), I actually like the simplicity of the user interface and the overall visualisation is very user friendly and apt. Well done! PS: Put up a tech post on the development of the applet. What you went through in the development process, tools used, the methods used to grab the xml etc

2 On June 20, 2006 at 10:46, Daniel wrote:

Ok, small edit to the above...forget the xml bit as I see on further inspection you used a .properties file.

3 On June 20, 2006 at 14:37, Topper wrote:

I concur Keith - you actually did something rather than just talk about it :p Only mesin’ bud - great work.

4 On June 20, 2006 at 20:31, Keith wrote:

As it happens, the applet is in part a dry run of the game I said I’d write for the TCAL guys to try out things like Java2D, effective double-buffering, and to refamiliarise myself with what stuff works in Java 1.3 and what doesn’t. So there!

5 On June 21, 2006 at 8:08, Damien Mulley wrote:

That looks really good now. Nice one.

6 On June 22, 2006 at 22:53, potato wrote:

That’s pretty cool. I’d suggest an option of running it as a timelapse. It would also be nice if the bars were somehow kept relatively consistent to visually demonstrate increases/decreases in support e.g. the FF bar flips from left to right between various Dails.

7 On June 23, 2006 at 1:43, Keith wrote:

When I finish what I’m working on right now, it’ll have two extra graphs. I’m reworking the graph itself so that it’s rendered as a half-doughnut.

The graph you see right now is a representation of the Dail seats as allocated, with government parties on the left and oppostion parties on the right, hence the flipping (and it’s not just FF!) Beside it will be a representation that will keep a consistent if arbitrary order, so FF might appear on the right, then FG, then Labour, then the PDs, then the Greens, and so on, with Independents/Others appearing on the right.

Whether these will be rendered in proportion to the number of seat or the percentage of seats, I’m not sure yet. I might make it an option.

However, the real improvement I’m working on is a graph showing the gains and losses of each party between each election (well, government for now for esoteric technical reasons, damned Rainbow government!) That’ll probably be more useful than either of the other two graphs.

8 On June 23, 2006 at 14:29, Adam wrote:

Looks great Keith; well done.

Would be great to see the coloured bar remain the same size (as has been mentioned already) but other than that it works great; well done again.

9 On June 23, 2006 at 15:04, Keith wrote:

Ok, I’m going to check an older version of the code out of my Subversion repository and patch it to keep the bar the same width at all times. I’ll upload it in a few minutes...

10 On June 23, 2006 at 16:04, Keith wrote:

Ok, tweaked. It jumps around a little due to rounding errors, but it’ll do for now till I get the new graphs done.

11 On June 24, 2006 at 9:22, Ciaran Quinn wrote:

Nice applet!

If you are looking for ideas, there is an example of a similar applet for German elections at election.de - click on Bundestagswahl and then on Historie [JAVA]. You don’t need any German to understand it.

I have a few applets at guthanphobail.net to display and predict Irish election results - I had been thinking of doing something similar.

There are a few elections where the results need to be fixed up - eg 1923, 1927 (Sept), 1943.

12 On June 27, 2006 at 5:03, Keith wrote:

Thanks Ciaran! I stumbled across Guthan Phobail a while back. Poor as my Irish is, I was quite impressed with it.

For me, part of the point behind the applet was because it would be useful on Vocal Voter once the data we have is all processed. Thanks for the links: something like that for the constituencies might be worth implementing if I can get ahold of the appropriate geographical data.

And I fixed those errors. I’d caught some of them before, but I’d expected I’d missed a few.

Post a comment

All form information is optional, but it’s a good idea to fill in your name and email address if you want me to take your comment seriously.

Spammers, don’t bother posting crap down here. The site is set up so that legitimate search engines (Google, for instance) won’t index pages with comments on them. Posting crud here only means you’re wasting my time and patience. Shoo!

Real names, please. Please include!
Won’t be displayed. Please include!
Displayed, if present.