Fix quering Bezirk substring matching

This commit is contained in:
2026-01-21 18:53:09 +01:00
parent b3c0f7a6b8
commit b67758b11b

View File

@@ -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)