Coder Social home page Coder Social logo

cheeaun / railrouter-sg Goto Github PK

View Code? Open in Web Editor NEW
42.0 5.0 12.0 20.52 MB

A progressive web app that lets you explore MRT and LRT rail routes in Singapore

Home Page: https://railrouter.sg/

HTML 13.02% JavaScript 64.71% CSS 22.28%
singapore mrt lrt train metro subway map transport rail lta

railrouter-sg's Introduction

RailRouter SG

Screenshot of RailRouter SG

Screenshot of RailRouter SG

RailRouter SG is a progressive web app that lets you explore MRT and LRT rail routes in Singapore.

It was built to scratch my curiosity itch for comparing the real route lines VS the lines shown on Google Maps, which I personally find too straight and skews the perception of how trains actually travel in the real world.

Available features:

  • Real rail route lines, for all train routes.
  • Show station names in Chinese and Tamil, besides English.
  • Show station building structures, both underground and aboveground.
  • Show location of exits (a.k.a. entrances) for (almost) all stations.
  • Show train arrival times for some stations.
  • Possibly, works offline.

Previously

Screenshot of RailRouter SG

This is the first version, using Google Maps.

Technicalities

For development

  • npm i - install dependencies
  • npm start - starts the server
  • npm run build - builds the production assets for deployment

Data source

From my other repo: cheeaun/sgraildata.

⚠️ NOTE: All feature ids are removed from sg-rail.geo.json in this repo, due to a strange bug in Mapbox GL JS. If the id number is too large, errors occur.

Generating station code markers

  1. Go to https://codepen.io/cheeaun/full/pogQjgV
  2. Paste all the train codes. (/data/raw/sg-stations-codes.txt from sgraildata repo)
  3. Click "Generate Images" button to download ZIP file of SVG images.
  4. Extract files from the ZIP file.
  5. Go to https://www.facetstudios.com/sprite-generator
  6. Drag/Upload all SVG files to the site.
  7. Uncheck "Export for retina". Check "Generate JSON".
  8. Click "Download Files" button.
  9. Extract files from ZIP file.
  10. Move & rename sprite image to src/stations.png. Optimize the image with TinyPNG.
  11. Move & rename sprite JSON to scripts/sprite.json.
  12. Run node scripts/gen-stations-sprite.js which will generate src/stations.json.

License

railrouter-sg's People

Contributors

cheeaun avatar elliotwutingfeng avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

railrouter-sg's Issues

DT2 and DT3 missing

Hi, thanks for this service.

I noticed that DT2 Cashew and DT3 Hillview stations on the Downtown line are missing, even after refreshing or zooming many times:

image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.