o2g/gtfs/gtfs_dummy.py
def create_dummy_data(routes, stops):
    """Create `calendar`, `stop_times`, `trips` and `shapes`.

    :return: DummyData namedtuple
    """
    # Build stops per route auxiliary map
    stops_per_route = defaultdict(lambda: [])
    stops_map = {}
    for s in stops:
        if not s.route_id:
            continue
        stops_per_route[s.route_id].append(s)
        stops_map[s.stop_id] = s

    calendar = _create_dummy_calendar()

    trips = \
        _create_dummy_trips(
            routes,
            stops_per_route,
            calendar)

    stop_times = _create_dummy_stoptimes(trips, stops_per_route)
    frequencies = _create_dummy_frequencies(trips)

    return DummyData(calendar, stop_times, trips, frequencies)
def create_dummy_data(routes, stops):
    # Build stops per route auxiliary map
    stops_per_route = defaultdict(lambda: [])
    stops_map = {}
    for s in stops:
        if not s.route_id:
            continue
        stops_per_route[s.route_id].append(s)
        stops_map[s.stop_id] = s

    calendar = _create_dummy_calendar()

    trips = \
        _create_dummy_trips(
            routes,
            stops_per_route,
            calendar)

    stop_times = _create_dummy_stoptimes(trips, stops_per_route)
    frequencies = _create_dummy_frequencies(trips)

    return DummyData(calendar, stop_times, trips, frequencies)
def create_dummy_data ( routes , stops ) : # Build stops per route auxiliary map stops_per_route = defaultdict ( lambda : [ ] ) stops_map = { } for s in stops : if not s . route_id : continue stops_per_route [ s . route_id ] . append ( s ) stops_map [ s . stop_id ] = s calendar = _create_dummy_calendar ( ) trips = _create_dummy_trips ( routes , stops_per_route , calendar ) stop_times = _create_dummy_stoptimes ( trips , stops_per_route ) frequencies = _create_dummy_frequencies ( trips ) return DummyData ( calendar , stop_times , trips , frequencies )
Create `calendar`, `stop_times`, `trips` and `shapes`.

    :return: DummyData namedtuple
Create calendar stop_times trips and shapes .