Plots a bar chart with spatial type on x-axis and traveled distance on y-axis
Source:R/output_trips.R
plot_distance_by_spatialcat_barchart.Rd
Takes the tibble created by read_output_trips and an sf object (can be created using the function st_read()) to first use the function process_append_spatialcat to categorize all trips into the following spatial categories: - inside: trips that start and end inside the given shape - originating: trips that start inside the shape and end outside of the shape - destinating: trips that end inside the shape and start outside of the shape - outside: trips that start and end outside of the shape
Arguments
- trips_table
tibble of trips_output (from read_output_trips)
- shape_table
sf object(data frame with geometries), can be created using st_read(), is used to categorize the trips.
- crs
numeric representation of the EPSG code or proj4string for the corresponding coordinate system of the trip coordinates, can be found in network file from output directory of MATSim simulation
- euclidean
boolean indicating whether to calculate the average as euclidean distance or as travel distance. Default is FALSE, which calculates the average traveled distance.