Skip to content
Snippets Groups Projects
Commit 9b4b755d authored by Tom Rushby's avatar Tom Rushby
Browse files

Add static content & styling.

parent 84d22fd9
No related branches found
No related tags found
No related merge requests found
...@@ -47,6 +47,11 @@ ui <- fluidPage( ...@@ -47,6 +47,11 @@ ui <- fluidPage(
# Sidebar panel for inputs ---- # Sidebar panel for inputs ----
sidebarPanel( sidebarPanel(
fluidRow(
tags$p("Select the date to view by clicking in the box below (defaults to today's date)."),
tags$p("Data for forecast carbon intensity is available up to four days ahead."),
tags$hr()
),
# Input: Slider for the number of bins ---- # Input: Slider for the number of bins ----
dateInput(inputId = "dateToGet", dateInput(inputId = "dateToGet",
...@@ -63,17 +68,29 @@ ui <- fluidPage( ...@@ -63,17 +68,29 @@ ui <- fluidPage(
# Main panel for displaying outputs ---- # Main panel for displaying outputs ----
mainPanel( mainPanel(
fluidRow(
# Output: Plot ---- tags$br(),
tags$p("The chart below shows the forecast and actual carbon intensity of electricity supplied by National Grid over the 24 hours selected.",
"The data illustrated by this app is retrieved from ", tags$a(href = "https://carbonintensity.org.uk/","National Grid ESO's Carbon Intensity API"),"."),
tags$p("This app was created by ", tags$a(href = "https://energy.soton.ac.uk/rushby/","Tom Rushby "),
tags$a(href = "https://twitter.com/tom_rushby","(@tom_rushby)"),
"for the ",tags$a(href = "https://energy.soton.ac.uk/","Energy and Climate Change Division"),
tags$a(href = "https://twitter.com/EnergySoton","(@EnergySoton)"),"at the University of Southampton."),
tags$p("Predicted carbon intensity of electricity is shown in blue (forecast).",
"The carbon intensity of electricity supplied is shown in red (actual)."),
tags$hr(),
# Output: Text ----
textOutput(outputId = "dateText"), textOutput(outputId = "dateText"),
#plotOutput(outputId = "intensityPlot") #plotOutput(outputId = "intensityPlot")
# Output: Histogram ---- # Output: Histogram ----
plotOutput(outputId = "intensityPlot") plotOutput(outputId = "intensityPlot")
) ) # row
) ) # panel
) ) # layout
) # page
# Define server logic required to draw a histogram ---- # Define server logic required to draw a histogram ----
server <- function(input, output) { server <- function(input, output) {
...@@ -105,4 +122,3 @@ server <- function(input, output) { ...@@ -105,4 +122,3 @@ server <- function(input, output) {
} }
shinyApp(ui = ui, server = server) shinyApp(ui = ui, server = server)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment