• Stars
    star
    216
  • Rank 183,179 (Top 4 %)
  • Language
    JavaScript
  • Created over 14 years ago
  • Updated almost 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Show a live map of the London Underground and London buses
underground-live-map
====================

https://traintimes.org.uk/map/tube/

This uses the TfL API to plot the approximate live locations of
all the trains on the London Underground.

It is very hacky. Built on top of many-years-old code, with
many hacks to get things working. But here it is anyway. Feel
free to improve, it shouldn't be hard!

Licence - PDMarker is LGPL. Pins/loading pretty generic. Rest is MIT.

Issues
------
* H&C stations between Paddington and Hammersmith are missing or empty
  in the source data from TfL.

Install
-------
To install:
* Create a local folder for the project and configure this as the root of your webserver
* Create folders /map/tube/ inside the project root.
* Pull the repo into the /map/tube folder, e.g. git pull --recursive https://github.com/dracos/underground-live-map.git
* In terminal, cd to the bin folder. Then Run the script fetch.py to generate the data/london.js output file.

Possible TODOs
--------------
* Fix the remaining stations that are misplaced, consolidate all
  the station/ line information into one authoritative file.
* Locate the Depots, Sidings and other non-station places they can be.
* Improve station canonicalisation.
* Show disruptions/ closed lines/ stations.
* Occasionally more than one train on a line with the same ID (e.g.
  saw two 477s on Northern this morning), the code currently munges
  them together leading to an oddly-behaving train;
* A couple of trains do do weird things in the data, rushing from
  one end to another and back - is this in the source or is the
  script that reads the source making a mistake somehow?
* Initial placement of trains assumes constant inter-station journey
  time. Locate a file of journey times and use that instead. (Doesn't
  matter /too/ much as the front end code will get the train to the
  next station at the right time, hopefully.)
* Store history of live API results so can be used for "Approaching"
  trains to know where they were, and for moreuses than that.
* Much improve the front end so e.g. when it fetches updates every couple
  of minutes via AJAX, it doesn't just redraw the entire map, but
  cleverly updates train positions. Given the server-given starting
  position isn't currently that great, that would need improving too
  to prevent large jumps.


Matthew Somerville
https://dracos.co.uk/
https://twitter.com/dracos

------------------------------------------

Copyright (c) 2010 Matthew Somerville

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

More Repositories

1

double-metaphone

A Python implementation of the Double Metaphone algorithm
Python
60
star
2

django-date-extensions

Extensions to DateField to handle both approximate dates (e.g. "March 1963") and default year dates (e.g. assume "24th June" is this year)
Python
53
star
3

local-lockdown-lookup

A postcode lookup for UK local coronavirus lockdowns.
PHP
19
star
4

split-ticket

Basic split ticket calculator
Python
18
star
5

bach.js

A JavaScript library that scans harmony for β€˜rule’ β€œviolations”.
JavaScript
9
star
6

check-pip-dependencies

Monkeypatch script to run pip install --no-install and highlight dependency conflict issues not otherwise caught.
Python
8
star
7

Theatricalia

A database of past and future theatre productions
Python
8
star
8

opendata-gazetteer

A gazetter combining the three OS OpenData gazetteers, CodePoint Open, 1:50k Gazetteer, and OS Locator
Python
7
star
9

twitpanto

The code for the annual Birmingham Twitter panto.
HTML
3
star
10

m20-camera

A simple GitHub Action based repository that fetches the M20 junction 10/11 cameras and stores them, creating animated GIFs of everything it has fetched so far.
3
star
11

who-said

Search the subtitles from the BBC's Doctor Who, with visualisations and more
PHP
2
star
12

uk-covid19-inquiry

Searchable transcripts of the UK Covid-19 Inquiry hearings
Python
2
star
13

abovebrum

Code that powers the abovebrum Twitter account.
2
star
14

scheduler

Bots for Twitter(/Mastodon) for CBeebies, the UN Secretary-General, or the ISS.
Python
1
star
15

datasette-doublemetaphone

Datasette plugin for Double Metaphone
Python
1
star
16

netlify-statuskit-example

HTML
1
star
17

edinburgh-fringe-search

A command line search of the official edfringe.com website
1
star
18

opendata-boundaryline

Just a noddy demo plotting a vector of a council on top of an OSM map.
Python
1
star
19

dracos.github.com

1
star
20

pohi

Searchable transcripts of the Post Office Horizon IT Inquiry hearings
Python
1
star
21

get_iplayer_wrapper

Tiny wrapper around get_iplayer to run daily each night, have all the right options, add to iTunes, and sleep the computer.
Python
1
star
22

ansible-server

Playbook for setting up a server (currently for Theatricalia)
Jinja
1
star
23

secgen

Unofficial Twitter bot of the UN Secretary-General
1
star
24

display-kml-on-map

Does what it says on the tin
JavaScript
1
star
25

quintessence-of-dust

A data visualisation of the World Shakespeare Festival, one of three Caper commissions for myShakespeare.
JavaScript
1
star