GTFSwizard

GTFSwizard

Source version 1.2.2 (prepared: 2026-11-16)
CRAN version 1.2.1 (published: 2026-08-21)

Lifecycle: experimental Development version: 1.2.2 CRAN version R CMD check Coverage License: GPL-3 Dependencies CRAN/METACRAN Total downloads

GTFSwizard is a set of tools for creating, exploring, and manipulating General Transit Feed Specification (GTFS) files in R.

Its main purpose is to give researchers and practitioners a straightforward way to explore and simulate changes within GTFS files, which represent public transportation schedules and geographic data.

Install

# Stable release
install.packages("GTFSwizard")

# Development version
remotes::install_github(
  "nelsonquesado/GTFSwizard@main"
)

Work With GTFS

  • Create and validate: build feeds from data frames with create_gtfs(), or import an existing archive with read_gtfs(). Check the original archive against the GTFS specification with validate_gtfs().
  • Analyze service: calculate frequency, headways, dwell time, duration, speed, fleet requirements, service span, corridors, and hubs.
  • Build scenarios: filter routes, services, dates, stops, and time windows; then delay, split, merge, or edit scheduled trips.
  • Explore visually: use explore_gtfs() for interactive maps, planning indicators, service plots, editing, and export.

Quick Start

The package includes Fortaleza rail and bus feeds and bcn_bus_gtfs, a historical Barcelona AMB Mobilitat bus feed with six agencies, 128 routes, 25,122 trips, and 3,385 stops. The main workflows can be tried without downloading external data.

library(GTFSwizard)

gtfs <- for_rail_gtfs
summary(gtfs)

get_frequency(gtfs, method = "by_route")
plot_calendar(gtfs, fill = "service_pattern", facet_by_year = TRUE)

Launch the dashboard from an object, or omit the object to choose a GTFS zip archive interactively.

explore_gtfs(for_rail_gtfs)
# explore_gtfs()

GTFSwizard dashboard showing a transit network

Compare scheduled supply

Use filter_area() to select trips serving a study area, then compare two timetables with compare_scenarios() on a common service date. Results include departures, vehicle-hours, vehicle-kilometres, service span, headway and peak concurrent trips. The filtering and editing guide shows the workflow.

Guides

Citation

Use citation("GTFSwizard") to obtain the current package citation. Related publications and project details are listed in the repository README.