View source: R/remove_unused_ids.R
| remove_unused_ids | R Documentation |
Removes the ids that the feed doesn't use, with their entries in every
file. A trip is used if it has stop_times, and anything that a used trip
refers to, directly or indirectly, is used too. Entries that refer to
removed ids are removed as well, including those in attributions and
translations. When there are no fare_rules, fare_attributes and their
agencies are kept, since these fares apply to the whole feed. Fares v2 and
GTFS-Flex files are left unchanged, so they may still refer to removed ids.
remove_unused_ids(gtfs)
gtfs |
A GTFS object, as created by |
The GTFS object without unused ids.
filter_by_trip_id(), remove_duplicates()
data_path <- system.file("extdata/ber_gtfs.zip", package = "gtfstools")
gtfs <- read_gtfs(data_path)
nrow(gtfs$agency)
gtfs <- remove_unused_ids(gtfs)
nrow(gtfs$agency)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.