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

Set default local auth area.

parent c707a074
No related branches found
No related tags found
No related merge requests found
......@@ -170,9 +170,15 @@ server <- function(input, output, session) {
"\nLocal authority boundary data (2018): ONS Open Geography Portal",
"\nVisualisation: rushby.shinyapps.io/LAemissions")
plotTitle = paste0("Greenhouse gas emissions by sector for ",input$authmap_shape_click$id)
if(is.null(input$authmap_shape_click$id)){
auth_area <- "Southampton"
} else {
auth_area <- input$authmap_shape_click$id
}
plotTitle = paste0("Greenhouse gas emissions by sector for ",auth_area)
ggplot(ghg_subset(auth_area = input$authmap_shape_click$id), aes(x = Year, y = value)) +
ggplot(ghg_subset(auth_area = auth_area), aes(x = Year, y = value)) +
geom_col(aes(fill = variable), position = "stack") +
scale_x_continuous(limits = c(x_min-1,x_max+1), breaks = x_min:x_max) +
#scale_y_continuous(limits = c(y_min,y_max)) +
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment