Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spacing Issue fixed + Added title #85

Merged
merged 3 commits into from
Mar 17, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 14 additions & 3 deletions app.R
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ ui <- dashboardPage(

dashboardHeader(title = "Weather Dashboard"),

dashboardSidebar(
dashboardSidebar(tags$style(".left-side, .main-sidebar { width: 235px }"),
sidebarMenu(
id = "tabs",
menuItem(
Expand Down Expand Up @@ -74,14 +74,22 @@ ui <- dashboardPage(
# Add radio button input for selecting temperature metric
radioButtons(
"temp_metric",
"Select temperature metric:",
"Select Temperature metric:",
choices = c("Celsius", "Fareinheit"),
selected = "Celsius"
)
),
column(
width = 9,
# Added a row for summary statistics
fluidRow(tags$head(
tags$link(rel = "stylesheet", href = "https://fonts.googleapis.com/css2?family=Avant+Garde&display=swap")
),
column(width = 12,
tags$h2(class = "text-center", style = "font-size: 20px; font-weight: bold; font-family: 'Avant Garde', sans-serif;",
textOutput("summaryTitle")
)
)),
fluidRow(
valueBoxOutput("avgBox"),
valueBoxOutput("maxBox"),
Expand Down Expand Up @@ -122,7 +130,7 @@ ui <- dashboardPage(
),
radioButtons(
"temp_unit",
"Temperature unit:",
"Select Temperature metric:",
choices = c("Celsius", "Fahrenheit"), selected = "Celsius")
),
column(
Expand All @@ -145,6 +153,9 @@ ui <- dashboardPage(
# Define server logic
server <- function(input, output, session) {

output$summaryTitle <- renderText({
paste("Summary Statistics for", input$city, ",", input$state)
})

# Update city and state input based on map clicks
observeEvent(input$map_marker_click, {
Expand Down