June 25β27, AMMnet Senegal Workshop
Understand key elements of Shiny Dashbaords
Gain hands on experience customising Shiny dashbaords
We canβt cover all aspects of creating Shiny Dashboards but there are a tonne of great resources online we will share during the course of today!
π Youβve probably seen dashboards used in the COVID-19 response - what other dashboards can you think of?
β
Turns R code into interactive web apps
β
You donβt need to learn HTML, CSS, or JavaScript
β
Great for sharing visualizations, tables, and summaries
β
Easy to deploy: share with collaborators or host online
β
Allow non R users to interact and explore data without the need to code.
β
Provide analytical capacity to people without analytical skills
β
Shiny is a lot more flexible that DHIS2 modules
π Need an R coding background
π Can be more complext than normal R scripts
π Can be costs to hosting apps for distribution
Shiny dashbaords can grow to be incredibly complex web applications but can also be small simple tools designed to help colleagues with everyday tasks and problems. Here are two examples of dashboards weβve created recently at PATH.
A basic Shiny app has two main parts:
library(shiny)
library(bslib)
# Define UI ----
ui <- fluid_page(
# Define the layout
# Define the theme
# Define user input selection
# Define types of outputs
)
# Define server logic ----
server <- function(input, output) {
# Computations
}
# Run the app ----
shinyApp(ui = ui, server = server)This code is the bare minimum needed to create a Shiny app. The result is an empty app with a blank user interface.
Customizing the theme of your dashboard is a really simple way to upgrade the look and feel of your app.
You can use the {bslib} package to easily:
Change colors, fonts, and spacing
Apply modern Bootstrap themes (like flatly, minty, cosmo)
Preview changes live while building your app
Weβll explore this in more detail later β for now, just know itβs easy to give your dashboard a polished, professional look!
shiny β the core package
bslib β for modern dashbaord design
tidyverse β for data wrangling
DT β for interactive tables
plotly β for interactive plots
leaflet - for open source interactive maps
Below are some beginner-friendly resources to help you dive deeper into Shiny:
| Link | Description |
|---|---|
| Shiny Get Started | Official step-by-step tutorial for beginners, with hands-on examples. |
| Shiny Gallery | Explore live examples of Shiny apps with source code. |
| Mastering Shiny (book) | Free online book by Hadley Wickham covering basics to advanced topics. |
| Shiny Cheatsheet | Handy reference for Shiny functions and UI elements (download the PDF). |
| Shiny UI Editor (Experimental) | Drag-and-drop interface to design your UI visually. |
These links are a great place to start exploring after todayβs session.
Pull data from DHIS2 β
Clean and summarize key indicators β
Build simple interactive plots and tables π
Customize π
Shiny makes dashboards easy to build in R
Youβll learn by doing β today is all about hands-on practice
Youβll work with a template and build out each element of the dasboard
Weβll go step-by-step π οΈ
Follow the link to the materials worksheet - open in google chrome for auto translate.
Work through each section and complete the exercises as you go.
Reach out for help or to ask questions!
Enjoy!!

PATH | AMMnet Senegal Meeting 2025