Skip to contents

Aggregates overlapping bicycle routes to identify high-demand corridors suitable for bike bus implementation. Routes are scored by distance-weighted cycling potential for prioritization.

Usage

cycle_bus_routes(
  routes,
  min_trips = 0,
  attribute_trips = c("bicycle_godutch", "quietness", "gradient_smooth"),
  trips.col = names(routes)[grep("trip", names(routes))],
  buffer = 10
)

Arguments

routes

An sf object with route geometries and cycling attributes.

min_trips

Minimum threshold for attribute filtering. Default: 0.

attribute_trips

Attribute for scoring: "bicycle_godutch", "quietness", or "gradient_smooth".

trips.col

Column name(s) for trip counts. Auto-detected by default.

buffer

Buffer distance (meters) for spatial operations. Default: 10.

Value

An sf object with optimized routes, sorted by distance-weighted scores. Lower scores indicate higher priority routes.

See also

Examples

if (FALSE) { # \dontrun{
# Basic usage
bike_network <- cycle_bus_routes(routes_almada)

# High-potential routes only
priority_routes <- cycle_bus_routes(routes_almada, min_trips = 5, 
                                  attribute_trips = "bicycle_godutch")
} # }