gtfs_remove_unused: GTFS cleaning functions

gtfs_remove_unusedR Documentation

GTFS cleaning functions

Description

Functions to remove items from a GTFS if they are not used in either the trips (for routes, shapes, and service_ids) or stop_times (for stops) file.

Usage

remove_unused_stops(gtfs, retain_stops = FALSE)

remove_unused_shapes(gtfs, retain_shapes = FALSE)

remove_unused_routes(gtfs, retain_routes = FALSE)

remove_unused_service(gtfs, retain_service = FALSE)

gtfs_remove_all(
  gtfs,
  retain_all = FALSE,
  retain_stops = FALSE,
  retain_shapes = FALSE,
  retain_routes = FALSE,
  retain_service = FALSE
)

Arguments

gtfs

A GTFS file stored as a list

retain_stops

Whether to retain the unused stops (in gtfs$stops_unused)

retain_shapes

Whether to retain the unused shapes (in gtfs$shapes_unused)

retain_routes

Whether to retain the unused routes (in gtfs$routes_unused)

retain_service

Whether to retain the unused service_ids (in gtfs$calendar_unused)

retain_all

Whether to retain removed components

Value

A GTFS file stored as a list. If gtfs_remove_all() is called, stops, shapes, routes, and service_ids that are not used by the trips.txt or stop_times.txt files will be removed. Other functions pertain to specific files.

See Also

Other gtfs cleaning functions: gtfs_removal_check()

Examples

## Not run: 
gtfs_remove_all(gtfs)

## End(Not run)

kmeakinmbta/opmitools documentation built on Oct. 25, 2023, 10:34 a.m.