View source: R/fare_structure.R
setup_fare_structure | R Documentation |
Creates a basic fare structure that describes how transit fares should be
calculated in travel_time_matrix()
, expanded_travel_time_matrix()
,
accessibility()
and pareto_frontier()
. This fare structure can be
manually edited and adjusted to the existing rules in your study area, as
long as they stick to some basic premises. Please see the fare-structure vignette for more information.
setup_fare_structure(
r5r_network,
r5r_core = deprecated(),
base_fare,
by = "MODE",
debug_path = NULL,
debug_info = NULL
)
r5r_network |
A routable transport network created with |
r5r_core |
The |
base_fare |
A numeric. A base value used to populate the fare structure. |
by |
A string. Describes how |
debug_path |
Either a path to a |
debug_info |
Either a string (when |
A fare structure object.
Other fare structure:
read_fare_structure()
,
write_fare_structure()
library(r5r)
data_path <- system.file("extdata/poa", package = "r5r")
r5r_network <- build_network(data_path)
fare_structure <- setup_fare_structure(r5r_network, base_fare = 5)
# to debug fare calculation
fare_structure <- setup_fare_structure(
r5r_network,
base_fare = 5,
debug_path = "fare_debug.csv",
debug_info = "MODE"
)
fare_structure$debug_settings
# debugging can be manually turned off by setting output_file to ""
fare_structure$debug_settings <- ""
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.