From 36446df4aedd1f29817cf0e03d5fe50004574344 Mon Sep 17 00:00:00 2001 From: Millicool Date: Wed, 21 Jan 2026 10:23:38 +0100 Subject: [PATCH] Make year selectable for comparison --- server.R | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/server.R b/server.R index a6a3bff..efbb063 100644 --- a/server.R +++ b/server.R @@ -39,6 +39,10 @@ server <- function(input, output, session) { currently_selected_maptype(input$rd_maptype) }) + observeEvent(input$vergleichs_jahr, { + currently_compared_year(input$vergleichs_jahr) + }) + observe({ maptype <- currently_selected_maptype() heatmap <- currently_selected_heatmap_crime() @@ -257,7 +261,7 @@ server <- function(input, output, session) { data_tibble <- map_data_to_plot( locations = currently_compared_location(), crimes = currently_compared_crimes(), - year = "2024" + year = currently_compared_year() ) ggplot(data_tibble, aes(x = Location, y = Erfasst, group = Name, fill = Name)) +