GTFSLoader
srai.loaders.GTFSLoader ¶
Bases: Loader
GTFSLoader.
This loader is capable of reading GTFS feed and calculates time aggregations in 1H slots.
Source code in srai/loaders/gtfs_loader.py
load ¶
load(
gtfs_file: Path,
fail_on_validation_errors: bool = True,
skip_validation: bool = False,
) -> gpd.GeoDataFrame
Load GTFS feed and calculate time aggregations for stops.
PARAMETER | DESCRIPTION |
---|---|
gtfs_file
|
Path to the GTFS feed.
TYPE:
|
fail_on_validation_errors
|
Fail if GTFS feed is invalid. Ignored when skip_validation is True.
TYPE:
|
skip_validation
|
Skip GTFS feed validation.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
GeoDataFrame
|
gpd.GeoDataFrame: GeoDataFrame with trip counts and list of directions for stops. |