Skip to content

Commit

Permalink
Merge pull request #42 from UBC-MDS/fix_sneha
Browse files Browse the repository at this point in the history
spacing issues fixed and units added
  • Loading branch information
eyrexh authored Mar 3, 2023
2 parents 84a86ec + a73cf91 commit 43b09c8
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions app.R
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ weather_bar$month <- month.name[weather_bar$month]

# Define UI
ui <- dashboardPage(
dashboardHeader(title = "Citytemp Weather Dashboard"),
dashboardHeader(title = "Weather Dashboard"),

dashboardSidebar(sidebarMenu(
menuItem(
Expand All @@ -36,7 +36,7 @@ ui <- dashboardPage(
tabItem(tabName = "temp_precip_trends",
fluidRow(
column(
width = 4,
width = 3,
# Add slider input for selecting range of months
sliderInput(
"month_range",
Expand All @@ -56,13 +56,12 @@ ui <- dashboardPage(
# Add radio button input for selecting temperature or precipitation
radioButtons(
"data_type",
"Select Data Type:",
"Select Type:",
choices = c("Temperature", "Precipitation"),
selected = "Temperature"
)
),
column(width = 8,

column(width = 9,
# Added a row for summary statistics
fluidRow(

Expand All @@ -81,7 +80,7 @@ ui <- dashboardPage(
tabItem(tabName = "city_ranking",
fluidRow(
column(
width = 4,
width = 3,
selectInput("statename",
"Select a state:",
choices = unique(weather_bar$state)),
Expand All @@ -95,7 +94,7 @@ ui <- dashboardPage(
choices = unique(weather_bar$month))
),
column(
width = 8,
width = 9,
plotOutput("temp_barplot"),
plotOutput("rain_barplot")
)
Expand Down Expand Up @@ -306,7 +305,7 @@ server <- function(input, output, session) {
}
else{
valueBox(
paste0(stat_data()$max_prec), "MAX", icon = icon("fa-regular fa-cloud-sun-rain"),
paste0(stat_data()$max_prec, " in."), "MAX", icon = icon("fa-regular fa-cloud-sun-rain"),
color = "red")
}
})
Expand All @@ -321,7 +320,7 @@ server <- function(input, output, session) {
}
else{
valueBox(
paste0(stat_data()$min_prec), "MIN", icon = icon("fa-regular fa-cloud-sun-rain"),
paste0(stat_data()$min_prec, " in."), "MIN", icon = icon("fa-regular fa-cloud-sun-rain"),
color = "blue")
}
})
Expand All @@ -336,7 +335,7 @@ server <- function(input, output, session) {
}
else{
valueBox(
paste0(stat_data()$avg_prec), "AVG", icon = icon("fa-regular fa-cloud-sun-rain"),
paste0(stat_data()$avg_prec, " in."), "AVG", icon = icon("fa-regular fa-cloud-sun-rain"),
color = "green")
}
})
Expand Down

0 comments on commit 43b09c8

Please sign in to comment.