Skip to contents

Takes the tibble created by read_output_trips and categorizes the traveled distances into pre-defined bins to plot a histogram of the traveled distances. (Bins: 1000,2000,5000,10000,20000,50000,100000 (m)) Using the parameter unite_modes, specific modes can be renamed into one with the name specified with united_name (by default 'united')

Usage

plot_distcat_by_mainmode_barchart(
  trips_table,
  unite_modes = character(0),
  united_name = "united",
  dist_column = "dist_cat",
  distances_array = c(1000, 2000, 5000, 10000, 20000, 50000, 1e+05)
)

Arguments

trips_table

tibble of trips_output (from read_output_trips)

unite_modes

optional, vector of character strings, changes names of chosen modes in the column main_mode to a new chosen name (i.e. drtNorth and drtSouth to drt), using the function (process_rename_mainmodes)

united_name

optional, character string, specifies the name of the united mode

dist_column

character string specifying the column name in the trips_table tibble that contains the distance categories

distances_array

numeric vector defining the distance thresholds for creating distance categories

Value

Plotly bar Chart of count of trips among distance traveled