railviz is a rail transit visualization program. Given a set of stations, transit lines, and timetables, railviz will figure out the estimated positions of actual trains.
srcdirectory contains the source code of railviz (Go). railviz derives train data and serves it via a single HTTP endpoint, formatted in JSON.
resdirectory contains definitions of transit lines which are used by the app to figure out train positions. In this repo there are definitions for the PATH rapid transit system, current as of August 2014. These files can easily be edited or replaced to visualize other transit systems.
htdocsdirectory contains a single file
index.htmlwhich consumes railviz data and displays trains on a Google Map widget.
I like trains and wanted to visualize them. I was particularly interested in
deriving the number of trains on a track using only timetable data. After some
research, I discovered GTFS, a feed format made specifically for this type
of application, however, the actual feed published by PATH contained bogus
data. So I ended up copy-pasting timetables into a custom JSON format. (See
res directory.) This was also more fun.