powered by
A short description... Average of traffic during a week, over a period for a segment or a subset of segment, for a transportation mode or more, for a direction or both.
gg_traffic_avg( enriched_data, date_range = NULL, segments = NULL, modes = c("heavy", "car"), direction = "both", weekday = NULL, aggregated_by = "weekday" )
Graph showing weekly average evolution of traffic (for specified parameters) during the specified period.
enriched data.frame containing all the data for all your sensors
Date vector. example: c('2021-01-01','2022-01-01'). Full period if NULL (default).
Character vector. Selected road segment, all if NULL (default).
Character vector. Different modes of transportation aggregated (heavy, car, bike, pedestrian) . Default: heavy & car
Character. Direction of the traffic (lft, rgt, both). Default to both.
Character vector. Weekday choosen. Default to the all week.
Character. Options are: 'segment_name', 'weekday', 'direction', 'mode'. Default: 'weekday'.
gg_traffic_avg(traffic) gg_traffic_avg(traffic, date_range = c('2022-07-01','2022-09-01'), segment = 'RteVitre-06', mode = 'car', direction = 'rgt', weekday = c('monday','friday') )
Run the code above in your browser using DataLab