View source: R/plot_car_speed.R
gg_car_speed_v85 | R Documentation |
v85 is the estimated car speed limit in km/h that 85% of all cars respect. 15% of drivers drive faster than this v85 indicator.
gg_car_speed_v85(
enriched_data,
date_range = NULL,
segments = NULL,
weekday = NULL,
hours = NULL,
aggregated_by = NULL
)
enriched_data |
enriched data.frame containing all the data for all your sensors |
date_range |
Date vector. Example: c('2021-01-01','2022-01-01'). Full period if NULL (default). |
segments |
Character vector. Selected road segment, all if NULL (default). |
weekday |
Character vector. Weekday choosen. Default to the all week. |
hours |
Integer vector. Hours choosen, default to the all day. |
aggregated_by |
Character. Enables comparison with other segments or weekdays. Options are : 'segment_name', 'weekday', NULL (no comparison, default). |
Graph showing the average of v85 speed per hour.
library(dplyr)
subset_traffic <- traffic %>% filter(day < '2022-02-01', hour > 9)
gg_car_speed_histogram(subset_traffic[0:100,])
gg_car_speed_histogram(subset_traffic, aggregated_by = 'segment_name')
gg_car_speed_histogram(subset_traffic,
weekday = c('monday','sunday'),
segments = 'RteVitre-06',
hours = 17:20,
aggregated_by = "weekday")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.