Given a dictionary of time series data frames, combine the time series into one time series data frame with multi-index (hierarchical columns) and return the result. The top level columns are the keys of the dictionary and the second and third level columns are ‘route_id’ and ‘direction_id’, if kind == 'route', or ‘stop_id’ and ‘direction_id’, if kind == 'stop'. If split_directions == False, then there is no third column level, no ‘direction_id’ column.
Given a datetime.date object, convert it to a string in the given format and return the result. If inverse == True, then assume the given date is in the given string format and return its corresponding date object.
Downsample the given route or stop time series, which is the output of Feed.get_routes_time_series() or Feed.get_stops_time_series(), to the given Pandas-style frequency. Can’t downsample to frequencies less one minute (‘1Min’), because the time series are generated with one-minute frequency.
Given a Shapely linestring and two Shapely points or coordinate pairs, project the points onto the linestring, and return the distance along the linestring between the two points. If q is None, then return the distance from the start of the linestring to the projection of p. The distance is measured in the native coordinates of the linestring.
Given a stops or routes stats data frame, return bar charts of the max and mean headways as a MatplotLib figure. Only include the stops/routes with max headways at most max_headway_limit minutes. If max_headway_limit is None, then include them all in a giant plot. If there are no stops/routes within the max headway limit, then return None.
NOTES:
Take the resulting figure f and do f.tight_layout() for a nice-looking plot.
Given a stops or routes time series data frame, sum each time series statistic over all stops/routes, plot each series statistic using MatplotLib, and return the resulting figure of subplots.
NOTES:
Take the resulting figure f and do f.tight_layout() for a nice-looking plot.
Return the given number of integer seconds as the time string ‘%H:%M:%S’. If inverse == True, then do the inverse operation. In keeping with GTFS standards, the hours entry may be greater than 23.
Given a GTFS time string in the format %H:%M:%S, return a timestring in the same format but with the hours taken modulo 24.
Given a weekday, that is, an integer in range(7), return it’s corresponding weekday name as a lowercase string. Here 0 -> ‘monday’, 1 -> ‘tuesday’, and so on. If inverse == True, then perform the inverse operation.