From edb880b9b891a0e88b244916a865b74c79f6702a Mon Sep 17 00:00:00 2001 From: Millicool Date: Wed, 7 Jan 2026 22:08:35 +0100 Subject: [PATCH] Add comparison selection --- ui.R | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/ui.R b/ui.R index d6f7236..9437292 100644 --- a/ui.R +++ b/ui.R @@ -1,5 +1,5 @@ - library(bsicons) +source("global.R") ui <- function() { page_fillable( h1("Kriminalstatistik Hamburg", @@ -85,6 +85,7 @@ ui <- function() { layout_sidebar( sidebar = sidebar( title = "Vergleichs-Optionen", + width = 400, radioButtons( "vergleichs_modus", "Wählen Sie den Vergleichstyp:", @@ -100,17 +101,31 @@ ui <- function() { # 2. Dynamische Input-Felder für die Orte und Straftaten uiOutput("vergleichs_inputs"), + selectizeInput( + "vergleich_location", + "Zu vergleichende Orte", + choices = auswahlmöglichkeiten, + multiple = TRUE + + ), + + selectizeInput( + "vergleich_straftat", + "Zu vergleichende Straftaten", + choices = list_of_crimes, + multiple = TRUE + ), # 3. Gemeinsamer Input: Das Jahr selectizeInput( "vergleichs_jahr", "Jahr wählen:", choices = c(2024, 2023), - selected = 2024 + selected = 2024, ), ), card( card_header(uiOutput("vergleichs_titel")), # Dynamischer Titel - plotOutput("vergleichs_plot") + plotOutput("vergleich_balkendiagramm") ) ) ),