https://shkspr.mobi/blog/2021/02/force-directed-graph-of-the-london-tube-map-including-crossrail/ Terence Eden's Blog Force Directed Graph of the London Tube Map - including CrossRail! 2021-02-14 by @edent | #map #open data #tfl #tube | 2 comments --------------------------------------------------------------------- Force Directed Graphs of the London Underground have been done many times before - but I think I'm the first person to add the new Elizabeth Line (CrossRail). I've also created a JSON graph of all of London's rail services - including DLR, Trams, C2C, ThamesLink etc. Demo * Play with it yourself * Grab the code from GitLab * I've also created a version with every London station and train line. Limitations * This is a quick weekend hack - don't expect polished code or performance! * "Overlapping" lines don't show. So where a route is served by multiple lines, you'll only see one of them. * Zoom is a bit shonky. * Relies on an older version of D3 (V5). Background Drawing the Tube map as a graph is a popular pastime. See these prior arts: * "Force-directed graph of tube lines" by Martin Zaltz Austwick (2011) * "Graph Drawing by Weighted Constraint Relaxation" (2017) * "What would the London Tube Map look like if Data Scientists designed it?" by Keith McNulty (2018) * "Going Underground: Graphing and Pathfinding London Tube Lines" by Joe Depeau (2019) * And many others. I forked some code from Massimo Santini. Chris Bell maintains an excellent CSV of all London stations and their connections The official colours for each line can be found in TfL's colour branding guide and in hex versions at Oliver O'Brien's site. What's next Possible ideas - feel free to contribute on GitLab. * Experiment with different layout algorithms. * Weight links according to speed, distance, business, or some other metric. * Better colour options for non-TfL lines. * More efficient code. --------------------------------------------------------------------- More posts from around the site: 2 thoughts on "Force Directed Graph of the London Tube Map - including CrossRail!" 1. [G3sBtHlb] HackerNewsTop10 says: 2021-02-14 at 13:12 Force Directed Graph of London's Railways Link: shkspr.mobi/blog/2021/02/f... Comments: news.ycombinator.com/item?id=261318... Reply 2. [5156c05d] electronic max says: 2021-02-14 at 16:02 i have just spent 10 minutes yanking the central line around on my screen > shkspr.mobi/blog/2021/02/f... Reply Leave a Reply Cancel reply Your email address will not be published. Required fields are marked * [ ] [ ] [ ] [ ] [ ] [ ] [ ] Comment[ ] Name * [ ] Email * [ ] Website [ ] [ ] Notify me of follow-up comments by email. [ ] Notify me of new posts by email. [Post Comment] [ ] [ ] [ ] [ ] [ ] [ ] [ ] [ ] To respond on your own website, enter the URL of your response which should contain a link to this post's permalink URL. Your response will then appear (possibly after moderation) on this page. Want to update or remove your response? Update or delete your post and re-enter your post's URL again. (Learn More) [ ] [Ping me!] Subscribe to Blog via Email Enter your email address to subscribe to this blog and receive notifications of new posts by email. Join 11,894 other subscribers. Email Address [ ] Subscribe Search for: [ ] [Search] Explore The Archives 2021 January 31 posts February 14 posts March April May June July August September October November December 2020 January 31 posts February 29 posts March 31 posts April 30 posts May 31 posts June 30 posts July 31 posts August 31 posts September 30 posts October 31 posts November 30 posts December 31 posts 2019 January 31 posts February 12 posts March 17 posts April 12 posts May 12 posts June 10 posts July 7 posts August 5 posts September 6 posts October 14 posts November 30 posts December 17 posts 2018 January 8 posts February 4 posts March 6 posts April 14 posts May 5 posts June 6 posts July 6 posts August 13 posts September 14 posts October 8 posts November 30 posts December 4 posts 2017 January 12 posts February 9 posts March 8 posts April 4 posts May 10 posts June 5 posts July 5 posts August 6 posts September 3 posts October 4 posts November 30 posts December 2016 January 10 posts February 10 posts March 11 posts April 9 posts May 8 posts June 9 posts July 6 posts August 9 posts September 4 posts October 2 posts November 30 posts December 14 posts 2015 January 8 posts February 11 posts March 10 posts April 4 posts May 9 posts June 3 posts July 7 posts August 9 posts September 10 posts October 2 posts November 30 posts December 4 posts 2014 January 13 posts February 13 posts March 14 posts April 13 posts May 7 posts June 7 posts July 9 posts August 5 posts September 5 posts October 1 post November 30 posts December 20 posts 2013 January 25 posts February 17 posts March 15 posts April 18 posts May 11 posts June 14 posts July 6 posts August 14 posts September 6 posts October 4 posts November 30 posts December 14 posts 2012 January 14 posts February 8 posts March 13 posts April 15 posts May 10 posts June 16 posts July 8 posts August 8 posts September 6 posts October 6 posts November 30 posts December 31 posts 2011 January 13 posts February 11 posts March 11 posts April 12 posts May 8 posts June 8 posts July 6 posts August 5 posts September 11 posts October 7 posts November 30 posts December 17 posts 2010 January 6 posts February 15 posts March 12 posts April 13 posts May 4 posts June 3 posts July 15 posts August 8 posts September 11 posts October 9 posts November 30 posts December 9 posts 2009 January 1 post February 5 posts March 3 posts April 7 posts May 12 posts June 8 posts July 10 posts August 10 posts September 12 posts October 22 posts November 31 posts December 15 posts 2008 January 2 posts February March 2 posts April 3 posts May 2 posts June July 1 post August 3 posts September 1 post October 3 posts November 2 posts December 1 post 2007 January February March April May June July August September October November 4 posts December 5 posts 2006 January February March April 1 post May June July August September October November 1 post December 2005 January February March 1 post April May June July August September 1 post October November December 2004 January February March April May 5 posts June 3 posts July 1 post August September October November December 2003 January February March 2 posts April May June July August September October November December 2002 January February 1 post March April 3 posts May June July August September October November December 2001 January February March April May June July 1 post August September October 1 post November December 2000 January February March 1 post April May June July August September October November 1 post December 1999 January February March April May June July August September 1 post October November December 1 post 1995 January February March 1 post April May June July August September October November December 1987 January February March April May June July August September October November December 1 post * (c) Terence Eden * Contact Me * Subscribe * Citations * About Me