knitr::opts_chunk$set(
  collapse = TRUE,
  cache = FALSE,
  comment = "#>",
  message = FALSE,
  error = FALSE,
  warning = FALSE,
  fig.path = "README/README-",
  fig.width=7.3,
  fig.height=5,
  out.width = '100%'
)

[Travis-CI Build Status

Description

bustt is a package for working with time in transit schedule data. In particular, it is focused on questions like:

Installation

You can install this package from GitHub using the devtools package:

if (!require(devtools)) {
    install.packages('devtools')
}
devtools::install_github('r-gtfs/gtschedule')

Example Usage

library(dplyr)
library(trread)
library(bustt)
NYC <- import_gtfs("http://web.mta.info/developers/data/nyct/subway/google_transit.zip")

Route Headways

List the routes with the shortest median headways.

route_frequency_summary <- route_frequency(NYC) %>%
  arrange(median_headways)

head(route_frequency_summary)

Stop Headways

List the stops with the shortest headways in the system.

stop_frequency_summary <- stop_frequency(NYC, by_route=FALSE) %>%
  inner_join(NYC$stops_df) %>%
    select(stop_name, headway) %>%
      arrange(headway)

head(stop_frequency_summary)


r-gtfs/bustt documentation built on May 15, 2019, 10:03 p.m.