diff --git a/howTo/shiny/Intensity_02.R b/howTo/shiny/Intensity_02.R index 41fee9d561cc50b6dfb79f62432f7b071975e6b1..af311010b1d15cb82c6eecf5fc157cabcfd3318e 100644 --- a/howTo/shiny/Intensity_02.R +++ b/howTo/shiny/Intensity_02.R @@ -47,6 +47,11 @@ ui <- fluidPage( # Sidebar panel for inputs ---- 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 ---- dateInput(inputId = "dateToGet", @@ -63,17 +68,29 @@ ui <- fluidPage( # Main panel for displaying outputs ---- mainPanel( - - # Output: Plot ---- - textOutput(outputId = "dateText"), - #plotOutput(outputId = "intensityPlot") - - # Output: Histogram ---- - plotOutput(outputId = "intensityPlot") - - ) - ) -) + fluidRow( + 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"), + #plotOutput(outputId = "intensityPlot") + + # Output: Histogram ---- + plotOutput(outputId = "intensityPlot") + + ) # row + ) # panel + ) # layout +) # page # Define server logic required to draw a histogram ---- server <- function(input, output) { @@ -105,4 +122,3 @@ server <- function(input, output) { } shinyApp(ui = ui, server = server) -