← Back to Portfolio

Mental Health Service Demand Forecasting

ML & AI

Time series forecasting system predicting mental health service demand across Scottish health boards using ARIMA modeling with interactive Streamlit dashboard.

Mental Health Service Demand Forecasting screenshot 1
Mental Health Service Demand Forecasting screenshot 2
Mental Health Service Demand Forecasting screenshot 3
Mental Health Service Demand Forecasting screenshot 4

Overview

💡 Challenge

Scottish health boards struggle to anticipate mental health service demand, leading to inadequate resource allocation, long wait times, and crisis-driven care. Traditional planning methods lack predictive capability for seasonal patterns and trend changes.

⚡ Solution

Developed ARIMA time series forecasting models analyzing 6 years of synthetic mental health presentation data (2019-2024) across 14 Scottish health boards. Built interactive Streamlit dashboard with multi-board comparison, seasonal decomposition, and demographic breakdowns enabling proactive capacity planning.

🎯 Impact

Enables evidence-based resource allocation with 3-6 month advance forecasting. System identifies seasonal peaks, board-specific trends, and demographic patterns, supporting strategic planning for mental health services across Scotland. Provides actionable insights for staffing, budgeting, and service expansion decisions.

Technical Details

🛠️ Tech Stack

PythonPandasStatsmodelsARIMAStreamlitPlotlyTime Series ForecastingHealthcare Analytics

✨ Key Features

  • ARIMA time series forecasting with automated parameter selection
  • Multi-health board comparison across 14 Scottish NHS boards
  • Seasonal decomposition showing trend, seasonality, and residuals
  • Interactive 3-6 month demand forecasts with confidence intervals
  • Demographic breakdown by age group and sex
  • COVID-19 impact analysis showing pandemic effects on presentations
  • Board-specific trend analysis identifying growth patterns
  • Historical data visualization with monthly aggregations
  • Year-over-year comparison charts
  • Interactive filtering by health board, time period, and demographics
  • Synthetic dataset generation with realistic healthcare patterns
  • Comprehensive data quality validation
  • Professional healthcare-themed UI with gradient designs
  • Export capabilities for forecast data and visualizations

Key Learnings

  • ARIMA models effectively capture seasonal patterns in healthcare demand data
  • Mental health service utilization shows strong seasonal variations requiring trend-seasonal decomposition
  • COVID-19 created structural breaks in historical patterns requiring careful model calibration
  • Synthetic data generation must preserve realistic correlations between demographics and service use
  • Health board-specific models perform better than single national model due to regional variation
  • Interactive dashboards enable stakeholders to explore forecasts across multiple dimensions
  • Time series forecasting provides actionable 3-6 month planning horizon for healthcare services
  • Statsmodels ARIMA implementation works well for univariate healthcare demand forecasting
  • Python 3.12/3.13 compatibility required careful dependency management for scipy and statsmodels

📊 Data Notes

This project uses synthetic/open data to demonstrate capabilities while maintaining privacy and confidentiality. All methods and approaches are applicable to real-world scenarios.