Pezholio

06 Sep, 2010

First steps to councils publishing their own linked data

Posted by: Pez In: Council Stuff|Open Data

On Friday, I toddled along to London for a bit of a chat about local spending data, organised by LeGSB, the local government e-Standards body. In particular we looked at how councils can publish their spending data in a linked data format. It was an interesting day, and much of the work seems to have already been done by folks much cleverer than myself.

However, at the end of the day, Paul Davidson (the Director of Standards at LeGSB) raised an interesting topic. At the moment, much of the describing of councils in the linked data world seems to be done by external bodies, such as The Office for National Statistics and Ordnance Survey, and often, this isn’t always the best fit, with the data referring to geographical regions, rather than councils themselves.

Paul then made the point that really, it should be the councils themselves that describe who they are, rather than some arbitrary body, after all, there is no one better placed to know about the council than the council themselves! We then talked very briefly about the possibility of councils minting their own URIs and publishing some RDF with some information about themselves (such as contact details etc). Other organisations and people can then use these URIs to refer to the councils in their data.

I’ve been mulling this over over the weekend, and I fired off an email this morning suggesting that, rather than publishing a page of RDF, people simply add data to their council homepages, either as RDFa or metadata (although I’m not sure how you’d do the latter!). People could then use their council homepage URLs as URIs (perhaps with #id at the end of the URI, to make the URI for the council different to the one for the page).

With this in mind I’ve knocked up a sample dataset for Lichfield District Council using various ontologies from around the linked data web (including FOAF, vCard, Chris Taggart’s Openly Local ontology and a bit of the Organizational (sic) Ontology). I’ve also sameAsed to the National Statistics Dataset, Openly Local and DBpedia:


<?xml version="1.0"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:skos="http://www.w3.org/2004/02/skos/core#"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
xmlns:owl="http://www.w3.org/2002/07/owl#"
xmlns:foaf="http://xmlns.com/foaf/0.1/"
xmlns:dct="http://purl.org/dc/terms/"
xmlns:vcard="http://www.w3.org/2006/vcard/ns#"
xmlns:administrative-geography="http://statistics.data.gov.uk/def/administrative-geography/"
xmlns:openlylocal="http://openlylocal.com/info/vocab#"
xmlns:org="http://www.w3.org/ns/org#">
<rdf:Description rdf:about="http://www.lichfielddc.gov.uk/#id">
<rdfs:label>Lichfield District Council</rdfs:label>
<vcard:organisation-name>Lichfield District Council</vcard:organisation-name>
<rdf:type rdf:resource="http://openlylocal.com/info/vocab#DistrictAuthority"/>
<rdf:type rdf:resource="http://www.w3.org/ns/org#FormalOrganization"/>
<skos:notation rdf:datatype="http://statistics.data.gov.uk/def/administrative-geography//StandardCode">41UD</skos:notation>
<foaf:mbox>mailto:enquiries@lichfielddc.gov.uk</foaf:mbox>
<foaf:homepage rdf:resource="http://www.lichfielddc.gov.uk"/>
<foaf:phone rdf:resource="tel:+44-1543-308999"/>
<foaf:holdsAccount>
<foaf:OnlineAccount rdf:about="http://twitter.com/Lichfield_DC">
<foaf:accountServiceHomepage rdf:resource="http://twitter.com/"/>
<foaf:accountName>Lichfield_DC</foaf:accountName>
</foaf:OnlineAccount>
</foaf:holdsAccount>
<foaf:holdsAccount>
<foaf:OnlineAccount rdf:about="http://www.facebook.com/lichfielddc">
<foaf:accountServiceHomepage rdf:resource="http://www.facebook.com/"/>
<foaf:accountName>Lichfield District Council</foaf:accountName>
</foaf:OnlineAccount>
</foaf:holdsAccount>
<vcard:ADR rdf:parseType="Resource">
<vcard:Extadd>District Council House, Frog Lane, Lichfield WS13 6YY</vcard:Extadd>
<vcard:Country>England</vcard:Country>
<vcard:postal-code rdf:resource="http://www.uk-postcodes.com/postcode/WS136YY.rdf" />
</vcard:ADR>
<administrative-geography:coverage rdf:resource="http://data.ordnancesurvey.co.uk/id/7000000000014797"/>
<owl:sameAs rdf:resource="http://statistics.data.gov.uk/doc/local-authority/41UD"/>
<owl:sameAs rdf:resource="http://openlylocal.com/councils/156.rdf"/>
<owl:sameAs rdf:resource="http://dbpedia.org/resource/Lichfield_%28district%29"/>
</rdf:Description>
</rdf:RDF>

It’s not perfect, but it’s a start, there’s 24 triples there and I’m sure there could be more. Only problem is, I’m not a linked data expert, so I’m looking for a bit of feedback both on what I’ve done, but also what I could add – For example, I could add the chief executive and leader of the council – but I’m not sure how I’d do it!

Feedback from non-linked data experts is welcome too – especially those at the coal face of local gov – if there was a step by step guide to doing this, could you do it? (i.e. have you got access to add metadata to your homepage) and, more importantly, would you do it?

UPDATE I’ve now published the final(ish) version at http://www.lichfielddc.gov.uk/lichfield.rdf, with a rel=’alternate’ meta link on the Lichfield homepage. I’ve also reused the reference.data.gov.uk ontology to show the councils CEO, leader etc, together with a bit of FOAF for their contact details.

Thanks to Jeni Tennison, Leigh Dodds and Dave Reynolds for helping me to get this far, and hopefully we can encourage more councils to do the same!

27 Responses to "First steps to councils publishing their own linked data"

1 | Andrew Beeken

September 6th, 2010 at 12:34 pm

Avatar

Now that is very cool and something that I can see being fairly straightforward for most councils to implement if they have access to any kind of HTML area on their homepage (I’m assuming it doesn’t need to sit in the header).

One further thing – could it sit in, say, the sites footer so that it is accessible from every page? Or could this potentially cause conflicts if you were trying to post other RDFa information in the markup?

2 | Pez

September 6th, 2010 at 12:43 pm

Avatar

If it’s metadata, it will need to sit in the header, but if it’s RDFa then it won’t.

Only problem with RDFa is that, without changing the doctype, RDFa tends to make pages invalid, particularly with XHTML, so if you’re the kind of person who cares deeply about validation (personally I’m agnostic, as long as the page validates in the main, I’m not going to worry about a few invalid attributes, but that’s a discussion for another day) then you might have an issue.

That being said, I don’t see why you couldn’t have the RDFa on every page. That way you’re adding value by using RDFa in a similar way to microformats.

3 | Andrew Beeken

September 6th, 2010 at 1:11 pm

Avatar

Another idea, for councils who couldn’t manage these for themselves, could be a service that creates a page for a given council. Sign up and validate with a .gov.uk email addy so that we know you’re from a council, complete the form and you have a unique URL (i.e. http://councilmeta.org/cityoflincoln) that you could refer to. Could work? Would be very straightforward to implement…

4 | Pez

September 6th, 2010 at 2:17 pm

Avatar

Aye, it could, but the real benefit here comes from the councils publishing the data themselves on their own domain. The first part of your suggestion would be a good idea, it could then generate some RDF which you could download or copy and paste and then host on a .gov.uk domain. Would certainly take some of the pain out.

5 | Chris Taggart

September 6th, 2010 at 2:45 pm

Avatar

Stuart

Good stuff. OpenlyLocal has dereferenceable resource URIs, so you should use that rather than the RDF document describing that in SameAs, i.e. http://openlylocal.com/id/councils/156

You can also link to OpenlyLocal just using the same SNAC id used in the statistics.data.gov.uk URIs, e.g. http://openlylocal.com/councils/snac_id/41UD . The resource uri for this is http://openlylocal.com/id/councils/snac_id/41UD and will be live as soon as I’ve finished something else (i.e. tonight or tomorrow)

6 | william perrin

September 6th, 2010 at 2:47 pm

Avatar

hiya – i have to admit to not understanding this stuff.

can you show (or sketch out) for me what it does for me if i am a citizen in lichfield who wants to use open data to lobby for better street cleaning say?

cheers

w

7 | Pez

September 6th, 2010 at 3:21 pm

Avatar

This piece of work won’t do anything on its own, but it will (hopefully) be an first step into getting local councils publishing their own linked data. Eventually it will mean (if everyone starts doing it) that councils can be easily and quickly compared with one another (for example, performance, spending data etc).

We’re still in the very early days of linked data (Rob Styles (@mmmmmrob) describes it as being like things were in 1995 for the web), so the benefits aren’t going to be immediate, but we are laying the foundations for something big.

8 | Rick Mason

September 6th, 2010 at 3:59 pm

Avatar

Good idea – start with the most basic info about a council and develop from there. In a nutshell it’s our RDF home page for an RDF browser, and an alternative to our HTML homepages for HTML browsers.

I think a separate RDF file is a good option for this fairly static info though, rather than RDFa. Why bloat the download size of a key page giving two versions at once, when users will generally want one or the other? We can still link between them.

I’ll try to do something for the East Sussex site.

9 | Dave Reynolds

September 6th, 2010 at 4:22 pm

Avatar

Great approach.

I’ve sent some comments on minor details of the RDF via email and a sample for Sedgemoor.

On the question of representing the Chief Executive, then there’s some hooks for that in the org: ontology that you are already using. So you can do things like:

lg:chiefExecutive [foaf:name "Nina Dawes"] .

where lg: defines:

lg:chiefExecutive a rdf:Property, owl:ObjectProperty;
rdfs:label “Chief Executive”@en;
rdfs:subPropertyOf org:headOf .

Like you say a (web-hosted) tool could create the data from simple form input as both RDFa and RDF (XML or Turtle) and let councils embed it in their web site whichever way works best for them. Will take a look at that.

10 | william perrin

September 7th, 2010 at 7:53 am

Avatar

ok so maybe you have three councils here that are being described in rdf – can you show me now what that woudl mean for someone trying to compare them?

11 | Pez

September 7th, 2010 at 1:30 pm

Avatar

Well, you’ve already got something in a standard format, which means someone like Chris (for example) doesn’t have to screen scrape people’s websites or work through different datasets to display them in a standard way. In short, it means that there is as little human intervention as possible.

12 | Rick Mason

September 7th, 2010 at 2:23 pm

Avatar

Ours is up – a first draft anyway, based on the example above and the work Chris has already done at openlylocal. It’s linked from our HTML homepage.

http://www.eastsussex.gov.uk/eastsussex.rdf

13 | Pez

September 7th, 2010 at 2:34 pm

Avatar

Cool cool, I’ve got a bit further now and have something a bit more detailed, but just waiting on a bit of feedback before posting it up. I shall keep you posted :)

14 | Graham

September 7th, 2010 at 3:32 pm

Avatar

Really interesting and great to see people picking this up and using it straight-off – always a good sign.

At the moment it mainly seems to deal with “general” authority details, and the relationships to other sites. But what I usually go to my council’s site for is more specific contact details, such as recycling (which may be a completely different department/organisation/company). Finding out who to call for a particular scenario is one of the big purposes, IMHO, of a council site.

Is there scope for integrating this schema with more “detailed” info internal to a council? Would it be best for each department to publish its own resource, or is there a better way to auto-generate an organisation-wide “map” from existing resources?

15 | Pez

September 7th, 2010 at 4:08 pm

Avatar

Graham: I think that’s a great idea, and one that I’m sure there’s existing vocabularies for, I’ll have a dig around.

I have now (thanks in no small part to some fantastic folks in the linked data community – Jeni Tennison, Leigh Dodds and Dave Reynolds) got a sort of final version up and running here:

http://www.lichfielddc.gov.uk/lichfield.rdf

As well as the stuff I had before, I’ve also added the Chief Exec, Leader, Deputy Leader and Chairman’s contact details into the mix, using some ontology from reference.data.gov.uk. Will add this to the main blog post too

16 | Andy Mabbett

September 7th, 2010 at 4:23 pm

Avatar

“people simply add data to their council homepages, either as RDFa or metadata (although I’m not sure how you’d do the latter!)”

You should be – you’ve heard me bang on about it often enough!

Use microformats; specifically, hCard.

17 | Dave Reynolds

September 7th, 2010 at 4:49 pm

Avatar

Graham,

The org vocabulary that’s already being used here does support the notion of sub organizations and units; each of those can have one or more “sites” with vcard type contact details. So it’s certainly possible to express some of that.

Happy to help develop an example if you like (ping me at dave@epimorphics.com).

Whether it is better to have one larger file or aggregate it from dept level publications depends on your work flow. One argument for councils self-publishing core metadata is that then they own and control it, so the same might apply to departments or might be lower overhead to do this once for the council.

I’m working on a lightweight local-government ontology to support this sort of publication, will bear this use case in mind. Feedback would be welcome when it’s drafted (soon hopefully).

18 | Rick Mason

September 7th, 2010 at 4:54 pm

Avatar

Graham: I was thinking along the same lines. If this is an RDF “home page” for the organisation, it would make sense to include something like:

abc_council providesService recycling
abc_council providesService housing

etc…. to let you navigate deeper into the council as you would from an HTML home page.

I should think this could be driven off the Service List (what was the LGSL) which is all linked data now, so long as councils can link LGSL services to their actual services.

In East Sussex’s case it would make sense to drive this from our A-Z database. At the moment that has IPSV data and not LGSL, but it would give you the contact info you’re looking for. For others it might depend how, or indeed whether, they have an organised list of the services they provide.

19 | Paul Davidson

September 7th, 2010 at 5:35 pm

Avatar

Great to see enthusiasm for this. The thinking at the LeGSB Workshop was…

Each Local Authority creates ( can’t bring myself to use the ‘mint’ word ) a URI to name themselves, rooted at their own domain, that dereferences to give definitive information about themselves, and links that they want to associate themselves with.

This could be a simple yet powerful way to introduce Local Authorities to the concepts and new opportunities of Linked Data.

The issues that come to mind are:

What could we stop doing if we had this?

There are examples where data about Local Authorities is researched and stored by other parts of the public sector e.g. The CLG Places database and LocalDirectGov. The effort to maintain these could be reduced or removed if the data is pulled from the definitive and up-to-date source.

What new things could we do if we had this?

Data sets about LAs can be linked to this URI, from which other Links can be found, so that the information can be contextualised.

Site like OpenlyLocal can pull from definitive information rather than having to scrape it.

What should the URI look like? e.g.

This should be made trivial for Local Authorities to set up and maintain, whilst also gaining confidence with the concepts of Linked Data. So a # URI at www.{council}.gov.uk could be the easiest. Perhaps

www.{council}.gov.uk/id/{council}#id

This is an opportunity to explain the difference between a URI that names the real-world council as distinct from information about it.

What information can be provided

e.g.

* LA Name
* Main Administrative Address
* Web Site URL
* Customer Services telephone number
* name of Chief Executive

What same-as links can be provided

e.g.

* SNAC codes
* E-codes
* OpenlyLocal URIs
* esd-Toolkit

What see-also links can be provided

e.g.

* DBPedia

What other information can we link to

?? Type of Local Authority – ( various lists of these )
?? Charter that created the Local Authority – (OPSI have these )

How to create and maintain the content?

Can a helper app be created to enable Local Authorities to quickly and easily create/update/deploy their URI?

It looks like we have an ontology emerging to do this and a handful of councils eager to set it up. If we can make a success of that then we can get a confident message out to all councils to encourage them to do it. If we can work with some potential consumers of the data, e.g. the Department of Communities and Local Government, then we can also demonstrate some real uses and benefits of working in this way.

20 | Andy Perkins

September 9th, 2010 at 8:49 am

Avatar

Integrating this idea into the A-Z of Council services feature that your CMS provides would be a smart add-on and next step to this project perhaps Stuart?

Would be happy to discuss possibilities for this further with you.

Keep up the Good work out there Stuart! :-)

21 | Pez

September 9th, 2010 at 10:51 am

Avatar

Sounds like a plan, linking it in with the LGSL is certainly something that’s been mooted – I shall keep you posted :)

22 | Paul Davidson

September 10th, 2010 at 4:18 pm

Avatar

I spent this afternoon considering this with data.gov.uk and esd-Toolkit. I am now writing up a LeGSB paper on the conclusions. It looks encouraging that we can relatively painlessly ask councils to create a URI and dereference that to some rdf data.

This should enable various other parts of the public sector to stop creating and maintaining their own lists, and to confidently create linked data linked to the URI.

I’ll post the paper – I hope to have it done before I reach Taunton – woo woo.

SOCITM want to discuss this at their SOCITM Futures meeting on Monday 13th.

23 | Rick Mason

September 21st, 2010 at 10:14 am

Avatar

Andy and Stuart, if you do any work on getting your A-Z of services into RDF I’d be happy to be involved too.

24 | Stuart Baldwin

October 29th, 2010 at 5:18 pm

Avatar

Resurrection time…

@22:Paul, did you get to publish this paper? Apologies if it is on http://www.legsb.go.uk but I couldn’t see anything recent.

25 | Stuart Baldwin

October 29th, 2010 at 5:19 pm

Avatar

Oops – typo: “go.uk” sb “gov.uk”!

26 | Accessing Linked Data in Scraperwiki via YQL « OUseful.Info, the blog…

November 2nd, 2010 at 10:41 am

Avatar

[...] PPS Just by the by, this may be useful to folk looking for Linked Data context around local councils: @pezholio’s First steps to councils publishing their own linked data [...]

27 | Rick Mason

January 25th, 2011 at 4:39 pm

Avatar

I’ve just registered ours on data.gov.uk using the tag local-authority-id. If others use this tag we could build a list of them.

http://data.gov.uk/dataset/east-sussex-county-council-id

Comment Form

Where I’m at