Skip to contents

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.

Usage

gg_car_speed_v85(
  enriched_data,
  date_range = NULL,
  segments = NULL,
  weekday = NULL,
  hours = NULL,
  aggregated_by = NULL
)

Arguments

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).

Value

Graph showing the average of v85 speed per hour.

Examples

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")