From b67758b11bb10748c79aa7ed7254fdef39571923 Mon Sep 17 00:00:00 2001 From: Millicool Date: Wed, 21 Jan 2026 18:53:09 +0100 Subject: [PATCH] Fix quering Bezirk substring matching --- global.R | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/global.R b/global.R index ccc034c..12abf5c 100644 --- a/global.R +++ b/global.R @@ -64,10 +64,9 @@ map_data_to_plot <- function(locations, crimes, year) { return(map_df(locations, function(loc) { bezirk <- "" stadtteil <- "" - if (substring(loc, 0, 6) == "Bezirk") { - bezirk <- substring(loc, 7) + if (substring(loc, 1, 6) == "Bezirk") { + bezirk <- substring(loc, 8, nchar(loc)) stadtteil <- loc - } else { bezirk <- get_bezirk_by_stadtteil(loc)