filter_agg | R Documentation |
Not all criteria need to be filled in. Unfilled criteria are set by default so that no filtering is performed.
filter_agg(
data,
date_range = NULL,
segments = NULL,
direction = NULL,
modes = NULL,
weekdays = NULL,
hours = NULL,
uptime_quality = TRUE
)
data |
Traffic Data Frame |
date_range |
Date vector, c("aaaa-mm-jj","aaaa-mm-jj") |
segments |
Vector of character. Ids of desired segments. |
direction |
Vector of character. Direction of the street (lft, right, both). |
modes |
Vector of character. Type(s) of mobility: c("car","heavy","pedestrian","bike") |
weekdays |
Vector of character. Weekday(s) choosen. |
hours |
Integer vector. Hours choosen, default to the all day. |
the filtered data, molten by mode and direction, with new columns :
mode
, the mode, one row per different transportation mode + date/hour + direction
direction
, the direction, one row per different transportation mode + date/hour + direction
traffic_sum
, the traffic for this mode/direction on this specific date/hour
date_range = as.Date(c('2022-01-01','2022-01-08'))
filter_agg(traffic,
date_range = date_range,
segments = 'RteVitre-06',
direction = 'lft',
modes = 'pedestrian',
weekdays = 'saturday',
hours = 12:14,
uptime_quality = TRUE
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.