On government organograms and RDF files (includes free WordPress plugin!)

There was an initial buzz of excitement yesterday, at the launch of the new data.gov.uk interactive organograms… and then, by teatime, a bit of a backlash. I can see both sides myself. Yes, it’s a very cool rendering of potentially quite dull data, and it’s nice to see it done in javascript (jQuery) rather than Flash… but it’s actually a bit fiddly to navigate through. That isn’t to understate the significance of the achievement, though: such a coordinated leap forward, in both technical and bureaucratic terms, is no small task. And there’s so much to it, most of which is beyond me, that I can’t begin to explain it in depth. Hopefully someone else will oblige.

As part of the initiative, departments have been instructed to upload raw RDF files to their websites, from which the organograms can be generated… which caused a bit of a problem for one of our clients. But it’s a problem we’re happily able to solve.

The Wales Office was the first Ministerial department to move everything over to WordPress, back in early 2008; and they’ve been running very happily on it ever since. About a year ago, we helped them build a new Transparency section, which acts as a download area for (mostly) Word and CSV files. It’s all rendered via a custom page template, and managed via the standard WordPress ‘media library’ functionality. Unspectacular perhaps, but quick and easy for all concerned.

However – when they tried to upload an RDF file, they couldn’t. WordPress has a surprisingly long list of file types it’s prepared to let you upload (look for get_allowed_mime_types() in wp-includes/functions.php): but RDF isn’t on it. So it throws up an error message like this:

We could upload it as a zip file, which would have the added benefit of reducing the file size by 90-odd per cent… but then the orgchart generator wouldn’t be able to process it. Dilemma.

But as ever with WordPress, there’s a happy ending to the story. We – by which I specifically mean my technical partner, Mr Wheatley – were able to write a quick plugin to ‘hook’ on to approved filetype list, and stick RDF on the end. Problem solved, file uploaded, everyone happy. You can see the successfully uploaded file here.

And given that there are a good number of government departments running WordPress sites, including at least one other using WordPress specifically for its transparency information, we thought we’d do the decent thing, and offer it up for others to download. Here you go. There’s no configuration interface needed; just upload it, activate it, and start chucking up RDF files to your heart’s content.