diff --git a/howTo/openGeogAPI/app3.R b/howTo/openGeogAPI/app3.R index d9ec1dcc075db7783b599e174c3851ceb87a1f10..21dfc2e24f63dcb3e77a301271a2c1937748dcbe 100644 --- a/howTo/openGeogAPI/app3.R +++ b/howTo/openGeogAPI/app3.R @@ -156,19 +156,34 @@ sf_data$popup_text <- 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( 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")), 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, max = 2018, value = 2018, step = 1, round = TRUE, - ticks = FALSE, width = "90%", sep = "", + ticks = FALSE, width = "95%", sep = "", animate = animationOptions(1200)), tabsetPanel( tabPanel("Authorities compared", @@ -228,8 +243,7 @@ server <- function(input, output, session) { output$plot <- renderPlot({ plotCaption = paste0("Emissions data: Department for Business, Energy & Industrial Strategy", - "\nLocal authority boundary data (2018): ONS Open Geography Portal", - "\nVisualisation: rushby.shinyapps.io/LAemissions") + "\nVisualisation by Tom Rushby - rushby.shinyapps.io/LAemissions") if(is.null(input$authmap_shape_click$id)){ auth_area <- " Hampshire" @@ -290,6 +304,9 @@ server <- function(input, output, session) { }) 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)