Hi,
I would like to see at any given minute of the day how many bus shelters are being used at any given point to help with social distancing of COVID.
I would like to see the data in this format:
Time | BusID | Shelter |
---|---|---|
03/06/2020 05:20 | AA1 | 239 |
03/06/2020 05:21 | AA1 | 239 |
03/06/2020 05:22 | AA1 | 239 |
03/06/2020 05:23 | AA1 | 239 |
03/06/2020 05:24 | AA1 | 239 |
03/06/2020 06:18 | AA2 | 220 |
03/06/2020 06:19 | AA2 | 220 |
03/06/2020 06:20 | AA2 | 220 |
03/06/2020 06:21 | AA2 | 220 |
The code I have at present, expands the times but I cant seem to add in BusID or Shelter.
df <- data.frame(StandOccupancy = seq(from = min(ArrivalTime), to = max(DepartureTime), by = 60)) # 60 seconds = 1 minutes
Any help would be appreciated.
tibble::tribble(
~IncomingBusID, ~ArrivalTime, ~OutGoingBusID, ~DepartureTime, ~BusShelter,
"AA1", "03/06/2020 05:20", "AA1", "03/06/2020 05:24", 239,
"AA2", "03/06/2020 06:18", "AA2", "03/06/2020 06:21", 220
)