Title: | Calibration of travel times to empirical data |
---|---|
Description: | Calibration of travel times to empirical data. |
Authors: | Mark Padgham [aut, cre] |
Maintainer: | Mark Padgham <[email protected]> |
License: | GPL-3 |
Version: | 0.1.0.009 |
Built: | 2024-11-13 06:00:44 UTC |
Source: | https://github.com/UrbanAnalyst/ttcalib |
This calibration step is performed after calibration to waiting-time penalties for traffic lights and turning across oncoming traffic, performed with the ttcalib_penalties function. For Santiago, that function gives an optimal waiting time at traffic lights of 16 seconds, and waiting time to turn across oncoming traffic of 1 second. These values should be used to generate a weighted network with time-based centrality via the ttcalib_streetnet function.
ttcalib_centrality( path_graph, path_uberdata, city = "santiago", hours = c(7, 10), turn_penalty = 1 )
ttcalib_centrality( path_graph, path_uberdata, city = "santiago", hours = c(7, 10), turn_penalty = 1 )
path_graph |
Path to locally-saved |
path_uberdata |
Path to Uber movement data. |
city |
Currently only accepts "santiago" |
hours |
A vector of two values defining the range of hours for Uber
Movement data to be filtered. Value of |
turn_penalty |
The value of the time penalty for waiting to turn across
oncoming traffic used to generate the graph stored at |
The result of that call is presumed to have been saved using the fst
package (with write_fst
), which strips all attributes of the graph. These
attributes must then be manually re-instated, and so are required to be
submitted as parameters to
this function.
Currently hard-coded to Brussels or Santiago data only.
ttcalib_geodata(path, city = "santiago")
ttcalib_geodata(path, city = "santiago")
path |
Path to directory containing Uber movement data. |
city |
One of "brussels" or "santiago" (case-insensitive). |
A 'data.frame' with centroids of polygons used to aggregate movement data.
Calculate standard error against 'uber' data for all weighted networks generated via ttcalib_streetnet_batch.
ttcalib_penalties(path_results, path_uberdata, city, hours = NULL)
ttcalib_penalties(path_results, path_uberdata, city, hours = NULL)
path_results |
Path to directory holding main OSM network data, including a sub-directory with output of ttcalib_streetnet_batch. |
path_uberdata |
Path to Uber movement data. |
city |
One of "brussels" or "santiago" (case-insensitive). |
hours |
A vector of two values defining the range of hours for data to
be filtered. Default of |
Load an 'SC' street network, weight for motorcar routing, and optionally calculate centrality.
ttcalib_streetnet( path, centrality = FALSE, penalty_traffic_lights = 8, penalty_turn = 7.5, dist_threshold = 10000 )
ttcalib_streetnet( path, centrality = FALSE, penalty_traffic_lights = 8, penalty_turn = 7.5, dist_threshold = 10000 )
path |
Path to 'SC'-format file containing street network data. |
centrality |
If |
penalty_traffic_lights |
Time penalty for waiting at traffic lights (in seconds). |
penalty_turn |
Time penalty for turning across oncoming traffic. |
dist_threshold |
Threshold used for centrality calculations (in metres); see documentation for dodgr function, 'dodgr_centrality' for information. |
Network with centrality estimates on each edge.
This function produces an array of differently-weighted streetnets, each
locally saved to a uniquely-named file. The resultant graphs are saved with
the fst package, which removes the necessary attributes of the
resultant data.frame
objects. These must be manually restored prior to
submitting to ttcalib_traveltimes. Required attributes are:
"left_side", passed as same parameter to dodgr function
wt_streetnet
.
"wt_profile", passed as same parameter to dodgr function
wt_streetnet
, and which should generally be "motorcar" here.
ttcalib_streetnet_batch(path, penalty_traffic_lights = 1:10)
ttcalib_streetnet_batch(path, penalty_traffic_lights = 1:10)
path |
Path to 'SC'-format file containing street network data. |
penalty_traffic_lights |
Time penalty for waiting at traffic lights (in seconds). |
This function only generated weighted networks for a range of traffic light penalties. Turn penalties are calculated on-the-fly in m4ra for each routing call, and can be specified by modifying the "turn_penalty" attribute of the graph.
Estimate travel times between all Uber movement polygons
ttcalib_traveltimes(graph, geodata, uberdata)
ttcalib_traveltimes(graph, geodata, uberdata)
graph |
A dodgr graph returned from ttcalib_streetnet. |
geodata |
A |
uberdata |
A |
A 'data.frame' with columns of m4ra estimates of travel times and corresponding empirical values from Uber movement data.
Currently hard-coded to Brussels data only.
ttcalib_uberdata(path, city = "santiago", hours = NULL)
ttcalib_uberdata(path, city = "santiago", hours = NULL)
path |
Path to directory containing Uber movement data. |
city |
One of "brussels" or "santiago" (case-insensitive). |
hours |
A vector of two values defining the range of hours for data to
be filtered. Default of |
A 'data.frame' of Uber Movement estimates of travel times.