Fix quering Bezirk substring matching
This commit is contained in:
5
global.R
5
global.R
@@ -64,10 +64,9 @@ map_data_to_plot <- function(locations, crimes, year) {
|
|||||||
return(map_df(locations, function(loc) {
|
return(map_df(locations, function(loc) {
|
||||||
bezirk <- ""
|
bezirk <- ""
|
||||||
stadtteil <- ""
|
stadtteil <- ""
|
||||||
if (substring(loc, 0, 6) == "Bezirk") {
|
if (substring(loc, 1, 6) == "Bezirk") {
|
||||||
bezirk <- substring(loc, 7)
|
bezirk <- substring(loc, 8, nchar(loc))
|
||||||
stadtteil <- loc
|
stadtteil <- loc
|
||||||
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
bezirk <- get_bezirk_by_stadtteil(loc)
|
bezirk <- get_bezirk_by_stadtteil(loc)
|
||||||
|
|||||||
Reference in New Issue
Block a user