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 issues fixed and units added #42

Merged
merged 3 commits into from
Mar 3, 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
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