Learn R Programming

⚠️There's a newer version (1.7.0) of this package.Take me there.

tidytransit (version 1.4)

Read, Validate, Analyze, and Map GTFS Feeds

Description

Read General Transit Feed Specification (GTFS) zipfiles into a list of R dataframes. Perform validation of the data structure against the specification. Analyze the headways and frequencies at routes and stops. Create maps and perform spatial analysis on the routes and stops. Please see the GTFS documentation here for more detail: .

Copy Link

Version

Install

install.packages('tidytransit')

Monthly Downloads

670

Version

1.4

License

GPL

Issues

Pull Requests

Stars

Forks

Maintainer

Flavio Poletti

Last Published

August 26th, 2022

Functions in tidytransit (1.4)

gtfs_duke

Example GTFS data
get_stop_frequency

Get Stop Frequency
get_route_frequency

Get Route Frequency
na_to_empty_strings

Convert NA values to empty strings ("")
gtfs_as_sf

Convert stops and shapes to Simple Features
get_route_geometry

Get all trip shapes for a given route and service
get_trip_geometry

Get all trip shapes for given trip ids
gtfs_transform

Transform or convert coordinates of a gtfs feed
print.tidygtfs

Print a GTFS object
read_gtfs

Read and validate GTFS files
plot.tidygtfs

Plot GTFS stops and trips
route_type_names

Dataframe of route type id's and the names of the types (e.g. "Bus")
raptor

Calculate travel times from one stop to all reachable stops
sf_points_to_df

Adds the coordinates of an sf POINT object as columns
stops_as_sf

Convert stops into Simple Features Points
validate_gtfs

Validate GTFS file
travel_times

Calculate shortest travel times from a stop to all reachable stops
set_dates_services

Returns all possible date/service_id combinations as a data frame
sf_as_tbl

Convert stops and shapes from sf objects to tibbles
sf_lines_to_df

Adds the coordinates of an sf LINESTRING object as columns and rows
set_servicepattern

Calculate servicepattern ids for a gtfs feed
shapes_as_sf

Convert shapes into Simple Features Linestrings
write_gtfs

Write a tidygtfs object to a zip file
summary.tidygtfs

GTFS feed summary
stop_group_distances

Calculates distances among stop within the same group column
stop_distances

Calculate distances between a given set of stops
empty_strings_to_na

Convert empty strings ("") to NA values in all gtfs tables
filter_feed_by_area

Filter a gtfs feed so that it only contains trips that pass a given area
filter_feed_by_date

Filter a gtfs feed so that it only contains trips running on a given date
filter_feed_by_stops

Filter a gtfs feed so that it only contains trips that pass the given stops
filter_stop_times

Filter a stop_times table for a given date and timespan.
convert_times_to_hms

Convert time columns to hms::hms in feed
filter_feed_by_trips

Filter a gtfs feed so that it only contains a given set of trips
feed_contains

Returns TRUE if the given gtfs_obj contains the table. Used to check for tidytransit's calculated tables in sublist (gtfs_obj$.)
cluster_stops

Cluster nearby stops within a group
agency_info

Create a text listing the first max_agencies agencies of the feed
filter_stops

Get a set of stops for a given set of service ids and route ids