← 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.