Skip to contents

Audience: Anyone who has installed the Algorithm Viewer and wants to open it.

Prerequisites: The Algorithm Viewer installed (Installing the Algorithm Viewer on your Computer).

What you will have at the end: the app running in your browser, preloaded with the example HTNPoRT algorithm, and a mental map of its interface.


1. Launch the app

In R (or RStudio), load the package and call run_app():

Your default web browser opens the Algorithm Viewer automatically. (In RStudio, it may open in the Viewer pane instead — click the “Show in new window” icon to open it in a full browser tab.)

Because you did not pass a configuration file, the app starts with its built-in example: the Hypertension Population Risk Tool (HTNPoRT) algorithm, with two models (Female and Male) preloaded.

Leave the R session running while you use the app — the app is served by that R process. To stop the app, return to R and press Esc (or Ctrl+C in a terminal).

2. Get oriented

The interface has two parts.

The sidebar (left)

The sidebar holds the controls, organized into tabs. Models is always available. The tab beside it provides the configuration options for whichever plot tab you are currently viewing, so it changes as you move between plots:

  • Models — choose which algorithm and which models are shown. Each selected model is drawn in its own colour so you can compare them on the same axes. If the installation allows it, this tab also holds an Upload Algorithm control and a Preloaded Algorithms dropdown.
  • Reference — shown for the Odds Ratio, Relative Risk, and Predicted Risk plots. Sets the baseline “reference patient” that those plots are calculated against. Continuous variables (such as age or BMI) use sliders; categorical variables (such as diabetes status) use radio buttons. Click Reset to restore a model’s defaults.
  • Me vs Ref — shown when the Me vs Ref plot is active, in place of Reference. Holds paired controls that set a “Me” and a “Ref” value for every predictor.

Switching plot tabs swaps this second sidebar tab for you, so you never have to hunt for the settings that belong to the plot on screen.

The plot area (right)

The main area shows one plot at a time, chosen with the tabs across the top:

  • Odds Ratio
  • Relative Risk
  • Predicted Risk
  • Me vs Ref — compare a personal profile against a reference profile.

Each plot has its own row of controls above it — typically for choosing the Predictor on the x-axis, an optional Interaction Predictor, and a Logarithmic scale checkbox.

The next tutorial explains what each plot means and how to read it.

3. Optional: run_app() options

run_app() accepts three arguments — config (the app configuration file), port, and host. For the defaults and full descriptions, see the run_app() reference page.

For example, to load your own configuration and serve the app on your local network:

run_app(config = "path/to/my-config.yaml", host = "0.0.0.0", port = 3838)

Loading a custom configuration is covered in View your own algorithms in the Algorithm Viewer.

Next steps