Learn R Programming

GTFSwizard (version 1.1.0)

plot_hubs: Plot Transit Hubs

Description

The `plot_hubs` function visualizes high-density potential integration transit stops (hubs) on a map. It overlays the identified stops on the route shapes from the GTFS data, providing a representation of the transit network and its key integration hubs.

Usage

plot_hubs(gtfs, i = 0.05)

Value

A `ggplot` object representing the transit network with hubs overlaid. The plot includes:

Base map

Route shapes from the GTFS data, displayed in gray.

Hubs

High-density transit stops.

Arguments

gtfs

A GTFS object, preferably of class `wizardgtfs`. If not, the function will attempt to convert it using `GTFSwizard::as_wizardgtfs()`.

i

A numeric value representing the percentile threshold for selecting high-density stops. Defaults to `0.05` (top 5% of stops by number of routes).

See Also

[GTFSwizard::get_hubs()], [GTFSwizard::get_shapes_sf()]

Examples

Run this code
plot_hubs(for_bus_gtfs, i = 0.02)


Run the code above in your browser using DataLab