a a a

Siin lehel jagame Tallinnaga seotud avaandmeid, mis on masinloetavas formaadis, tasuta ja ilma ligipääsupiiranguta. Avaandmete nimistu on loodud avalike andmehulkade info koondamiseks ja uute andmekogude avalikustamise hõlbustamiseks. Tallinna avaandmed on avalikud ja mõeldud kõigile vabalt...

Loe edasi

Ühistranspordi info

Ühistranspordi info
Tallinna ja Harjumaa ühistranspordi peatuste numbrid ja nimekiri, asukohad ja sõiduplaanid

Real-time departure times (example: for three stops named Kalev as displayed on http://m.transport.tallinn.ee/#stop/07401-1,07402-1,07403-1 ) are available from address:


Example of real-time departures data in Tallinn:



The time parameter is used only to make URL unique for each request and so prevent browser from caching the request results. Otherwise the browser may return cached old results when you ask departures for the same stop later.


You may use any value for time parameter that is unique, e.g. date and time with seconds or UNIX time (seconds from 1970-01-01).






bus,18,51174,51174,Viru keskus







Note: SiriID values from http://transport.tallinn.ee/data/stops.txt should be used to specify stops for that request.

Short description of data format used in stops.txt and routes.txt files

The file http://transport.tallinn.ee/data/stops.txt contains the data about all stops.
First row indicates column names
ID;Lat;Lng;Stops;Name;Info;Street;Area;City and version of program.
Note, that we might add additional fields in the future, so use column
names to find position of field you need.

Each line in the file has data fields for one stop: stopID, siriID, GPS coordinates Latitude and Longitude multiplied by 10000, stop name, ids of closest stops for walking, remark, street, area, fare zone, city.
Field values that are equal to values in previous line are removed to reduce file size. So you have to refill the values when processing the file.

The routes.txt file contains the data about all routes and timetables of each route. First row in the file indicates field names. Then one row has fields for route data, the next row has encoded timetable of that route. E.g. lines 3, 5, 7, ... in the file contain routes timetables in encoded format.
Route field values that are equal to values of previous route are removed to reduce file size.

Decoding route timetable:
,, indicates end of row in the timetable. Values in first row are start times of trips (columns) in minutes, values in second row are dates, values in third row are weekdays, values in all next rows are driving times in minutes to next stop in the trip. Use the page http://transport.tallinn.ee/decode.html to test the decoding of values into timetable. Look at the source code of this page. The decoding function is named explodeTimes(encoded_data)


Tagasi nimekirja

Kõik õigused kaitstud © 2022 Tallinn