A Data-Driven Exploration of Mental Health Trends in Scotland Pre- & Post-COVID-19 (R & Shiny)

As part of my MSc in Applied Data Analytics at the University of the Highlands and Islands (UHI), I used public health data, advanced time-series modelling and visual analytics to understand how COVID-19 reshaped mental health service patterns across Scotland and to translate complex results into an interactive Shiny dashboard for evidence-based decision-making.

Problem

Public discussion during the pandemic highlighted loneliness, anxiety and burnout but evidence was often fragmented. This project set out to answer three questions using data rather than assumption:

The goal was to transform Scotland’s public health data into actionable insight that can inform future policy, planning and equitable recovery.

Data

Data were cleaned and harmonised in R (dplyr, tidyr, lubridate), including time-series indexing (monthly), handling missing values and inconsistencies and creating normalised indicators for cross-regional comparisons.

Methods

Results

Essentially, the findings show both adaptation and widening gaps: digital/community services expanded, but the transition created uneven access across regions and groups. The work reinforces that careful analytics can illuminate social realities and support equitable resource targeting.

Visual Analytics: R Shiny Dashboard

To make the insights accessible, I built an interactive Shiny dashboard that enables exploration of: diagnosis trends, demographic patterns, health board comparisons by year, and pre-/post-COVID changes. The dashboard bridges advanced modelling with practical public health storytelling.

Links