diff --git a/howTo/openGeogAPI/app2.R b/howTo/openGeogAPI/app2.R index b3e560c09862887b757e50387534e853452841f7..3d62114e14dea2ce58516720ba20b9c5bd27a975 100644 --- a/howTo/openGeogAPI/app2.R +++ b/howTo/openGeogAPI/app2.R @@ -78,7 +78,7 @@ total_hampshire_dt <- dt %>% mutate(Population = Population*1000) %>% group_by(Year) %>% summarise_if(is.numeric, sum, na.rm = TRUE) %>% - mutate(Name = " Hampshire (Average)", + mutate(Name = " Hampshire", `CTRY18NM/RGN18NM` = "South East", `Second Tier Authority` = "Hampshire", Code = "E00000000") %>% @@ -115,7 +115,7 @@ pc_totals_plot <- melt(pc_totals_plot, id.vars = c("CTRY18NM.RGN18NM","Second.Ti # Functions ---- -ghg_subset <- function(dt, auth_area = "Southampton"){ +ghg_subset <- function(dt, auth_area = " Hampshire"){ dt <- dt %>% filter(dt$Name %in% auth_area) # add filter for categories with input$ @@ -123,7 +123,7 @@ ghg_subset <- function(dt, auth_area = "Southampton"){ -ghg_subset2 <- function(dt, auth_area = "Southampton", plot_year = 2018){ +ghg_subset2 <- function(dt, auth_area = " Hampshire", plot_year = 2018){ dt <- dt %>% filter(dt$Name %in% auth_area, dt$Year == plot_year) @@ -227,7 +227,7 @@ server <- function(input, output, session) { "\nVisualisation: rushby.shinyapps.io/LAemissions") if(is.null(input$authmap_shape_click$id)){ - auth_area <- "Southampton" + auth_area <- " Hampshire" } else { auth_area <- input$authmap_shape_click$id } @@ -256,7 +256,7 @@ server <- function(input, output, session) { output$bar <- renderPlot({ if(is.null(input$authmap_shape_click$id)){ - auth_area <- "Southampton" + auth_area <- " Hampshire" } else { auth_area <- input$authmap_shape_click$id }