Make year selectable for comparison
This commit is contained in:
6
server.R
6
server.R
@@ -39,6 +39,10 @@ server <- function(input, output, session) {
|
|||||||
currently_selected_maptype(input$rd_maptype)
|
currently_selected_maptype(input$rd_maptype)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
observeEvent(input$vergleichs_jahr, {
|
||||||
|
currently_compared_year(input$vergleichs_jahr)
|
||||||
|
})
|
||||||
|
|
||||||
observe({
|
observe({
|
||||||
maptype <- currently_selected_maptype()
|
maptype <- currently_selected_maptype()
|
||||||
heatmap <- currently_selected_heatmap_crime()
|
heatmap <- currently_selected_heatmap_crime()
|
||||||
@@ -257,7 +261,7 @@ server <- function(input, output, session) {
|
|||||||
data_tibble <- map_data_to_plot(
|
data_tibble <- map_data_to_plot(
|
||||||
locations = currently_compared_location(),
|
locations = currently_compared_location(),
|
||||||
crimes = currently_compared_crimes(),
|
crimes = currently_compared_crimes(),
|
||||||
year = "2024"
|
year = currently_compared_year()
|
||||||
)
|
)
|
||||||
|
|
||||||
ggplot(data_tibble, aes(x = Location, y = Erfasst, group = Name, fill = Name)) +
|
ggplot(data_tibble, aes(x = Location, y = Erfasst, group = Name, fill = Name)) +
|
||||||
|
|||||||
Reference in New Issue
Block a user