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

Add about/header sections and adjust plot caption.

parent 19f0c92d
No related branches found
No related tags found
No related merge requests found
...@@ -156,19 +156,34 @@ sf_data$popup_text <- ...@@ -156,19 +156,34 @@ sf_data$popup_text <-
ui <- fluidPage( ui <- fluidPage(
titlePanel("Hampshire local authority ghg emission visualisation"), titlePanel("Local authority greenhouse gas emissions visualisation"),
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.",
"Emissions estimates from the Department for Business, Energy and Industrial Strategy (BIES), are used and are available at ",
tags$a(href = "https://data.gov.uk/dataset/723c243d-2f1a-4d27-8b61-cdb93e5b10ff/emissions-of-carbon-dioxide-for-local-authority-areas","data.gov.uk"),
" (2018 estimates, last updated 25 June 2020).",
"Local authority boundaries (2018) are provided by ", tags$a(href = "https://geoportal.statistics.gov.uk/","ONS Open Geography Portal"),"."),
tags$p("This page is best viewed in landscape and full-screen in your favourite web browser."),
fluidRow( fluidRow(
column(5, column(5,
wellPanel("Click map to select local authority"), wellPanel(
tags$p("Only local authority areas within Hampshire are visualised here.",
"In the right-hand panel (bottom panel if viewing on a phone), the average per-capita emissions in 2018 for each local authority are compared, alongside the average for Hampshire.",
"Cliking on the 'Authority detail' tab will reveal historical emissions estimates (2005 to 2018).",
tags$strong("Click a local authority area"), "on the map below to show estimates for only the selected area.")),
leafletOutput("authmap",height = "600px")), leafletOutput("authmap",height = "600px")),
column(7, column(7,
wellPanel("Use slider to select year to view in panel below and mouse-over to view more detail"), wellPanel("Use the slider to select a year to view in panel below.",
"Choose the 'Authorities compared' tab to compare emissions for all local authority areas,",
"or 'Authority detail' tab to view historic emissions for a single area."),
sliderInput("yearSlider", label = "Year", min = 2005, sliderInput("yearSlider", label = "Year", min = 2005,
max = 2018, value = 2018, step = 1, round = TRUE, max = 2018, value = 2018, step = 1, round = TRUE,
ticks = FALSE, width = "90%", sep = "", ticks = FALSE, width = "95%", sep = "",
animate = animationOptions(1200)), animate = animationOptions(1200)),
tabsetPanel( tabsetPanel(
tabPanel("Authorities compared", tabPanel("Authorities compared",
...@@ -228,8 +243,7 @@ server <- function(input, output, session) { ...@@ -228,8 +243,7 @@ server <- function(input, output, session) {
output$plot <- renderPlot({ output$plot <- renderPlot({
plotCaption = paste0("Emissions data: Department for Business, Energy & Industrial Strategy", plotCaption = paste0("Emissions data: Department for Business, Energy & Industrial Strategy",
"\nLocal authority boundary data (2018): ONS Open Geography Portal", "\nVisualisation by Tom Rushby - rushby.shinyapps.io/LAemissions")
"\nVisualisation: rushby.shinyapps.io/LAemissions")
if(is.null(input$authmap_shape_click$id)){ if(is.null(input$authmap_shape_click$id)){
auth_area <- " Hampshire" auth_area <- " Hampshire"
...@@ -291,6 +305,9 @@ server <- function(input, output, session) { ...@@ -291,6 +305,9 @@ server <- function(input, output, session) {
output$plot_by_auth <- renderPlot({ output$plot_by_auth <- renderPlot({
plotCaption = paste0("Emissions data: Department for Business, Energy & Industrial Strategy",
"\nVisualisation by Tom Rushby - rushby.shinyapps.io/LAemissions")
plotTitle = paste0("Greenhouse gas emissions by sector for Hampshire local authorities: ",input$yearSlider) plotTitle = paste0("Greenhouse gas emissions by sector for Hampshire local authorities: ",input$yearSlider)
ggplot() + ggplot() +
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment