Accessing and Analyzing UK Road Crash Data with stats19

Cars and Crime Symposium Workshop

Robin Lovelace, Roger Beecham, and team

2026-07-30

Workshop Overview & Agenda

Session Duration: 60 Minutes

  • 00:00 – 00:15 | Introduction to STATS19 & {stats19}
  • 00:15 – 00:30 | Research & Methodological Challenges
  • 00:30 – 01:00 | Interactive Breakout Groups
    • Group 1 (Robin): Hands-on code & vignette walkthrough (Laptops out!).
    • Group 2 (Roger): Research design & analysis ideas discussion.
    • Group 3: Informal break / walk & networking.

Part 1: The STATS19 Dataset & Package

What is STATS19 Data?

Relational Data Architecture

The {stats19} R Package

Rapid Data Retrieval

library(stats19)
library(sf)
library(dplyr)

# Download crash data for a specific year
crashes_2022 <- get_stats19(year = 2022, type = "crash")

# Format into spatial sf object
crashes_sf <- format_sf(crashes_2022)

# Download casualties and vehicles linked to crashes
casualty_2022 <- get_stats19(year = 2022, type = "casualty")
vehicle_2022  <- get_stats19(year = 2022, type = "vehicle")

Part 2: Research & Methodological Challenges

1. Denominators & Exposure

Denominator Neglect!

2. Low Frequency Events & Aggregation

3. Risk of ‘Wonky’ Inferences

Tools in Action: criticalissues

A complementary tool for exploring road safety data at high spatial resolution:

criticalissues.netlify.app — WYCA region with signal layer

  • Critical Issues (criticalissues.netlify.app) combines STATS19 crash data with network infrastructure.
  • Explore how spatial layers (signals, crossings, widths) relate to casualty clusters.

The importance of geographic aggregation

Options:

Defining junctions

Segments

In the future

Live demo!

Part 3: Breakout Workshop Groups

Breakout Group 1: Technical & Hands-On Code

Led by: Robin

  • Laptops Open!
  • Walkthrough of core {stats19} vignettes and spatial analysis workflows.
  • Custom dataset filtering, joining crashes + casualties + vehicles.
  • Troubleshooting technical questions or custom research pipelines.

Breakout Group 2: Research Ideas & Study Design

Led by: Roger

  • Conceptual & Strategic Discussion
  • Brainstorming candidate research questions connecting road safety, crime, and transport planning.
  • Discussion on data requirements, external denominators, and study design.
  • Exploring potential collaboration and grant/paper proposals.

Breakout Group 3: Walk & Informal Networking

  • Refresh & Recharge
  • Take an early lunch / outdoor walk.
  • Informal discussions with colleagues.