# analysis of traffic accidents in traffic jam hours and other hours.
accidents <- emergency |> dplyr::filter(title == "Traffic: VEHICLE ACCIDENT -")
spanning <- span_time("20151210 16", "20161017 17", tz = "EST") |>
subset_span(list(hour = c(6, 9, 16, 19)))
thicken_cust(accidents, spanning, "period") |>
dplyr::count(period) |>
pad_cust(spanning)
Run the code above in your browser using DataLab