STG: Wrapper function for the SIRItoGTFS library

Description Usage Arguments Details Value References See Also Examples

Description

Performs a comparison between a SIRI data.frame and GTFS tables, requires the SIRI table as well as the minimal GTFS tables to be in the environment. should be used after readGTFS.

Usage

1
2
STG(SIRIDF, GTFSstops., GTFSagency., GTFScalendar., GTFSroutes.,
  GTFSstop_times., GTFStrips., linerefs = NULL, epsg = 2039)

Arguments

SIRIDF

A data.frame containing SIRI protocol data downloaded from a public transportation authority.

GTFSstops.

A GTFS stops table, best load into environment with readGTFS

GTFSagency.

A GTFS agency table, best load into environment with readGTFS

GTFScalendar.

A GTFS calendar table, best load into environment with readGTFS

GTFSroutes.

A GTFS routes table, best load into environment with readGTFS

GTFSstop_times.

A GTFS stop_times table, best load into environment with readGTFS

GTFStrips.

A GTFS trips table, best load into environment with readGTFS

linerefs

Optional, a numeric vector of GTFS route_id numbers to process. if not used all route_id's in the SIRIDF provided will be used.

epsg

The EPSG code for the projection to be used.

Details

The function provides an "easy to use" wrapper for users unfamiliar with the functions in **SIRItoGTFS**. It should be used after a SIRI table has been read into R's environment along with GTFS tables who have a corresponding date. it is best used after readGTFS. the SIRI table used should have the minimal columns: "RecordedAtTime", "MonitoringRef", "LineRef", "DirectionRef", "PublishedLineName", "OperatorRef", "DestinationRef", "OriginAimedDepartureTime", "Longitude", "Latitude", "VehicleRef", "StopPointRef" & "ExpectedArrivalTime". The output table will contain a time and distance comparison between the schedule provided in the GTFS tables and the real-time data provided with the SIRI table.

Value

A data.frame containing a comparison between a public transportation mode's schedule and real-time data.

References

Bogin, D., Levy, N. and Ben-Elia E. (2018) Spatial and Temporal Estimation of the Service Reliability of Public Transportation Using Big Data and Open Source Tools

See Also

readGTFS

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
require(SIRItoGTFS)
require(data.table)
# use the sample SIRI data included with the package
data("sirisample")
SIRIsample$Longitude = as.numeric(SIRIsample$Longitude)
SIRIsample$Latitude = as.numeric(SIRIsample$Latitude)
# load your own GTFS data with `readGTFS()`
# or use the subset of GTFS data conformable to the SIRI sample, also included in the package
data("GTFSstops")
data("GTFSstop_times")
data("GTFScalendar")
data("GTFStrips")
data("GTFSagency")
data("GTFSroutes")
busesDF = STG(SIRIsample,
             GTFSstops. = GTFSstops,
             GTFSagency. = GTFSagency,
             GTFScalendar. = GTFScalendar,
             GTFSroutes. = GTFSroutes,
             GTFSstop_times. = GTFSstop_times,
             GTFStrips. = GTFStrips,
             linerefs = unique(SIRIsample$LineRef[1]))

SIRItoGTFS documentation built on May 2, 2019, 9:33 a.m.