ontologies

Some handy SPARQL queries

Given accurate maps of procedures and enough instance data of things subject to those procedures, we can start to treat precedence as a thing we can query for.

This is a list of SPARQL queries used by the House of Commons Library to check and report on their work. Feedback and requests always welcome. Please email RIIDMSMailbox@parliament.uk.

Query to generate a CSV of procedure step descriptions

We used to maintain a separate spreadsheet of procedure steps with scope notes, links notes and information around how to select a date for a business item. This information is now in the data platform so we can generate the same spreadsheet but from live data:

Queries for ‘currentness’

These queries show all work packages subject to a procedrual clock (objection period, approval period, sifting period) that are currently before Parliament. We run them to check when we need to actualise end steps, where actualising an end step removes the work package from the list of current work packages.

These queries may be of particular use to Members who are interested in how long they may have left to table a motion against a statutory instrument or treaty. The results will show all current work packages and the date field can be filtered chronologically or you can use the search bar to look for a specific date. Alternatively you can add an additional string to your query to search by specific date (note you have to add +1 to your date):

FILTER ( str(?itemDate) <= ‘2020-02-06’)

Queries for statutory instruments

The following queries will show all statutory instruments available in the Statutory Instrument Service. This data goes back to the beginning of the 2017-19 session.

Queries for SI committee consideration

The following queries will show committee consideration and decisions of all statutory instruments available in the Statutory Instrument Service.

Treaties subject to the Constitutional Reform and Governance Act 2010

The following queries will show all treaties available in the Treaty Tracker. This data goes back to the beginning of the 2017-19 session.

Proposed Negative SIs and their following SIs

Proposed Negative Statutory Instuments are laid before Parliament where a decision is taken on whether they can be laid under the negative procedure or must be laid under an affirmative procedure.