You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# locations where (closeby) also bicycles are counted, in the same order as http://www.stadt-muenster.de/verkehrsplanung/verkehr-in-zahlen/radverkehrszaehlungen.html
43
-
"01080", # Neutor
41
+
c(# locations where (closeby) also bicycles are counted, in the same order as http://www.stadt-muenster.de/verkehrsplanung/verkehr-in-zahlen/radverkehrszaehlungen.html
42
+
"01080", # Neutor
44
43
"04050", # Wolbecker Straße / Servatiiplatz
45
44
"03052", # Hüfferstraße
46
45
"07030", # Hammer Straße
@@ -61,6 +60,11 @@ process_df <- function(df) {
61
60
df<-
62
61
df %>%
63
62
gather(hour, count, -location, -date) %>%
63
+
mutate(year= as.integer(year(date))) %>%
64
+
mutate(month= as.integer(month(date))) %>%
65
+
mutate(day= as.integer(day(date))) %>%
66
+
mutate(weekday= wday(date, label=T, abbr=T)) %>%
67
+
mutate(weekend= is.weekend(date)) %>%
64
68
# 'hour' to integer format
65
69
mutate(hour= substring(hour, 2)) %>%
66
70
mutate(hour= as.integer(hour)) %>%
@@ -92,5 +96,6 @@ for (raw_file in raw_files) {
92
96
}
93
97
94
98
dbExecute(con, "CREATE INDEX timestamp_cars on cars (date, hour)")
99
+
dbExecute(con, "CREATE INDEX year_month_day_cars on cars (year, month, day, hour)")
95
100
dbExecute(con, "CREATE INDEX location_cars on cars (location)")
0 commit comments