Skip to main content

https://mojdigital.blog.gov.uk/open-data-markup-on-dsd-informational-services/

Open Data markup on DSD informational services

This page is a technical addendum to a DSD blog entry from August 2013, where we provide more detail about how we added machine-readable markup to two of our new informational services: Court and Tribunal Finder, and Tribunal Decisions.

In order to augment our HTML markup with machine-readable tags, we used RDFa and schema.org:

<section id="content" role="main"
         vocab="http://schema.org/" typeof="Courthouse GovernmentOrganization"> 
  <h1 property="name">Luton County Court</h1>
  <img alt="Luton_county_court" property="image"
       src="https://...luton_county_court.jpg" />
  <p property='address' typeof='http://schema.org/PostalAddress'>
  <span property='streetAddress'>
    2nd Floor<br />Cresta House<br />Alma Street</span><br/>
    <span property='addressLocality'>Luton</span><br/>
    <span property='addressRegion'>Bedfordshire</span><br/>
    <span property='postalCode'>LU1 2PU</span><br/>DX 97760 Luton 4</p>

We chose schema.org because it's very simple, it's got quite a few concepts that we can reuse (like Courthouse), and it's currently gaining popularity and is understood by major search engines. We chose RDFa over microdata because it allows greater expressivity (for instance, we can say that a court is both a Courthouse (as it has an address) and a GovernmentOrganization (as it has contact points).

Another example, this time a tribunal decision page:

<div typeof='CreativeWork' vocab='http://schema.org'>
  <h1>[2013] UKUT 382</h1>
  <dl class='decision-details'>
  <dt>Case title:</dt>
  <dd property='name'>AH (Article 1F(b) – ‘serious’)</dd>
  <dt>Appellant name:</dt>
  <dd>AH</dd>
  <dt>Status of case:</dt>
  <dd>Reported</dd>
  <dt>Publication date:</dt>
  <dd>
    <time property='datePublished' timedate='2013-08-05'>
      5 Aug 2013
    </time>
  </dd>
  <dt>Country:</dt> <dd>Algeria</dd>
  <dt>Judges:</dt>
  <dd>
    <span property='author'>Mr Justice Blake</span>
    <span property='author'> Mrs J Gleeson</span>
    <span property='author'> Mr P D King</span>
  </dd>
  <dt>Keywords</dt>
  <dd property='keywords'>Article 1F(b) – ‘serious’</dd>

While schema.org covers our current markup needs, things will probably change: we want to be more specific about the object we're describing: a tribunal decision is not just a "creative work". Ideally we'll design our own vocabulary (imagine something like "justice.gov.uk/HorseraceBettingLevyAppealTribunalDecision"), which we'll submit for inclusion in schema.org. Things are in fact moving very fast in the area of vocabulary definition: see for instance Google's civic services or the European Commission's Core Public Service vocabularies.

But for now we're sticking to the official schema.org vocabulary and won't embark on anything new until we find good use cases, or we receive feedback indicating we should do it. That doesn't mean we're not continuing our work to embed Open Data in our services: for instance, we're working on a JSON-LD API for Court Finder in order for the data to be available to our Civil Claims project. We're also currently adding machine-readable markup to upcoming services like Form Finder, or legacy services like Help and support for victims of crime). Before you know we may implement SPARQL endpoints everywhere.

What we've done so far isn't that much work, but it's a start towards providing open and machine-readable access to up-to-date Justice data. But there's more to it than offering 5-star data: more importantly we need to make sure our data is useful to the public, law professionals, journalists and service designers. That's why we're very keen to hear their (and your) feedback.