Zürich trams LIVE

33
Zürich trams LIVE Behind the scenes of local.ch’s 1st of April joke Vasile Cotovanu

Transcript of Zürich trams LIVE

Page 1: Zürich trams LIVE

Zürich trams LIVEBehind the scenes of

local.ch’s 1st of April joke

Vasile Cotovanu

Page 2: Zürich trams LIVE

Are they really live ?

GPS, sensor on tracks, live XML feed from SBB/ZVV ?

Page 3: Zürich trams LIVE

How we did it ?

• Build vector “database”

• Build textual “database”

• Integrate vector and text and make them usable by map.local.ch

• Other use-cases of a public transport full dump

Page 4: Zürich trams LIVE

Build vector - Google Earth

Page 5: Zürich trams LIVE

Vector: How accurate ?

Page 6: Zürich trams LIVE

Vector: How accurate ?

Page 7: Zürich trams LIVE

Vector: How accurate ?

Page 8: Zürich trams LIVE

Vector: simplified but ...

Page 9: Zürich trams LIVE

Vector: end loops

Page 10: Zürich trams LIVE

Vector: preserve one-ways

Page 11: Zürich trams LIVE

Vector: final KML

Page 12: Zürich trams LIVE

Vector: Clean it !

Page 13: Zürich trams LIVE

Vector: topology errors

Page 14: Zürich trams LIVE

Vector: snap stations

Page 15: Zürich trams LIVE

Vector: graph done !

Page 16: Zürich trams LIVE

Text: vehicle-link-station

station

station_idname

vehicle

vehicle_idname

linkmany-many

vehicle_idstation_iddeparture

Page 17: Zürich trams LIVE

Text: populate link, vehicle

vehicle

vehicle_idname

linkmany-many

vehicle_idstation_iddeparture

Page 18: Zürich trams LIVE

Text: how it looks like

Page 19: Zürich trams LIVE

Integrate vector + text

Page 20: Zürich trams LIVE

Integrate vector + textTram 4

264,-445,-261,-259,-257,-255,-253,-540,-539,-250,-274,-276,-278,-277,-464,-463,-555,-50,-460,-459,-194,-193,-191,-188,-190,-189,-184,-183,-181,-180,-179,-118,-120,-122,-437,123

Page 21: Zürich trams LIVE

Export to map.local.ch

Page 22: Zürich trams LIVE

Make them move !

vehiclesimpleservice

map.local.ch

JS

Page 23: Zürich trams LIVE

Make them move !

vehiclesimpleservice

map.local.ch

JS

A S1 S2 S3 B

13:10 13:14 13:22 13:30 13:35

Vehicle Tram2

Page 24: Zürich trams LIVE

Make them move !

vehiclesimpleservice

map.local.ch

JS

A S1 S2 S3 B

13:10 13:14 13:22 13:30 13:35

Vehicle Tram213:26

Page 25: Zürich trams LIVE

Make them move !

vehiclesimpleservice

map.local.ch

JS

A S1 S2 S3 B

13:10 13:14 13:22 13:30 13:35

Vehicle Tram213:26

74%

Page 26: Zürich trams LIVE

Make them move !

vehiclesimpleservice

map.local.ch

JS

A S1 S2 S3 B

13:10 13:14 13:22 13:30 13:35

Vehicle Tram213:26

74%55%

Page 27: Zürich trams LIVE

Make them move !

vehiclesimpleservice

map.local.ch

JS

A S1 S2 S3 B

13:10 13:14 13:22 13:30 13:35

Vehicle Tram213:26

74%55%

Polylines S2 - S3

S2

S3

Page 28: Zürich trams LIVE

Make them move !

vehiclesimpleservice

map.local.ch

JS

A S1 S2 S3 B

13:10 13:14 13:22 13:30 13:35

Vehicle Tram213:26

74%55%

Polylines S2 - S3

S2

S3

Page 29: Zürich trams LIVE

Make them move !

vehiclesimpleservice

map.local.ch

JS

A S1 S2 S3 B

13:10 13:14 13:22 13:30 13:35

Vehicle Tram213:26

74%55%

Polylines S2 - S3

S2

S3

Page 30: Zürich trams LIVE

Additional features

Wow, they know how many passengers are inside !

Page 31: Zürich trams LIVE

What else ?

“boring” widgets with departures

Page 32: Zürich trams LIVE

Meet in the middle

Page 33: Zürich trams LIVE

Thank you !