Replicate the app from the image. use bslib and mock data.
Drop files here
or click to upload
library(shiny)
library(bslib)
library(leaflet)
library(dplyr)
# Source helper files
source("data.R")
source("ui.R")
source("server.R")
# Create Shiny app with custom theme
shinyApp(
ui = page_sidebar(
theme = bs_theme(version = 5),
title = "MyHybrid",
sidebar = source("sidebar.R")$value,
layout_columns(
value_box(
title = "Baseline",
value = "31",
subtitle = "Base MPG"
),
value_box(
title = "Hybrid",
value = "31",
subtitle = "Base MPG"
)
),
layout_columns(
value_box(
title = "",
value = "29",
subtitle = "Standard DriveCycle"
),
value_box(
title = "",
value = "38",
subtitle = "Standard DriveCycle"
)
),
layout_columns(
width = 1,
col_widths = c(12),
card(
card_header("Map View"),
leafletOutput("map")
)
),
layout_columns(
card(
card_header("Simulated Trip Speed"),
plotOutput("speedPlot")
),
card(
card_header("Gas Consumption"),
plotOutput("consumptionPlot")
)
)
),
server = server
)
Hi! I can help you with any questions about Shiny and R. What would you like to know?