Skip to contents

For each stop, returns the number of departures aggregated per hour.

Usage

get_stop_frequency_hourly(
  gtfs,
  date = GTFShift::calendar_nextBusinessWednesday()
)

Arguments

gtfs

tidygtfs. GTFS feed.

date

Date (Default GTFShift::calendar_nextBusinessWednesday()). Reference date to consider when analyzing the GTFS file.

Value

An sf data.frame object with the following columns:

stop_id

The stop_id attribute from stops.txt file.

hour

The hour for which the frequency applies (24 hour format).

frequency

The number of services provided at the stop for the corresponding 60 minutes period.

geometry

The stop coordinates.

Details

This method analyses the GTFS feed for a representative day, generating for each stop the number of services aggregated per hour. For a detailed example, see the vignette("analyse").

Examples

if (FALSE) { # \dontrun{
gtfs <- GTFShift::load_feed("gtfs.zip")
frequency_analysis <- GTFShift::get_stop_frequency_hourly(gtfs)
} # }