BRFSS Conference 2026




A simple webpage with just text.

library(shiny)

ui <- fluidPage(
# App title
titlePanel("Hello!"),


# Main panel for displaying the text
mainPanel(
p("Welcome to the 2026 BRFSS Conference!")
)
)
server <- function(input, output) {
}
shinyApp(ui = ui, server = server)









A simple plot, with data from file.

library(shiny)
library(ggplot2)

ui <- fluidPage(
plotOutput("plot", click = "plot_click"),
verbatimTextOutput("info")
)

server <- function(input, output) {
output$plot <- renderPlot({
plot(mtcars$wt, mtcars$mpg)
}, res = 96)

output$info <- renderPrint({
req(input$plot_click)
x <- round(input$plot_click$x, 2)
y <- round(input$plot_click$y, 2)
cat("[", x, ", ", y, "]", sep = "")
})
}
shinyApp(ui = ui, server = server)










A more complex webpage of data selection.

library(shiny)
ui <- fluidPage(
selectInput("dataset", label = "Dataset", choices = ls
("package:datasets")),
verbatimTextOutput("summary"),
tableOutput("table")
)
server <- function(input, output, session) {
# Create a reactive expression
dataset <- reactive({
get(input$dataset, "package:datasets")
})

output$summary <- renderPrint({
# Use a reactive expression by calling it like a function
summary(dataset())
})

output$table <- renderTable({
dataset()
})
}
shinyApp(ui, server)











Map

Maybe you are staying at this hotel?



library(shiny)
library(leaflet)

ui <- fluidPage(
leafletOutput("map")
)

server <- function(input, output) {
output$map <- renderLeaflet({
leaflet() %>%
addTiles() %>%
setView(lng = -84.33788478328952, lat = 33.92147540720772, zoom = 18) # Center on Hotel
})
}
shinyApp(ui, server)









Plots

Interactive plots with selection bar.


library(shiny)
library(bslib)
library(ggplot2)
install.packages("palmerpenguins")
library(palmerpenguins)

ui <- page_fluid(
sliderInput(
"slider",
label = "Number of bins",
min = 10,
max = 60,
value = 20
),
plotOutput("plot")
)

server <- function(input, output) {
output$plot <- renderPlot(
{
ggplot(data = penguins, aes(body_mass_g)) +
geom_histogram(bins = input$slider)
}
)
}

shinyApp(ui = ui, server = server)