ScotRail performance dashboard

R
Dashboards
Quarto
Interactive dashboard built with Quarto to provide improved access to and comparability of data on ScotRail delays and cancellations.
WarningWarning

This dashboard is a personal project and is not affiliated with ScotRail.

Screenshot of scotrail performance dashboard

Motivation and requirements

ScotRail is a publicly-owned company operating rail services in Scotland, owned by the Scottish Government. ScotRail claim to “publish daily figures on our punctuality so customers can see how we performed over the previous 24 hours”. However, these figures are currently (as of April 2026) published as inaccessible, and poorly structured PDF documents. This means the information can be hard to access, and even harder to compare over time. A solution is required that (i) collects existing data and provides it in a more accessible format; and (ii) displays the data to enable comparison.

Features

The dashboard has several features that make it more user friendly and easier to maintain:

  • It pre-filters posts based on a set of keywords to ensure posts are relevant to R, Python, and data science.
  • The data updates automatically on a schedule, meaning that there is no manual process involved in maintaining the dashboard’s relevance. It can also be triggered manually if required.
  • The table is searchable meaning that a user can look for links posted about a specific topic, or by a specific user, or even from a specific website.
  • It extracts and displays both the link to the original tweet and the link to the resource, meaning users can browser resources without visiting twitter but also see who and when it was posted.

Tools

The dashboard is built using freely available, open source tools.

  • Data: pdf, rvest, gh actions.

  • Dashboard: the dashboard is built using Quarto. interactive elements (data downloads, tabsets, tooltips, modals with notes)

  • Deployment: the github pages (static site) meaning no server is required in backend, using GitHub Actions to automatically re-deploy the dashboard whenever the data or content changes.

Data

The data is scraped from (poorly structured) PDF documents, so no guarantee is given for the quality of the information provided.

Daily data

Source: www.scotrail.co.uk/performance-and-reliability/previous-daily-statistical-summaries

Data is displayed for January 2026 onwards.

Monthly data

Source: www.scotrail.co.uk/about-scotrail/performance-and-reliability

There is no contents page showing historic data, and each PDF is published under a random, non-structured URL. Data is included from March 2026 onwards, with historic data included if I’ve been able to find it.