PRISM Dashboard

Shiny
Python
dashboard
Author

Gabrielle M. Schroeder

Published

August 9, 2026

The 'Model' page of the PRISM dashboard. In a narrow column on the left are inputs for different settings: sand type, train speed, flow rate, humidity, and output version (seed). The remainder of the dashboard shows the model prediction, including a bright green card showing that the 'Adhesion level enhancement' is 'HIGH' and 'Entrainment efficiency' is '18.28%'. Below that are figures showing the predicted sand particle locations by the train wheel.

Background

On train railways, poor rail adhesion (e.g., due to leaves on tracks) is a common and significant challenge that can cause delays, accidents, and high costs to the rail industry. The goal of the Predictive Rail Innovation for Supporting Maintenance (PRISM) project was to develop a system for predicting the effectiveness of different interventions - such as applying sand to the tracks - at improving rail adhesion.

PRISM was funded by UKRI Innovate UK and was a collaboration between engineering researchers from both Newcastle University and Durham University.

Challenge

I joined PRISM towards the end of the project to develop a dashboard that would run their model (a PyTorch neural network) and display the predicted rail adhesion for the user-specified conditions. The application would serve as an early prototype of a monitoring and intervention system that could be used by the rail industry to address poor rail adhesion.

This dashboard had several requirements. Most importantly, it needed to interface with their Python model so that the user could easily run the model predictions and see the returned outputs. It also needed to use a framework that supported rapid prototyping due to both the project’s time constraints and the concurrent development of the model; I would need to adapt the dashboard as the model inputs and outputs were finalised. Additionally, the dashboard needed to have good UI/UX design and be aesthetically pleasing to meet the project’s commercial goals.

In addition to developing the dashboard, I also provided training on

  • collaborative GitHub development
  • Python environments
  • Python packaging (e.g., how to turn a machine learning model developed in a Jupyter notebook into a Python module that can be called by the application’s server logic)

Solution

I decided to create the dashboard using Shiny for Python, which is a powerful Python framework that allows for rapid development while still providing high levels of control and customisation. By choosing a Python framework, I was able to directly import and call the functions for running PRISM’s model predictions, letting me rapidly integrate their work into the application. Because Shiny uses HTML/CSS and Javascript under-the-hood, I could also leverage these web technologies to customise the dashboard’s appearance and behaviours.

I worked with PRISM’s researchers to determine the information that the user would need to provide the model, as well as the outputs that would need to be displayed:

Dashboard before running the model, with components for providing the required inputs.

Dashboard before running the model, with components for providing the required inputs.

The dashboard then provides rail adhesion predictions for the specified inputs, including summary metrics and visualisations.

The dashboard then provides rail adhesion predictions for the specified inputs, including summary metrics and visualisations.

In addition to their detailed model predictions and raw measure of adhesion improvement (“entrainment efficiency”), we qualitatively summarised the intervention’s impact with an “adhesion level enhancement” value, which ranged from very low to very high. To accentuate this key summary measure, we changed the colour of corresponding card based on the value:

PRISM dashboard showing model predictions for 'VERY LOW' adhesion level enhancement (0% entrainment efficiency), with the level shown on a red card.

PRISM dashboard showing model predictions for 'MODERATE' adhesion level enhancement (12.47% entrainment efficiency), with the level shown on a yellow card.

PRISM dashboard showing model predictions for 'HIGH' adhesion level enhancement (15.46% entrainment efficiency), with the level shown on a bright green card.

Information design decisions such as these help translate complex research into actionable insights.

I also worked with the researchers to develop a new figure showing the layout of the train wheel, tracks, and sander (“Sander set-up”). This diagram helps orient the user before showing the more detailed model predictions (the location of the sand particles next to the train wheel).

Because the model is not deterministic - the predictions can slightly change from run-to-run - we let the user set a random seed under the “advanced” options to control which version of the output is shown. We limit the seed to between 1 and 1000 and provide feedback if the user tries to input a value outside of this range.

Adhesion predictions for seed 900 for these model inputs.

Adhesion predictions for seed 900 for these model inputs.

The dashboard limits seed inputs to the specified range.

The dashboard limits seed inputs to the specified range.

Additional pages of the application provide information about the model and project:

'Help' page of the PRISM application, which provides information about the model settings and results.

'About' page of the PRISM application, which provides information about the project and team.

Additional text from the 'About' page of the PRISM application with information about funding and references.

Next steps

Some preliminary next steps to improve the dashboard would be

  • Updating to the colour encoding of the “adhesion level enhancement” measure to make it colour blind friendly (or adding an option to switch to a colour blind friendly mode)
  • Packaging or deployment for distributing the application without setting up a Python environment

Ultimately, the team envisages building on this work to create an application that monitors and reports on rail adhesion in real time, using sensors and weather reports to provide input for the model without manual user inputs.