traveltime_stats() generates a summary of the
traveltime() function results, producing a statistic for
the percent of demand which is covered within a given objective travel time
along with a cumulative curve plot.
Usage
traveltime_stats(
traveltime,
demand,
objectiveminutes = 15,
breaks = c(5, 10, 15, 30),
print = TRUE
)Arguments
- traveltime
A
listwith the output of thetraveltime()function.- demand
A
RasterLayerobject with the demand layer (e.g. population density).- objectiveminutes
(optional) A number indicating the target travel time in minutes used to compute the statistics (default:
15).- breaks
(optional) A
numericobject indicating the breaks (in minutes) for the cumulative curve plot (default:c(5, 10, 15, 30)).(optional) A
logicalflag indicating whether to print the results to the console (default:TRUE).
Value
An invisible list with the
following elements:
coverage: Anumericvalue indicating the share of demand covered within the objective travel time.unmet_demand: Anumericvalue indicating the share of demand that remains unmet.data: Atibbleobject with the data used to generate the cumulative curve plot.plot: Aggplotobject with the cumulative curve plot.
See also
Other travel time functions:
friction(),
traveltime(),
traveltime_plot()
Examples
if (FALSE) { # \dontrun{
traveltime_data <-
naples_fountains |>
traveltime(
bb_area = naples_shape,
dowscaling_model_type = "lm",
mode = "walk",
res_output = 100
)
traveltime_data |>
traveltime_stats(
demand = naples_population,
objectiveminutes = 15,
breaks = c(5, 10, 15, 30)
)
} # }