Add comparison selection
This commit is contained in:
21
ui.R
21
ui.R
@@ -1,5 +1,5 @@
|
|||||||
|
|
||||||
library(bsicons)
|
library(bsicons)
|
||||||
|
source("global.R")
|
||||||
ui <- function() {
|
ui <- function() {
|
||||||
page_fillable(
|
page_fillable(
|
||||||
h1("Kriminalstatistik Hamburg",
|
h1("Kriminalstatistik Hamburg",
|
||||||
@@ -85,6 +85,7 @@ ui <- function() {
|
|||||||
layout_sidebar(
|
layout_sidebar(
|
||||||
sidebar = sidebar(
|
sidebar = sidebar(
|
||||||
title = "Vergleichs-Optionen",
|
title = "Vergleichs-Optionen",
|
||||||
|
width = 400,
|
||||||
radioButtons(
|
radioButtons(
|
||||||
"vergleichs_modus",
|
"vergleichs_modus",
|
||||||
"Wählen Sie den Vergleichstyp:",
|
"Wählen Sie den Vergleichstyp:",
|
||||||
@@ -100,17 +101,31 @@ ui <- function() {
|
|||||||
# 2. Dynamische Input-Felder für die Orte und Straftaten
|
# 2. Dynamische Input-Felder für die Orte und Straftaten
|
||||||
uiOutput("vergleichs_inputs"),
|
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
|
# 3. Gemeinsamer Input: Das Jahr
|
||||||
selectizeInput(
|
selectizeInput(
|
||||||
"vergleichs_jahr",
|
"vergleichs_jahr",
|
||||||
"Jahr wählen:",
|
"Jahr wählen:",
|
||||||
choices = c(2024, 2023),
|
choices = c(2024, 2023),
|
||||||
selected = 2024
|
selected = 2024,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
card(
|
card(
|
||||||
card_header(uiOutput("vergleichs_titel")), # Dynamischer Titel
|
card_header(uiOutput("vergleichs_titel")), # Dynamischer Titel
|
||||||
plotOutput("vergleichs_plot")
|
plotOutput("vergleich_balkendiagramm")
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
|
|||||||
Reference in New Issue
Block a user