cite doi

Data on the United Kindgom Supreme Court

As part of a research stay at MOBILE in the spring of 2024 I was asked to do an introductory lectrue about web scraping. As part of my preparations, I wrote a fully functional script to scrape the web site of the UK Supreme Court, which is used as the basis for the introduction to web scraping published on this website.

As the script is fully functional,I figured I migth as well publish the UK Supreme Court data here for anyone who might be interested. The data lists decisions of the UKSC from 2009 to mid-2024, as they appear on the official website of the UKSC (archive link). Shortly after I wrote the script the website was remodelled, so the original script unfortunately does not work any more.

The data consists of two closely related components: Jugments and Cases. The two components have different units of observations: Whlie the judgment data has one row for each judgment published by the Court, the case data has one row for each case the Court decides on. I make the data available in both R data and CSV format (with list variables separated by ;).

Be aware that I am not a scholar working with the UK Supreme Court myself, and I compiled these data as a lesson in web scraping rather than as a research project studying that Court. If you're interested in using these data for academic purposes, make sure to take a critical look at them and to familiarize yourself with their contents and limitations before running your analysis.


R data csv

Judgments

The Judgments component consists of more than 900 observations of 20 variables. These are as follows:

citation
The "neutral citation" of the judgment, as presented by the UKSC. This is the unique ID code used for this unit of observation.
case_name
The full name of the case. See also case_name_short.
case_list
A list: The ID code(s) of the case(s) associated with the judgment.
length_of_procedure
Time (in days) passed from the beginning of the hearing to the publication of the judgment. If available.
length_of_hearing
Time (in days) passed from the beginning of the hearing to the end of the hearing. If available.
date_hearing_start
The date of the beginning of the hearing. If available.
date_judgment
The date of the judgment.
n_joined_cases
The number of cases the judgment is issued in response to.
european_union
Binary variable: Observes whether the judgment relates to the European Union, based on a text search of the presentation of the facts and the issue.
human_rights
Binary variable: Observes whether the judgment relates to human rights, based on a text search of the presentation of the facts and the issue.
length_issue
The number of characters in the presentation of the issue.
length_facts
The number of characters in the presentation of the facts.
justices_number
The number of justices in the chamber that delivered the judgment.
big_chamber
Binary variable: Whether the chamber consisted of more than 5 judges.
female_justice
Binary variable: Whether there was a female justice present in the chamber delivering the judgment.
gender_balance
Categorical variable: Whether a chamber is male only or mixed gender.
hearing_length
Categorical variable: The length of the hearing. Either short (one day), medium (two days), or long (more than two days).
short_hearing
Binary variable: Whether the hearing lasted only one day.
long_hearing
Binary variable: Whether the hearing lasted more than two days.
case_name_short
The name of the case as presesnted by the Court, but with information in parantheses removed.

R data csv

Cases

The Cases compontent observes the cases before the UK Supreme Court rather than its judgments, which is the level at which information is presented by the Court itself on its website. As a result, this unit of observation provides richer information, but potentially at the cost of being a less intuitive unit of analysis.

The cases data set includes more than a thousand observations of 25 variables.

id
The ID code of the case, as provided by the UK Supreme Court.
citation
The ID code of the associated judgment.
summary_issue
The full text of the summary of the issue, if available.
summary_facts
The full text of the summary of the facts, if available.
title
The full title of the case. See also title_short.
date_hearing_start
The date of the beginning of the hearing.
date_hearing_finish
The date of the end of the hearing.
date_judgment
The date of the judgment.
text_url
The URL of the full text of the judgment.
length_of_hearing
The length of the hearing, in days.
length_of_procedure
The length of the procedure, in days from the beginning of the hearing to the publication of the judgment.
justices_list
The names and titles of the justices associated with the judgment.
justices_number
The number of justices in the chamber that delivered the judgment.
justices_male
The number of male justices in the chamber.
justices_female
The number of female justices in the chamber.
migration
Binary variable: Observes whether the judgment relates to migration or asylum, based on a text search of the presentation of the facts and the issue.
european_union
Binary variable: Observes whether the judgment relates to the European Union, based on a text search of the presentation of the facts and the issue.
human_rights
Binary variable: Observes whether the judgment relates to human rights, based on a text search of the presentation of the facts and the issue.
facts_n_paragraphs
Number of paragraphs in the summary of the facts.
issue_n_paragraphs
Number of paragraphs in the summary of the issue.
facts_n_characters
Number of characters in the summary of the facts.
issue_n_characters
Number of characters in the summary of the issue.
case_name_short
The name of the case as presesnted by the Court, but with information in parantheses removed.

R script

Script

I made the full script used to compile these data available here, so that anyone can use it to learn about web scraping, update the data with newer observations, add information, or fix potential bugs.

Though the script is slightly modified vis-a-vis what is available in the web scraping guide I present elsewhere on this website, it is mostly the same, and whoever wishes to be introduced to the nuts and bolts of the data would do well to take a look at this guide.

The UK Supreme Court data available on this page was last updated on 6 June 2024.