cleaners

gtfs.cleaners

A set of functions that clean the gtfs data.

Functions

Name Description
clean_consecutive_stop_fast_travel_warnings Clean ‘Fast Travel Between Consecutive Stops’ warnings from validity_df.
clean_multiple_stop_fast_travel_warnings Clean ‘Fast Travel Over Multiple Stops’ warnings from validity_df.
drop_trips Drop trip(s) from a GtfsInstance object.

clean_consecutive_stop_fast_travel_warnings

gtfs.cleaners.clean_consecutive_stop_fast_travel_warnings(gtfs, validate=False)

Clean ‘Fast Travel Between Consecutive Stops’ warnings from validity_df.

Parameters

Name Type Description Default
gtfs GtfsInstance The GtfsInstance to clean warnings within required
validate bool Whether or not to validate the gtfs before carrying out this cleaning operation False

Returns

Type Description
None

clean_multiple_stop_fast_travel_warnings

gtfs.cleaners.clean_multiple_stop_fast_travel_warnings(gtfs, validate=False)

Clean ‘Fast Travel Over Multiple Stops’ warnings from validity_df.

Parameters

Name Type Description Default
gtfs GtfsInstance The GtfsInstance to clean warnings within required
validate bool Whether or not to validate the gtfs before carrying out this cleaning operation False

Returns

Type Description
None

drop_trips

gtfs.cleaners.drop_trips(gtfs, trip_id)

Drop trip(s) from a GtfsInstance object.

Parameters

Name Type Description Default
gtfs GtfsInstance The GtfsInstance object to drop the trip(s) from required
trip_id Union[str, list, np.ndarray] The trip ID(s) of the trip to be dropped from the gtfs data. required

Returns

Type Description
None