Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Format for departure/arrival times #62

Closed
Skippern opened this issue Mar 25, 2017 · 70 comments
Closed

Format for departure/arrival times #62

Skippern opened this issue Mar 25, 2017 · 70 comments

Comments

@Skippern
Copy link

My local company Expresso Lorenzutti have made time tables available in PDF format. I understand it might be difficult to accommodate all forms of publishing time tables, and have therefor started to write a scraper for this. I would like to save it in a simple, common format, that osm2gtfs can read directly. One easy solution would be to save it as JSON. If you have any suggestions to formats I am open.

@pantierra
Copy link
Contributor

This is great. Currently we don't have defined a standard format. It is heavily created to the issue #33. And on the next things to do.

So, I'd be very happy to define together with you a suitable structure.

What is your take on it? The full schedule for each stop as a json object? Or are you thinking about some simplification here? The use cases we applied until now the osm2gtfs script were based on frequencies or starting time on certain stops or stations. And a way to define either the time for the whole itinery or the individual distance between stops.

All approaches can be valid and useful and we probably want to be flexible on this side and support different structures.

@Skippern
Copy link
Author

The tables I have use starting times on first point/station, circular routes might show a departure time for a mid-point.

I was thinking of creating a single JSON for each start point/route pair, with 3 lists in them, week days, Saturdays, Sundays.

That way osm2gtfs would identify departure from origin in the same way as I understand it harvests from the website in Florianopolis.

@pantierra
Copy link
Contributor

Yes, this is the Florianopolis approach and is fine. Lets think aboit how would look like, a suitable structure.

@grote
Copy link
Owner

grote commented Mar 26, 2017

This sounds indeed like the same information that is available for Florianopolis. There, I am using a JSON file from the transport company. However, I do not recommend to copy that JSON structure entirely.

Their basic structure however could work: List of routes/lines. Each route/line is a dictionary of various information such as name, schedule and schedule exceptions.

I was thinking of creating a single JSON for each start point/route pair, with 3 lists in them, week days, Saturdays, Sundays.

That is already better than the JSON above, but maybe it would be sufficient to to create one json per route/line as there is information that apply to the line/route as a whole like schedule exceptions for holidays or other meta information you might want to include.

@grote grote added the question label Mar 26, 2017
@Skippern
Copy link
Author

A handwritten suggestion based on 039

{
   "ref": "039",
   "origin": "Setiba",
   "destination": "Trevo BR101",
   "weekdays": [ "05:48", "06:55", "08:49", "10:18", "11:48", "15:45" ],
   "saturdays": [ "05:50", "06:48", "08:48", "09:48", "12:48", "15:48" ],
   "sundays": [ ],
}

This is just a quick'n'dirty idea

@grote
Copy link
Owner

grote commented Mar 26, 2017

That is a good start.

Did you check already the OpenStreetMap data quality? osm2gtfs needs to be able to match route relations with the proper JSON file and it needs to match origin/destination to the stops nodes in that relation.

Where the data quality is lacking, I suggest to add missing data directly into OpenStreetMap.

@Skippern
Copy link
Author

The JSON (and scraper of course), must also be able to handle route variations, such as route 022 departure from Village do Sol on weekdays 12:00 IF, with footnote Via IFES, that obviously must be added as a separate relation (ref=022IF?)

@Skippern
Copy link
Author

@grote I am constantly trying to improve the data quality, I am not completely satisfied with the data, and aim to make it compatible with osm2gtfs. I have on a few instances checked how things are done in Floripa to make it as compatible as possible. Being able to run tests will point me to remaining issues in the data model.

@grote
Copy link
Owner

grote commented Mar 26, 2017

Florianopolis has also routes with variations. For now, I am just ignoring them. So it would be could if those would be handled as well.

Usually, the variations have a different route (trajectory, take different streets), so need a different relation in OpenStreetMap as well, I guess.

@Skippern
Copy link
Author

Lets focus on the main routes, and look into variations after we have solved the issues on main routes.

@jamescr
Copy link
Collaborator

jamescr commented Mar 28, 2017

@Skippern In my case I created a json file for the Incofer time tables. In the json I represented the stop time for all stops of every route (because I had the data), but if there is a stop that is not done on any trip, i could just ignore it using a "-" in the schedule (horarios) matrix.

@Skippern
Copy link
Author

@jamescr I can base my format on your file, but I'll rather use english keywords. My data set doesn't give departure times on secondary stations, just start of route.

Making a single JSON for the entire network is definitely the simplest in terms of programming the scraper, but for large networks might be memory consuming and slow.

@jamescr
Copy link
Collaborator

jamescr commented Mar 28, 2017

I can base my format on your file, but I'll rather use english keywords. My data set doesn't
give departure times on secondary stations, just start of route.

Using English keywords will be a very nice change that will make the format more usable. I think implementing the change for incofer data and the trips creator will make it useful for your case.

Making a single JSON for the entire network is definitely the simplest in terms of programming the
scraper, but for large networks might be memory consuming and slow.

Might be. Do you have a suggestion?

@grote
Copy link
Owner

grote commented Mar 28, 2017

Making a single JSON for the entire network is definitely the simplest in terms of programming the scraper, but for large networks might be memory consuming and slow.

If speed is your only concern here, keep in mind that osm2gtfs needs to fetch up to date versions of those files. Fetching a file from the network is way slower when parsing it locally.

@Skippern
Copy link
Author

@grote My concern is not so much with the time it will take to generate the data, this will only be done on an infrequent basis, i.e. once every month. My concern is rather that I do not have a stable server to run on, and multiple other operations that hog resources, so a slower process is more prone to complications.

By generating each route as a different file, I can test if I have the JSON in question, and skip the scraping, same way osm2gtfs could have an amend function, to continue where it was interrupted.

@Skippern
Copy link
Author

I am about to make the JSON file now (finally managed to scrape all the time ables without errors), and will create a file partly based on @jamescr's example. I'll make a git repo and post the scraper and JSON's later today or tomorrow.

@grote
Copy link
Owner

grote commented Mar 29, 2017

Great news! If you want us to review the json structure before, please feel free to post an example!

@Skippern
Copy link
Author

Skippern commented Mar 29, 2017

Current format of the JSON object:

  • WD is an alias for weekdays, Mo-Fr
{'operator': 'Expresso Lorenzutti',
 'source': 'http://www.expressolorenzutti.com.br/horarios/',
 'updated': '2017-03-29',
 'routes': {u'005': [{'to': u'OLARIA', 
'sa': [u'15:30', u'17:10', u'18:25'], 
'WD': [u'15:30', u'17:10', u'18:25'], 
'from': u'JARDIM BOA VISTA', 
'su': []},
 {'to': u'JARDIM BOA VISTA',
 'sa': [],
 'WD': [], 
'from': u'OLARIA',
 'su': []}], 
u'038': [{'to': u'PRA\xc7A DA VITORIA', 
'sa': [], 
'WD': [u'09:16', u'09:28', u'16:24'], 
'from': u'TREVO DE SETIBA',
 'su': []}, 
{'to': u'TREVO DE SETIBA', 
'sa': [], 
'WD': [u'06:30', u'08:00', u'10:03', u'14:40', u'19:25'], 
'from': u'PRA\xc7A DA VITORIA', 
'su': []}],
 u'045': [{'to': u'IPIRANGA', 
'sa': [],
 'WD': [], 
'from': u'PATURA', 
'su': []},
 {'to': u'PATURA', 
'sa': [u'08:40', u'10:25', u'13:40', u'15:25', u'17:20', u'19:15'], 
'WD': [u'08:40', u'10:25', u'13:40', u'15:25', u'17:20', u'19:15'], 
'from': u'IPIRANGA',
 'su': []}],
 u'004': [{'to': u'OLARIA', 'sa': [u'05:55', u'12:20', u'06:35', u'13:10', u'07:25', u'13:55', u'08:20', u'14:45', u'09:20', u'16:20'], 
'WD': [u'05:55', u'12:20', u'06:35', u'13:10', u'07:25', u'13:55', u'08:20', u'14:45', u'09:20', u'16:20'], 
'from': u'JARDIM BOA VISTA', 
'su': [u'06:10', u'13:40', u'21:45', u'07:05', u'14:50', u'08:00', u'15:45', u'09:25', u'16:35', u'10:50', u'17:30']},
 {'to': u'JARDIM BOA VISTA', 
'sa': [u'10:45', u'19:40', u'11:40', u'05:20', u'12:15', u'17:47', u'06:25', u'12:55', u'18:37', u'07:05', u'13:45', u'19:02', u'07:55', u'14:30', u'20:10', u'08:55', u'15:20', u'09:50', u'16:07', u'11:20', u'16:55'], 
'WD': [u'10:45', u'19:40', u'11:40', u'05:20', u'12:15', u'17:47', u'06:25', u'12:55', u'18:37', u'07:05', u'13:45', u'19:02', u'07:55', u'14:30', u'20:10', u'08:55', u'15:20', u'09:50', u'16:07', u'11:20', u'16:55'], 
'from': u'OLARIA',
 'su': [u'11:45', u'18:45', u'12:55', u'20:30', u'05:40', u'13:25', u'20:55', u'06:35', u'14:10', u'22:05', u'07:30', u'15:20', u'08:25', u'16:10', u'09:55', u'17:05', u'11:20', u'18:00', u'12:15', u'19:15']}], 
u'010': [{'to': u'IPIRANGA', 
'sa': [u'05:00', u'13:48', u'20:20', u'06:10', u'14:32', u'22:05', u'07:10', u'15:16', u'08:40', u'16:22', u'11:00', u'17:50'], 
'WD': [u'05:00', u'13:48', u'20:20', u'06:10', u'14:32', u'22:05', u'07:10', u'15:16', u'08:40', u'16:22', u'11:00', u'17:50'], 
'from': u'JABARAI', 
'su': [u'21:00 M']}, 
{'to': u'JABARAI', 
'sa': [u'11:55', u'18:40', u'13:04', u'19:25', u'05:35', u'14:02', u'21:15', u'06:50', u'14:44', u'22:00', u'08:00', u'15:28', u'10:30', u'17:18', u'11:40', u'18:06', u'12:00', u'18:46', u'12:50', u'19:40'], 
'WD': [u'11:55', u'18:40', u'13:04', u'05:35', u'14:02', u'19:25', u'21:15', u'06:50', u'14:44', u'22:00', u'08:00', u'15:28', u'10:30', u'17:18', u'11:40', u'18:06', u'12:00', u'18:46', u'12:50', u'19:40'], 
'from': u'IPIRANGA', 
'su': [u'21:35 M']}], 
u'011': [{'to': u'IPIRANGA', 
'sa': [u'06:30', u'07:35', u'08:20', u'09:40', u'17:10'], 
'WD': [u'06:30', u'07:35', u'08:20', u'09:40', u'17:10'], 
'from': u'JABARAI', 
'su': [u'05:10', u'16:05', u'06:30', u'17:45', u'08:10', u'19:25', u'09:50', u'19:50', u'10:50', u'06:30']}, 
{'to': u'JABARAI',
 'sa': [u'21:20', u'07:25', u'16:12'], 
'WD': [u'21:20', u'07:25', u'16:12'], 
'from': u'IPIRANGA',
 'su': [u'12:25', u'14:20', u'05:40', u'18:40', u'07:20', u'21:15', u'09:00', u'22:00', u'11:40', u'13:15', u'15:15', u'16:55']}], 
u'012': [{'to': u'PRA\xc7A DA VITORIA', 
'sa': [u'05:25', u'12:20', u'16:44', u'06:50', u'12:42', u'17:28', u'07:25', u'13:26', u'19:00', u'07:55', u'14:10', u'19:50', u'09:10', u'14:54', u'21:45'], 
'WD': [u'05:25', u'12:20', u'16:44', u'06:50', u'12:42', u'17:28', u'07:25', u'13:26', u'19:00', u'07:55', u'14:10', u'19:50', u'09:10', u'14:54', u'21:45'], 
'from': u'JABARAI', 
'su': [u'05:50', u'13:35', u'22:10', u'07:00', u'14:50', u'07:30', u'15:20', u'08:30', u'16:30', u'09:00', u'17:00']},
 {'to': u'JABARAI', 
'sa': [u'10:20', u'15:38', u'11:30', u'16:00', u'06:00', u'12:20', u'16:56', u'07:40', u'13:20', u'17:40', u'08:40', u'13:40', u'18:24', u'09:20', u'14:22', u'20:40', u'10:15', u'15:06', u'21:40', u'11:00', u'15:50', u'22:30', u'11:20', u'16:34'], 
'WD': [u'10:20', u'15:38', u'11:30', u'06:00', u'12:20', u'16:00', u'16:56', u'07:40', u'13:20', u'17:40', u'08:40', u'13:40', u'18:24', u'09:20', u'14:22', u'20:40', u'10:15', u'15:06', u'21:40', u'11:00', u'15:50', u'22:30', u'11:20', u'16:34'], 
'from': u'PRA\xc7A DA VITORIA', 
'su': [u'11:20', u'18:10', u'13:00', u'18:40', u'06:25', u'13:40', u'19:20', u'07:40', u'14:15', u'08:10', u'15:30', u'10:10', u'16:00', u'10:40', u'17:10', u'12:00', u'17:40', u'12:20', u'18:50']}], 
u'013': [{'to': u'SANTA MARGARIDA', 
'sa': [], 'WD': [u'05:50', u'18:12'], 
'from': u'JABARAI',
 'su': []},
 {'to': u'JABARAI', 
'sa': [], 
'WD': [u'06:25', u'19:08'], 
'from': u'SANTA MARGARIDA', 
'su': []}], 
u'014': [{'to': u'VARZEA NOVA', 
'sa': [u'07:15', u'16:30'], 
'WD': [u'07:15', u'16:30'], 
'from': u'KUBITSCHEK', 
'su': []}, 
{'to': u'KUBITSCHEK', 
'sa': [u'08:05', u'17:15'], 
'WD': [u'08:05', u'17:15'], 
'from': u'VARZEA NOVA', 
'su': []}], 
u'015': [{'to': u'N. S .CONCEI\xc7\xc3O', 
'sa': [u'06:35', u'17:20', u'07:35', u'17:40', u'09:50', u'11:00', u'12:15', u'07:00', u'12:00', u'16:00'],
 'WD': [u'06:35', u'14:45', u'07:35', u'16:15', u'09:50', u'17:00', u'11:00', u'18:00', u'12:15', u'19:30'], 
'from': u'KUBITSCHEK', 
'su': []},
 {'to': u'KUBITSCHEK', 
'sa': [u'14:00', u'15:40', u'06:00', u'16:05', u'07:00', u'17:45', u'08:00', u'18:05', u'10:15', u'11:25', u'12:40', u'14:25', u'06:20', u'07:20', u'12:20', u'16:20'], 
'WD': [u'13:00', u'14:00', u'06:00', u'14:25', u'07:00', u'15:10', u'08:00', u'16:40', u'10:15', u'17:25 K', u'11:25', u'18:25', u'12:40', u'19:55', u'13:25'], 
'from': u'N. S .CONCEI\xc7\xc3O', 
'su': []}], 
u'033': [{'to': u'KUBITSCHEK', 
'sa': [u'07:07'], 
'WD': [u'07:16'], 
'from': u'SETIBA', 
'su': []}, 
{'to': u'SETIBA', 
'sa': [u'08:14', u'10:50'], 
'WD': [u'10:34', u'17:20'], 
'from': u'KUBITSCHEK', 
'su': []}], 
u'018': [{'to': u'OLARIA', 
'sa': [u'15:30', u'17:10', u'18:25'], 
'WD': [u'15:30', u'17:10', u'18:25'], 
'from': u'JARDIM BOA VISTA', 
'su': []},
 {'to': u'JARDIM BOA VISTA', 
'sa': [],
 'WD': [], 
'from': u'OLARIA', 
'su': []}], 
u'019': [{'to': u'PRA\xc7A DA VITORIA', 
'sa': [u'05:45', u'13:40', u'19:30', u'06:45', u'13:55', u'19:55', u'08:55', u'14:45', u'20:20', u'09:15', u'16:25', u'20:45', u'11:05', u'16:45', u'21:35', u'09:20', u'11:20', u'13:20', u'14:20'], 
'WD': [u'05:45', u'13:10', u'18:40', u'06:45', u'13:55', u'21:05', u'08:15', u'15:25', u'08:55', u'15:40', u'09:15', u'16:10'], 
'from': u'S\xc3O GABRIEL', 
'su': [u'08:20', u'18:20']},
 {'to': u'S\xc3O GABRIEL', 
'sa': [u'12:25', u'17:25', u'13:10', u'18:45', u'06:50', u'14:20', u'19:35', u'07:50', u'14:40', u'20:00', u'08:50', u'15:20', u'21:15', u'12:00', u'17:00', u'21:40', u'12:30', u'17:45', u'22:30', u'13:15', u'18:20', u'13:30', u'18:45', u'15:20', u'17:20', u'11:00', u'13:00', u'14:00', u'15:00', u'17:00'], 
'WD': [u'11:05', u'17:10', u'12:05', u'06:50', u'14:15', u'17:55', u'18:50', u'07:50', u'15:15', u'20:45', u'08:50', u'16:00', u'21:35', u'09:10', u'16:30', u'12:00', u'17:30', u'12:30', u'17:45', u'13:30', u'18:15'],
 'from': u'PRA\xc7A DA VITORIA', 
'su': [u'08:00', u'18:00', u'09:00', u'19:00']}], 
u'030': [{'to': u'KUBITSCHEK', 
'sa': [u'05:15', u'10:03', u'13:30', u'17:53', u'06:43', u'10:33', u'14:03', u'19:05', u'07:27', u'11:05', u'14:53', u'19:48', u'08:07', u'11:37', u'15:23', u'20:35', u'08:23', u'12:09', u'16:05', u'21:20'], 
'WD': [u'05:14', u'09:00', u'13:32', u'17:44', u'06:36', u'09:30', u'14:12', u'18:53', u'06:52', u'09:46', u'14:42', u'19:38', u'07:32', u'10:02', u'15:22', u'20:23', u'07:56', u'10:22', u'15:52', u'21:08'], 
'from': u'SETIBA', 
'su': [u'05:35', u'12:55', u'19:55', u'06:55', u'13:55', u'20:55', u'07:55', u'14:55', u'21:55', u'08:55', u'15:55', u'09:55', u'16:55']},
 {'to': u'SETIBA', 
'sa': [u'09:03', u'12:50', u'16:41', u'22:05', u'09:43', u'13:03', u'17:17', u'05:47', u'10:30', u'13:50', u'17:28', u'21:55', u'06:57', u'11:20', u'14:10', u'18:04', u'22:40', u'07:30', u'11:52', u'14:35', u'18:40', u'08:14', u'12:24', u'14:50', u'19:16', u'08:54', u'12:56', u'15:30', u'19:52', u'09:10', u'13:00', u'16:10', u'20:30', u'09:50', u'13:30', u'16:52', u'21:15'], 
'WD': [u'08:20', u'10:52', u'16:24', u'21:47', u'08:36', u'13:16', u'17:20', u'05:47', u'08:20', u'11:10', u'15:00', u'18:32', u'06:20', u'08:44', u'12:10 IF', u'15:30', u'19:03', u'06:56', u'09:08', u'12:40', u'16:10', u'20:18', u'07:24', u'09:24', u'13:20', u'16:40', u'21:00', u'07:40', u'09:48', u'13:40', u'17:12', u'21:45 IF', u'07:48', u'10:18', u'14:04', u'17:36', u'22:29', u'08:12', u'10:50', u'14:20', u'18:08 IF', u'23:15'], 
'from': u'KUBITSCHEK',
 'su': [u'10:55', u'17:55', u'11:55', u'18:55', u'06:05', u'13:35', u'20:30', u'07:35', u'14:35', u'21:30', u'08:35', u'15:35', u'22:25', u'09:35', u'16:35', u'10:35', u'17:35', u'11:35', u'18:35', u'12:35', u'19:30']}], 
u'031': [{'to': u'OLARIA', 
'sa': [u'05:00', u'07:18', u'08:50', u'10:48', u'12:00', u'13:33', u'15:10', u'17:00', u'19:00', u'21:40', u'05:40', u'07:26', u'09:00', u'10:56', u'12:08', u'13:50', u'15:20', u'17:12', u'19:25', u'21:55', u'05:50', u'07:42', u'09:30', u'11:04', u'12:24', u'14:00', u'15:40', u'17:36', u'19:40', u'22:25', u'06:00', u'07:58', u'09:40', u'11:20', u'12:32', u'14:20', u'15:50', u'17:48', u'20:10', u'06:30', u'08:06', u'10:00', u'11:28', u'12:40', u'14:30', u'16:00', u'18:12', u'20:25'], 
'WD': [u'05:00', u'07:20', u'09:00', u'11:20', u'13:08', u'15:00', u'16:40', u'18:00', u'21:00', u'05:40', u'07:30', u'09:46', u'11:40', u'13:16', u'15:10', u'16:48', u'18:12', u'21:30', u'05:50', u'07:48', u'10:02', u'11:50', u'13:32', u'15:20', u'17:04', u'19:15', u'21:42 IF', u'06:00', u'08:12', u'10:20', u'12:00', u'13:50', u'15:40', u'17:12', u'19:30', u'22:06', u'06:28', u'08:20', u'10:40', u'12:10', u'14:10', u'15:50', u'17:20', u'20:00', u'22:18'],
 'from': u'TREVO SETIBA', 
'su': [u'05:20', u'07:45', u'10:15', u'12:30', u'14:45', u'17:15', u'19:40', u'06:00', u'08:15', u'10:30', u'12:45', u'15:15', u'17:30', u'20:20', u'06:15', u'08:30', u'10:45', u'13:15', u'15:30', u'17:45', u'20:40', u'06:30', u'08:45', u'11:15', u'13:30', u'15:45', u'18:15', u'21:20', u'06:45', u'09:15', u'11:30', u'13:45', u'16:15', u'18:30', u'21:40']},
 {'to': u'TREVO SETIBA', 
'sa': [u'06:56', u'08:40', u'10:30', u'11:52', u'13:20', u'15:00', u'16:36', u'18:48', u'21:10', u'05:25', u'07:40', u'09:20', u'11:10', u'12:32', u'14:20', u'15:50', u'17:52', u'20:00', u'22:25', u'06:09', u'07:58', u'09:30', u'11:28', u'12:48', u'14:30', u'16:00', u'18:16', u'20:15', u'22:50', u'06:40', u'08:22', u'10:20', u'11:36', u'13:00', u'14:40', u'16:24', u'18:24', u'20:55', u'06:21', u'08:06', u'09:40', u'11:36', u'13:04', u'14:40', u'16:20', u'18:28', u'20:45', u'06:33', u'08:22', u'10:10', u'11:44', u'13:12', u'15:00', u'16:30', u'18:52', u'21:00', u'06:45', u'08:38', u'10:20', u'12:00', u'13:20', u'15:10', u'16:40', u'19:04', u'21:30', u'07:09', u'08:46', u'10:40', u'12:08', u'13:40', u'15:20', u'17:16', u'19:28', u'21:40', u'07:20', u'09:02', u'11:00', u'12:16', u'14:00', u'15:40', u'17:40', u'19:40', u'22:10'], 
'WD': [u'06:36', u'08:36', u'10:50', u'12:30', u'14:30', u'16:08', u'17:36', u'20:15', u'22:30', u'06:52', u'08:52', u'11:10', u'12:50', u'14:40', u'16:16', u'17:44', u'20:45', u'05:26', u'08:28', u'10:00', u'12:00', u'13:56', u'15:50', u'17:44', u'19:14', u'21:30', u'06:08', u'08:36', u'10:26', u'12:20', u'14:12', u'16:00', u'17:52', u'19:36', u'22:17', u'06:32', u'08:52', u'10:42', u'12:50', u'14:30', u'16:20', u'18:00', u'19:50', u'22:41', u'06:44', u'09:00', u'11:00', u'13:00', u'14:50', u'16:30', u'18:16', u'20:04', u'22:53', u'07:06', u'09:16', u'11:20', u'13:10', u'15:10', u'16:48', u'18:24', u'20:32', u'23:05', u'07:16', u'09:32', u'11:30', u'13:30', u'15:20', u'16:56', u'18:40', u'20:46', u'07:32', u'09:40', u'11:50', u'13:48', u'15:40', u'17:28', u'18:52', u'21:15'], 
'from': u'OLARIA', 
'su': [u'07:30', u'09:45', u'12:15', u'14:30', u'16:45', u'19:20', u'05:45', u'08:20', u'10:50', u'13:05', u'15:20', u'17:50', u'20:10', u'06:30', u'08:50', u'11:05', u'13:20', u'15:50', u'18:05', u'20:50', u'07:15', u'09:30', u'11:45', u'14:15', u'16:30', u'18:45', u'22:20', u'06:50', u'09:05', u'11:20', u'13:50', u'16:05', u'18:20', u'21:10', u'07:05', u'09:20', u'11:50', u'14:05', u'16:20', u'18:50', u'21:50', u'07:20', u'09:50', u'12:05', u'14:20', u'16:50', u'19:05', u'22:10', u'07:50', u'10:05', u'12:20', u'14:50', u'17:05', u'19:20', u'22:45', u'08:05', u'10:20', u'12:50', u'15:05', u'17:20', u'19:50']}], 
u'036': [{'to': u'MEAIPE', 
'sa': [], 
'WD': [], 
'from': u'SETIBA',
 'su': []}, 
{'to': u'SETIBA', 
'sa': [], 
'WD': [u'21:35'], 
'from': u'MEAIPE', 'su': []}], 
u'037': [{'to': u'OLARIA', 
'sa': [u'06:10', u'07:50'], 
'WD': [u'06:10', u'07:56', u'18:36'], 
'from': u'TREVO DE SETIBA', 
'su': []},
 {'to': u'TREVO DE SETIBA', 
'sa': [u'08:30'], 
'WD': [u'08:04', u'22:05'], 
'from': u'OLARIA', 
'su': []}], 
u'034': [{'to': u'MEAIPE', 
'sa': [], 
'WD': [], 
'from': u'SETIBA', 
'su': []}, 
{'to': u'SETIBA', 'sa': [u'21:30'], 
'WD': [u'21:30'], 
'from': u'MEAIPE', 
'su': []}], 
u'035': [{'to': u'MEAIPE', 
'sa': [u'05:58', u'14:48', u'18:15', u'20:05'], 
'WD': [u'05:58', u'14:48', u'18:15', u'20:05'], 
'from': u'SETIBA', 
'su': []}, 
{'to': u'SETIBA', 
'sa': [u'06:15', u'07:00', u'17:00', u'17:55', u'18:40', u'19:35'], 
'WD': [u'06:15', u'07:00', u'17:00', u'17:55', u'18:40', u'19:35'],
 'from': u'MEAIPE',
 'su': []}], 
u'049': [{'to': u'BAIA NOVA', 
'sa': [u'14:30'], 
'WD': [u'14:30'], 
'from': u'PRA\xc7A DA VITORIA', 
'su': [u'16:15']}, 
{'to': u'PRA\xc7A DA VITORIA', 
'sa': [u'05:55', u'16:15'], 
'WD': [u'05:55', u'16:15'], 
'from': u'BAIA NOVA', 
'su': []}], 
u'044': [{'to': u'IPIRANGA', 
'sa': [u'07:50', u'09:30', u'12:45', u'14:35', u'16:25'], 
'WD': [u'07:50', u'09:30', u'12:45', u'14:35', u'16:25'], 
'from': u'PATURA', 
'su': []}, 
{'to': u'PATURA', 
'sa': [u'18:20', u'20:10'], 
'WD': [u'18:20', u'20:10'], 
'from': u'IPIRANGA', 
'su': []}], 
u'043': [{'to': u'INDEPENDENCIA', 
'sa': [u'06:00', u'07:25', u'12:00', u'17:20'], 
'WD': [u'06:00', u'07:25', u'12:00', u'17:20'], 
'from': u'PONTAL SANTA MONICA', 
'su': [u'06:00']}, 
{'to': u'PONTAL SANTA MONICA',
 'sa': [u'06:40', u'08:15', u'12:45', u'18:20'],
 'WD': [u'06:40', u'08:15', u'12:45', u'18:20'], 
'from': u'INDEPENDENCIA', 
'su': []}], 
u'048': [{'to': u'AMARELOS',
 'sa': [u'06:55', u'09:50', u'11:40', u'13:20', u'05:15', u'22:15 B'], 
'WD': [u'05:15', u'22:15 B', u'06:55', u'09:50', u'11:40', u'13:20'], 
'from': u'PRA\xc7A DA VITORIA', 
'su': [u'05:40', u'07:00', u'11:25', u'13:20', u'15:05']}, 
{'to': u'PRA\xc7A DA VITORIA', 
'sa': [u'15:00', u'17:00', u'06:00', u'08:00', u'10:50', u'12:30', u'14:05', u'16:00', u'17:55'], 
'WD': [u'15:00', u'17:00', u'06:00', u'08:00', u'10:50', u'12:30', u'14:05', u'16:00', u'17:55'], 
'from': u'AMARELOS', 
'su': [u'17:05', u'06:10', u'07:50', u'12:30', u'14:10', u'16:00', u'18:00']}], 
u'042': [{'to': u'INDEPENDENCIA', 
'sa': [u'10:15', u'13:45', u'15:30', u'20:20'], 
'WD': [u'10:15', u'13:45', u'15:30', u'20:20'], 
'from': u'PONTAL SANTA MONICA', 
'su': [u'06:20', u'18:20', u'07:50', u'21:30', u'10:20', u'12:00', u'13:35']}, 
{'to': u'PONTAL SANTA MONICA', 
'sa': [u'11:10', u'14:40', u'16:15', u'21:10'], 
'WD': [u'11:10', u'14:40', u'16:15', u'21:10'], 
'from': u'INDEPENDENCIA', 
'su': [u'15:10', u'16:45', u'05:40', u'17:30', u'07:00', u'19:05', u'08:35', u'22:10', u'11:10', u'12:45', u'14:20', u'15:55']}], 
u'052': [{'to': u'BUENOS AIRES', 
'sa': [u'05:30', u'15:30'], 
'WD': [u'05:30', u'15:30'], 
'from': u'PRA\xc7A DA VITORIA', 
'su': [u'07:15', u'15:30']},
 {'to': u'PRA\xc7A DA VITORIA', 
'sa': [u'06:30', u'16:30'], 
'WD': [u'06:30', u'16:30'], 
'from': u'BUENOS AIRES', 
'su': [u'08:15', u'16:30']}], 
u'057': [{'to': u'IGUAPE', 
'sa': [u'06:20', u'18:05', u'19:30'], 
'WD': [u'06:20', u'18:05', u'19:30'], 
'from': u'CENTRO', 'su': []}, 
{'to': u'CENTRO', 
'sa': [u'22:15 A', u'05:45 B', u'07:00', u'06:00', u'18:55', u'20:05'], 
'WD': [u'22:15 A', u'05:45 B', u'07:00', u'06:00', u'18:55', u'20:05'], 
'from': u'IGUAPE', 
'su': []}], 
u'032': [{'to': u'PORTO GRANDE', 
'sa': [u'06:00', u'07:10'],
'WD': [u'06:00', u'07:10'], 
'from': u'PORTAL CLUB', 
'su': [u'07:45']}, 
{'to': u'PORTAL CLUB', 
'sa': [u'17:30'], 
'WD': [u'17:30'], 
'from': u'PORTO GRANDE',
 'su': [u'17:40']}], 
u'053': [{'to': u'BAIA NOVA',
 'sa': [u'14:30'],
 'WD': [u'14:30'], 
'from': u'PRA\xc7A DA VITORIA', 
'su': [u'16:15']}, 
{'to': u'PRA\xc7A DA VITORIA', 
'sa': [u'05:55', u'16:15'], 
'WD': [u'05:55', u'16:15'], 
'from': u'BAIA NOVA',
 'su': []}], 
u'050': [{'to': u'BOA ESPERAN\xc7A', 
'sa': [], 
'WD': [u'07:30', u'12:30'],
 'from': u'PRA\xc7A DA VITORIA', 
'su': []}, 
{'to': u'PRA\xc7A DA VITORIA', 
'sa': [], 
'WD': [u'08:30', u'13:30'], 
'from': u'BOA ESPERAN\xc7A', 
'su': []}], 
u'003': [{'to': u'ADALBERTO', 
'sa': [u'06:20', u'14:05', u'07:10', u'15:05', u'08:00', u'16:05', u'08:50', u'17:05', u'11:05'], 
'WD': [u'06:20', u'14:05', u'07:10', u'15:05', u'08:00', u'16:05', u'08:50', u'17:05', u'11:05'], 
'from': u'CENTRO',
 'su': []}, 
{'to': u'CENTRO',
 'sa': [u'12:05', u'13:05', u'06:00', u'13:30', u'06:45', u'14:30', u'07:30', u'15:35', u'08:20', u'16:30', u'09:15', u'17:30', u'11:30', u'12:35'], 
'WD': [u'12:05', u'13:05', u'06:00', u'13:30', u'06:45', u'14:30', u'07:30', u'15:35', u'08:20', u'16:30', u'09:15', u'17:30', u'11:30', u'12:35'], 
'from': u'ADALBERTO', 
'su': []}], 
u'002': [{'to': u'KUBITSCHEK',
 'sa': [], 
'WD': [], 
'from': u'JARDIM BOA VISTA', 
'su': []}, 
{'to': u'JARDIM BOA VISTA', 
'sa': [u'18:00'], 
'WD': [u'18:00'], 
'from': u'KUBITSCHEK', 
'su': []}], 
u'001': [{'to': u'KUBITSCHEK',
 'sa': [u'18:00'],
 'WD': [u'18:00'],
 'from': u'JARDIM BOA VISTA', 
'su': []}, 
{'to': u'JARDIM BOA VISTA',
 'sa': [],
 'WD': [], 
'from': u'KUBITSCHEK', 
'su': []}], 
u'026': [{'to': u'TAQUARA', 
'sa': [u'11:10', u'17:30'], 
'WD': [u'11:10', u'17:30'], 
'from': u'TREVO BR-101', 
'su': [u'11:00', u'17:15']}, 
{'to': u'TREVO BR-101',
 'sa': [u'06:30', u'12:30', u'18:50'], 
'WD': [u'06:30', u'12:30', u'18:50'], 
'from': u'TAQUARA',
 'su': [u'06:30', u'12:00', u'18:15']}],
 u'021': [{'to': u'PRA\xc7A DA VITORIA', 
'sa': [], 
'WD': [u'08:30', u'13:30', u'18:45'], 
'from': u'ANDANA', 
'su': []}, 
{'to': u'ANDANA', 
'sa': [], 
'WD': [u'12:30', u'07:30', u'17:45'], 
'from': u'PRA\xc7A DA VITORIA', 
'su': []}], 
u'020': [{'to': u'PRA\xc7A DA VITORIA',
 'sa': [], 
'WD': [u'08:45', u'13:45', u'19:00'], 
'from': u'JABUTICABA', 
'su': []}, 
{'to': u'JABUTICABA', 
'sa': [], 
'WD': [u'12:30', u'07:30', u'17:45'], 
'from': u'PRA\xc7A DA VITORIA', 
'su': []}], 
u'023': [{'to': u'PRA\xc7A DA VITORIA', 
'sa': [], 
'WD': [u'10:35'], 
'from': u'SOL NASCENTE',
 'su': []},
 {'to': u'SOL NASCENTE', 
'sa': [], 
'WD': [u'10:15'], 
'from': u'PRA\xc7A DA VITORIA', 
'su': []}], 
u'022': [{'to': u'PRA\xc7A DA VITORIA', 
'sa': [u'06:45', u'09:00', u'12:05', u'13:40', u'18:15'],
 'WD': [u'06:50', u'09:00', u'12:00 IF', u'13:40', u'18:25'], 
'from': u'PRAIA DO SOL',
 'su': []}, 
{'to': u'PRAIA DO SOL',
 'sa': [u'07:50', u'11:00', u'12:40', u'17:04'], 
'WD': [u'07:56', u'11:00', u'12:30', u'17:04'], 
'from': u'PRA\xc7A DA VITORIA', 
'su': []}], 
u'047': [{'to': u'S\xc3O GABRIEL', 
'sa': [u'07:00', u'18:35', u'08:30', u'20:00', u'11:05', u'22:20', u'12:30', u'14:00'], 
'WD': [u'07:00', u'18:35', u'08:30', u'20:00', u'11:05', u'22:20', u'12:30', u'14:00'], 
'from': u'JARDIM BOA VISTA', 
'su': [u'07:00', u'18:35', u'08:30', u'20:00', u'11:05', u'22:20', u'12:30', u'14:00']},
 {'to': u'JARDIM BOA VISTA', 
'sa': [u'15:30', u'17:00', u'06:10', u'16:05', u'07:00', u'17:35', u'07:35', u'19:05', u'09:05', u'20:30', u'11:35', u'13:05', u'14:35'], 
'WD': [u'15:30', u'17:00', u'06:10', u'16:05', u'07:00', u'17:35', u'07:35', u'19:05', u'09:05', u'20:30', u'11:35', u'13:05', u'14:35'],
 'from': u'S\xc3O GABRIEL',
'su': [u'15:30', u'17:00', u'06:10', u'17:35', u'07:35', u'19:05', u'09:05', u'20:30', u'11:35', u'13:05', u'14:35', u'16:05']}], 
u'046': [{'to': u'CAMURUGI', 
'sa': [u'05:50', u'15:50', u'06:55', u'17:15', u'08:00', u'18:30', u'10:05', u'20:50', u'11:20'], 
'WD': [u'05:50', u'15:50', u'06:55', u'17:15', u'08:00', u'18:30', u'10:05', u'20:50', u'11:20'],
 'from': u'JARDIM BOA VISTA', 
'su': []}, 
{'to': u'JARDIM BOA VISTA', 
'sa': [u'12:55', u'14:25', u'05:20', u'13:40', u'06:25', u'15:05', u'07:00', u'16:30', u'07:30', u'17:50', u'08:25', u'19:10', u'10:40', u'21:30', u'12:05'], 
'WD': [u'12:55', u'14:25', u'05:20', u'13:40', u'06:25', u'15:05', u'07:00', u'16:30', u'07:30', u'17:50', u'08:25', u'19:10', u'10:40', u'21:30', u'12:05'], 
'from': u'CAMURUGI', 
'su': []}], 
u'009': [{'to': u'JARDIM BOA VISTA', 
'sa': [u'05:25', u'12:00', u'17:40', u'06:15', u'12:45', u'18:50', u'07:05', u'13:35', u'21:10', u'08:00', u'14:20', u'21:55', u'08:50', u'15:10'], 
'WD': [u'05:25', u'12:00', u'17:40', u'06:15', u'12:45', u'18:50', u'07:05', u'13:35', u'21:10', u'08:00', u'14:20', u'21:55', u'08:50', u'15:10'], 
'from': u'In\xedcio \u2013 Jardim Boa Vista (Pestalozzi) \u2013 Pra\xe7a de Santa Rosa \u2013 Rodovia do Sol \u2013 Av. Paris \u2013 Av. Beira Mar \u2013 Praia da Cerca \u2013 Av.\nPraiana \u2013 R. Manoel Lino Bandeira \u2013 R. Francisco Vieira Passos \u2013 Av. Davino Matos \u2013 R. Epaminondas de Almeida \u2013 Av. Anchieta - Av.\nJuscelino Kubitschek - R. Minas Gerais - R. Rio de Janeiro - R. Bar\xe3o do Rio Branco - R. Padre Anchieta - Av. Presidente Kennedy - R.\nAlmirante Tamandar\xe9 - R. Gilberto Cardoso - Av. Joaquim da Silva Lima \u2013 Av. Davino Matos \u2013 R. Francisco Furtado \u2013 Prainha \u2013 Av.\nBeira Mar \u2013 Praia da Cerca \u2013 Av. Paris \u2013 Rodovia do Sol \u2013 R. Alencar M. de Rezende \u2013 Pestalozzi \u2013 Jardim Boa Vista - Final.', 
'su': [u'05:40', u'13:15', u'21:05', u'06:30', u'14:15', u'07:30', u'15:15', u'08:50', u'16:05', u'10:20', u'17:00']}, 
{'to': u'In\xedcio \u2013 Jardim Boa Vista (Pestalozzi) \u2013 Pra\xe7a de Santa Rosa \u2013 Rodovia do Sol \u2013 Av. Paris \u2013 Av. Beira Mar \u2013 Praia da Cerca \u2013 Av.\nPraiana \u2013 R. Manoel Lino Bandeira \u2013 R. Francisco Vieira Passos \u2013 Av. Davino Matos \u2013 R. Epaminondas de Almeida \u2013 Av. Anchieta - Av.\nJuscelino Kubitschek - R. Minas Gerais - R. Rio de Janeiro - R. Bar\xe3o do Rio Branco - R. Padre Anchieta - Av. Presidente Kennedy - R.\nAlmirante Tamandar\xe9 - R. Gilberto Cardoso - Av. Joaquim da Silva Lima \u2013 Av. Davino Matos \u2013 R. Francisco Furtado \u2013 Prainha \u2013 Av.\nBeira Mar \u2013 Praia da Cerca \u2013 Av. Paris \u2013 Rodovia do Sol \u2013 R. Alencar M. de Rezende \u2013 Pestalozzi \u2013 Jardim Boa Vista - Final.', 
'sa': [u'10:20', u'15:55', u'11:15', u'16:45', u'05:55', u'11:52', u'17:22', u'06:45', u'12:37', u'18:17', u'07:35', u'13:22', u'19:25', u'08:25', u'14:12', u'21:40', u'08:35', u'14:57', u'22:25', u'09:25', u'15:47', u'10:57', u'16:37'], 
'WD': [u'10:20', u'15:55', u'11:15', u'05:55', u'11:52', u'16:45', u'17:22', u'06:45', u'12:37', u'18:17', u'07:35', u'13:22', u'19:25', u'08:25', u'14:12', u'21:40', u'08:35', u'14:57', u'22:25', u'09:25', u'15:47', u'10:57', u'16:37'], 
'from': u'JARDIM BOA VISTA', 
'su': [u'11:20', u'18:15', u'12:20', u'19:15', u'05:10', u'12:50', u'19:40', u'06:05', u'13:45', u'21:25', u'06:55', u'14:45', u'07:55', u'15:45', u'09:20', u'16:35', u'10:50', u'17:30', u'11:50', u'18:45']}], 
u'008': [{'to': u'PORTO GRANDE', 
'sa': [u'06:00', u'07:10'], 
'WD': [u'06:00', u'07:10'], 
'from': u'PORTAL CLUB', 
'su': [u'07:45']}, 
{'to': u'PORTAL CLUB', 
'sa': [u'17:30'], 
'WD': [u'17:30'], 
'from': u'PORTO GRANDE', 
'su': [u'17:40']}], 
u'029': [{'to': u'TREVO DA BR-101',
 'sa': [u'05:25', u'12:30 O', u'20:05', u'06:00', u'13:20', u'21:45', u'07:12', u'14:15', u'08:13', u'16:25', u'09:06', u'17:10 E'], 
'WD': [u'05:25', u'12:30 O', u'20:05', u'06:00', u'13:20', u'21:45', u'07:12', u'14:15', u'08:13', u'16:25', u'09:06', u'17:10 E'],
 'from': u'CONDADOS', 
'su': [u'04:50', u'11:30', u'17:20 E', u'05:35', u'12:10', u'18:25', u'06:05', u'13:00', u'19:30 E', u'07:10', u'14:00 E', u'21:10', u'07:45', u'14:35', u'22:10']}, 
{'to': u'CONDADOS', 
'sa': [u'11:15', u'18:10', u'12:05 E', u'18:25', u'05:30', u'12:55 B', u'20:40', u'06:20 B', u'14:15', u'07:05', u'15:30', u'08:00', u'16:00 E', u'10:00', u'16:50', u'10:55 E', u'17:25', u'12:05', u'18:10'], 
'WD': [u'11:15', u'18:10', u'12:05 E', u'18:25', u'05:30', u'12:55 B', u'20:40', u'06:20 B', u'14:15', u'07:05', u'15:30', u'08:00', u'16:00 E', u'10:00', u'16:50', u'10:55 E', u'17:25', u'12:05', u'18:10'], 
'from': u'TREVO DA BR-101', 
'su': [u'10:05', u'15:40', u'10:25 E', u'16:25 E', u'05:30', u'12:15', u'18:35 E', u'06:10', u'13:00 E', u'20:20', u'07:00', u'13:55', u'21:10', u'08:05', u'14:50', u'09:40 E', u'15:35 E', u'10:50', u'16:30 E', u'11:15', u'17:20']}], 
u'028': [{'to': u'MEAIPE', 
'sa': [u'13:45'], 
'WD': [u'13:45'], 
'from': u'TREVO DA BR 101', 
'su': []}, 
{'to': u'TREVO DA BR 101', 
'sa': [u'14:55', u'15:50'],
 'WD': [u'14:55', u'15:50'],
 'from': u'MEAIPE', 
'su': []}], 
u'041': [{'to': u'TREVO DA BR101', 
'sa': [], 
'WD': [u'14:25'], 
'from': u'TREVO DE SETIBA',
 'su': []}, 
{'to': u'TREVO DE SETIBA',
 'sa': [], 
'WD': [], 
'from': u'TREVO DA BR101',
 'su': []}], 
u'040': [{'to': u'KUBITSCHEK',
 'sa': [u'06:13', u'07:03'], 
'WD': [u'06:12 IF', u'07:00', u'11:22', u'12:32', u'12:52'], 
'from': u'TREVO DE SETIBA', 
'su': []},
 {'to': u'TREVO DE SETIBA', 
'sa': [u'07:50'], 
'WD': [u'16:48', u'11:40', u'18:16 IF'],
 'from': u'KUBITSCHEK',
 'su': []}], 
u'025': [{'to': u'IPIRANGA', 
'sa': [u'05:30', u'08:35', u'13:25', u'19:05', u'06:15', u'09:35', u'14:10', u'21:10', u'06:30', u'09:55', u'15:05', u'07:15', u'10:45', u'15:25', u'07:30', u'11:45', u'15:45'], 
'WD': [u'05:30', u'09:35', u'14:40', u'18:55', u'06:15', u'09:55', u'14:55', u'19:15', u'06:30', u'10:45', u'15:55', u'19:35', u'07:15', u'11:45', u'16:25', u'20:20', u'07:30', u'12:55', u'16:55', u'20:40'], 
'from': u'BELA VISTA',
 'su': [u'05:50', u'13:50', u'20:00', u'06:50', u'14:50', u'20:30', u'07:50', u'15:50', u'21:50', u'08:50', u'16:50', u'22:20', u'09:50', u'17:45']}, 
{'to': u'BELA VISTA', 
'sa': [u'07:45', u'12:05', u'17:05', u'08:15', u'12:55', u'18:25', u'06:20', u'10:20', u'15:00', u'20:50', u'07:05', u'10:40', u'16:00', u'22:05', u'07:20', u'11:20', u'16:20', u'08:10', u'11:40', u'16:40', u'08:30', u'12:45', u'18:00', u'09:10', u'13:00', u'19:10', u'09:30', u'13:45', u'20:25'], 
'WD': [u'07:45', u'13:40', u'17:40', u'21:30', u'08:35', u'06:20', u'10:40', u'14:10', u'15:00', u'18:10', u'19:10', u'21:55', u'07:05', u'11:20', u'15:30', u'19:55', u'07:20', u'11:40', u'15:45', u'20:20', u'08:10', u'12:45', u'16:45', u'21:10', u'08:30', u'13:15', u'17:15', u'22:00', u'09:30', u'13:45', u'17:45', u'22:25', u'10:20', u'14:30', u'18:30'], 
'from': u'IPIRANGA', 
'su': [u'11:50', u'18:55', u'12:50', u'19:20', u'06:30', u'14:30', u'21:30', u'07:30', u'15:30', u'22:00', u'08:30', u'16:30', u'09:30', u'17:25', u'11:30', u'18:30', u'12:30', u'19:35', u'13:30', u'20:10']}], 
u'058': [{'to': u'MEAIPE', 
'sa': [u'05:35', u'11:15 O', u'17:25', u'06:15 E/O', u'11:52', u'19:22', u'06:40', u'12:15 E', u'21:45 E', u'07:35', u'13:05 O', u'08:40 E', u'14:15'], 
'WD': [u'05:35', u'11:15 O', u'17:25', u'06:15 E/O', u'11:52', u'19:22', u'06:40', u'12:15 E', u'21:45 E', u'07:35', u'13:05 O', u'08:40 E', u'14:15'], 
'from': u'SETIBA', 
'su': [u'06:38', u'12:25', u'17:08 E', u'07:25 E', u'13:08', u'18:00', u'08:07', u'13:55', u'18:25', u'08:50', u'14:40', u'19:30', u'06:07', u'11:38', u'16:25', u'22:50']}, 
{'to': u'SETIBA', 
'sa': [u'09:04', u'15:50', u'09:55', u'16:43', u'04:45', u'11:00', u'22:00', u'05:50', u'11:50', u'06:50', u'13:05', u'07:33 E/O', u'13:35 E', u'07:56', u'14:35 O', u'09:50 E', u'15:35', u'10:05', u'16:10'], 
'WD': [u'09:04', u'15:50', u'09:55', u'04:45', u'16:43', u'11:00', u'22:00', u'05:50', u'11:50', u'06:50', u'13:05', u'07:33 E/O', u'13:35 E', u'07:56', u'14:35 O', u'09:50 E', u'15:35', u'10:05', u'16:10'], 
'from': u'MEAIPE', 
'su': [u'10:25', u'15:08', u'21:10', u'11:08', u'15:55', u'21:50', u'05:55', u'11:15', u'16:15', u'22:00', u'06:20', u'12:00', u'17:00', u'22:40', u'07:05', u'12:40', u'17:20', u'07:35', u'13:25', u'08:15 E', u'14:15', u'19:00', u'09:10', u'14:50', u'19:35', u'09:35', u'15:30', u'21:10']}], 
u'024': [{'to': u'CAMURUGI', 
'sa': [u'06:30', u'16:25', u'07:45', u'17:40', u'09:00', u'19:00', u'11:20', u'21:30', u'12:35', u'22:30'], 
'WD': [u'06:30', u'16:25', u'07:45', u'17:40', u'09:00', u'19:00', u'11:20', u'21:30', u'12:35', u'22:30'], 
'from': u'IPIRANGA', 
'su': [u'06:30', u'16:30', u'07:45', u'17:40', u'09:00', u'18:50', u'11:15', u'21:30', u'12:30', u'22:20']}, 
{'to': u'IPIRANGA', 
'sa': [u'13:50', u'15:05', u'06:00', u'15:45', u'07:15', u'17:05', u'08:30', u'18:15', u'09:45', u'19:40', u'11:50', u'22:00', u'13:15', u'14:35'],
 'WD': [u'13:50', u'15:05', u'06:00', u'15:45', u'07:15', u'17:05', u'08:30', u'18:15', u'09:45', u'19:40', u'11:50', u'22:00', u'13:15', u'14:35'],
 'from': u'CAMURUGI', 
'su': [u'13:45', u'15:15', u'06:00', u'16:00', u'07:15', u'17:15', u'08:30', u'18:30', u'09:45', u'19:40', u'12:00', u'22:00', u'13:15', u'14:30']}], 
u'027': [{'to': u'KUBITSCHEK/OLARIA',
 'sa': [u'05:10', u'13:50', u'07:35', u'14:00', u'08:35', u'14:30', u'09:00', u'15:10', u'09:15', u'15:45'], 
'WD': [u'05:10', u'13:50', u'07:35', u'14:00', u'08:35', u'14:30', u'09:00', u'15:10', u'09:15', u'15:45'], 
'from': u'TREVO BR 101', 
'su': [u'07:15', u'13:00', u'19:55', u'08:15', u'14:00', u'20:55', u'09:10', u'15:00', u'21:50', u'10:00', u'16:00', u'10:10', u'17:05']}, 
{'to': u'TREVO BR 101',
 'sa': [u'09:50', u'21:10', u'11:25', u'05:35', u'13:50', u'06:50', u'14:30', u'08:00', u'15:05', u'08:35', u'21:10', u'09:25', u'10:50', u'13:30'],
 'WD': [u'09:50', u'21:10', u'11:25', u'05:35', u'13:50', u'06:50', u'14:30', u'08:00', u'15:05', u'08:35', u'21:10', u'09:25', u'10:50', u'13:30'],
 'from': u'KUBITSCHEK/OLARIA', 
'su': [u'10:55', u'18:05', u'12:00', u'19:30', u'07:45', u'14:30', u'08:40', u'15:30', u'09:40', u'16:30', u'10:25', u'17:30', u'11:40', u'18:30', u'12:30', u'20:25', u'13:30', u'21:10']}], 
u'039': [{'to': u'TREVO BR101', 
'sa': [u'05:50', u'06:48', u'08:48', u'09:48', u'12:48'], 
'WD': [u'05:48', u'06:55', u'08:49', u'10:18', u'11:48'], 
'from': u'SETIBA', 
'su': []}, 
{'to': u'SETIBA', 
'sa': [u'15:48', u'06:30', u'07:55', u'09:55', u'10:55', u'13:55', u'16:55'], 
'WD': [u'15:45', u'06:30', u'08:15', u'10:15', u'11:20', u'13:10', u'16:45'], 
'from': u'TREVO BR101',
 'su': []}], 
u'054': [{'to': u'BAIA NOVA', 
'sa': [u'14:30'], 
'WD': [u'14:30'], 
'from': u'PRA\xc7A DA VITORIA', 
'su': [u'16:15']}, 
{'to': u'PRA\xc7A DA VITORIA',
 'sa': [u'05:55', u'16:15'], 
'WD': [u'05:55', u'16:15'],
 'from': u'BAIA NOVA', 
'su': []}], 
u'007': [{'to': u'PORTO GRANDE', 
'sa': [u'08:15', u'17:45', u'09:25', u'18:40', u'11:40', u'22:05', u'12:40', u'14:10'], 
'WD': [u'08:15', u'17:45', u'09:25', u'18:40', u'11:40', u'22:05', u'12:40', u'14:10'], 
'from': u'PORTAL CLUB',
 'su': [u'06:00', u'09:55', u'12:50', u'14:50', u'16:45']},
 {'to': u'PORTAL CLUB', 
'sa': [u'15:10', u'16:20', u'06:22', u'15:15', u'07:16', u'16:32', u'08:28', u'18:55', u'09:25', u'20:45', u'10:30', u'12:40', u'13:47'],
 'WD': [u'15:10', u'16:20', u'06:22', u'15:15', u'07:16', u'16:32', u'08:28', u'18:55', u'09:25', u'20:45', u'10:30', u'12:40', u'13:47'],
 'from': u'PORTO GRANDE',
 'su': [u'19:50', u'06:50', u'08:45', u'10:45', u'13:50', u'15:50', u'20:40']}], 
u'055': [{'to': u'RIO GRANDE', 
'sa': [u'12:15', u'18:10'], 
'WD': [u'12:15', u'18:10'], 
'from': u'PRA\xc7A DA VITORIA', 
'su': []}, 
{'to': u'PRA\xc7A DA VITORIA', 
'sa': [u'06:20', u'12:55', u'19:00'], 
'WD': [u'06:20', u'12:55', u'19:00'], 
'from': u'RIO GRANDE',
 'su': []}], 
u'006': [{'to': u'CONDADOS', 
'sa': [u'10:40'], 
'WD': [u'10:40'],
 'from': u'JARDIM BOA VISTA', 
'su': []}, 
{'to': u'JARDIM BOA VISTA', 
'sa': [u'08:51'], 
'WD': [u'08:51'], 
'from': u'CONDADOS', 
'su': []}]}, 
'network': 'PMG'}

@grote
Copy link
Owner

grote commented Mar 29, 2017

I tried to indent this for readability and the parser bailed out at the beginning already, because property names need to be enclosed in double quotes.

@Skippern
Copy link
Author

Changing to double quotes now, but the bail out might also be due to mixing UTF strings with strings

@Skippern
Copy link
Author

Double quotes in the code still give single quotes in the output, so it must be due to UTF strings (u"")

@Skippern
Copy link
Author

JSON file output is found here, I have stored scraper and JSON in my repo this repo

@grote
Copy link
Owner

grote commented Apr 2, 2017

Some observations:

  • If you want osm2gtfs match your routes properly with the ones from OSM, the exact name needs to be supplied to the route relation for from and to values.
  • Schedule exceptions seem to be missing e.g. for public holidays
  • I personally don't like the WD abbreviation. Maybe Mo-Fr is better?
  • Does your JSON handle route variants already?
  • I noticed that your times sometimes look like this 07:33 E/O. Whatever the E/O means, we should probably handle it differently if it is needed.

@Skippern
Copy link
Author

Skippern commented Apr 2, 2017

Thanks

  • I will make sure from and to values matches the ones posted
  • Site doesn't post exceptions for public holidays, easter coming up, and nothing posted as of yet
  • I was thinking WD as alias for Weekdays, and WE alias for Weekends, but following ISO standards with Mo-Fr and Sa-Su might probably be better
  • Route variants are still not handled, I have two different scenarios for them, one is easy to handle (12:00 IF, where IF corresponds with variation), and the other one needs some deeper though (different background colour in background of cell in PDF file).
  • 07:33 E/O is the most complicated exception, two exceptions (E and O) on same departure.

For now I think the best option is to ignore route exception by stripping anything after the time. Don't know if this is best done in the scraper or in osm2gtfs

@grote
Copy link
Owner

grote commented Apr 2, 2017

For now I think the best option is to ignore route exception by stripping anything after the time. Don't know if this is best done in the scraper or in osm2gtfs

I think we should handle exception through some special attributes or routes in the json structure, so I would remove everything behind the time with your scraper and then later bring it back in a different way.

@Skippern
Copy link
Author

Skippern commented Apr 2, 2017

Ok, I'll try this and have a new version posted during the afternoon

@Skippern
Copy link
Author

Skippern commented Apr 2, 2017

New version of the JSON file in Skippern/GV-scraper@0af7afc

  • Changed WD to Mo-Fr
  • Captured variations and dump them into different tables
  • Blacklisting variations, this can be undone by changing a single variable

Still need to look into variations that escape my code. I cannot see in the code why these escape. Need further investigation on this. Mainly affects ref 057 and 058.

@grote
Copy link
Owner

grote commented Apr 2, 2017

Looks nice! I can imagine to migrate Floripa to the same format at some point, so we can both use the same code.

@Skippern
Copy link
Author

I think I have figured out a way to handle exception, currently running the script, if it looks good I'll reorganise my repo and post it there.

Python module workalendar handles both fixed and moving holidays, but currently not including all countries, but since Brazil was in the list, I figured out a way to include the valid state and municipal holidays. I have posted an issue on nova workalendar/workalendar#187 to include all Brazilian state holidays at least.

@grote
Copy link
Owner

grote commented Apr 20, 2017

Awesome!

What you need to keep in mind for the exceptions is some definition about how the service is on this day. How will opsm2gtfs know the service will operate on the day of the exception?

@Skippern
Copy link
Author

How I do it is a list of dates the line will not run, and than include the same list as service for a time table how it should run, you'll see when the script completes and I push to git

@Skippern
Copy link
Author

The example with exception is found here. I still need to add a few checks to make sure routes that have no exceptions are handled correctly, but at least the JSON shows how I have thought about this. Is the ISO-date format acceptable, or should I use another format for the dates?

@grote
Copy link
Owner

grote commented Apr 20, 2017

No, ISO dates are great.

@AltNico
Copy link
Collaborator

AltNico commented Sep 30, 2017

@Skippern and the others: what's the status of this issue? Is there already a branch somewhere where someone started working on this? @mikolaiguetschow and I are interested in implementing this issue while adding a creator for a new town (mapanica/coordinacion#6).

@AltNico
Copy link
Collaborator

AltNico commented Sep 30, 2017

And if this is the format we want to have, maybe we can open an implementation issue with an abstract form of it to easify development (@grote like in repomaker) and mark this as an discussion issue. Sorry for double posting.

@Skippern
Copy link
Author

Skippern commented Oct 1, 2017 via email

@pantierra
Copy link
Contributor

pantierra commented Oct 24, 2017

Just for your information, I built today a basic script to convert the CSV we had from Managua to a timetable json file following the new json format discussed here. I hope this will allow the Managua support to happen soon and hopefully by relying exclusively on standard creators.

@pantierra
Copy link
Contributor

pantierra commented Oct 24, 2017

Regarding the Timetable proposal here:

  • There is some information, which is doubled in the configuration file and the timetable: start_date and end_date. These should be clearly live in one or another.
  • The information on network and operator should come from OpenStreetMap, in my humble opinion, and not from the timetable.
  • The source is nice, but never used.

@AltNico
Copy link
Collaborator

AltNico commented Oct 25, 2017 via email

@pantierra
Copy link
Contributor

As start and end date depends heavily on the timetable, this information should be removed from the configuration and only stored in timetable.json.

This is a very tricky question. Depending on the perspective it can make sense to have it in the timetable.json or in the configuration file. And I'm not sure about where it should be. I can see arguments for both locations.

  • The first case we treated here Florianopolis/Fenix is basically pulling a non-standard format directly from the city administration and the custom trip handler does all the magic. While I do think this timetable proposal is nice and very important to have defined (especially for the standard creators), but I don't think it should be the only format of input which we support.
  • I also would not like to go back to the timetable to edit the dates, every time I create a new GTFS. Of course, in the best of possible worlds, it is quite attached to it. But in the real scenarios we are having, I guess it would cause a bit more trouble, than in the config file.

Just my two cents. I would be curious to know what others think about this. In my impression, we are still not seeing the whole picture here.

@Skippern
Copy link
Author

In some instances, start_date and end_date can be gathered from the timetable source, but sometimes this data is not available, or available in arbitrary formats. "Until opening of the new road" will require human intervention, and therefor having an option of putting this in configuration would be good.

Having the data double up would not be any issue if we have a clear rule which one have priority over the other. I would say end_date from timetables have priority over config.

@pantierra
Copy link
Contributor

pantierra commented Nov 29, 2017

I generally documented it here: https://github.com/grote/osm2gtfs/wiki/Schedule

To me it seems not very good to give a priority to the import file rather than the config file. Of course the information from the import file is more relevant, but only if it works out and comes in the right variable name, etc. The config file, however is something, we can control and specify what is needed and leave it empty for the import file to feed in, if possible. For example, think about the scenario of @grote in Florianópolis they download a very specific json file from the public transport provider. You still want to have control if you want to overwrite the values there or not.

@Skippern
Copy link
Author

I will during the next weeks update Skippern/GV-scraper#1 both to align with the wiki documentation, and to try to add interim stations in the array, not just end points. I will probably need to experiment with my scripts in order to get this in a good way. Thinking of multiple ways of adding these stops, and might use the different solutions on different companies.

I will add name tag to the routes, both durations.json and times.json, and will make sure times.json includes the via tag from OSM.

@pantierra
Copy link
Contributor

Basic support for this has been implemented in PR #99. More advanced parts of the here developed schedule format (like the "via" option) are handled in separate issues.

@pantierra pantierra added the ready label Jan 6, 2018
@pantierra
Copy link
Contributor

Resolved with accepted PR #99

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants