Git Product home page Git Product logo

wmatamap's Introduction

WMATAMap

A set of tools to generate a live map of trains on the Washington Metro, using data from the WMATA API. This project is a rewrite and cleanup of code that I wrote a long time ago in an effort to make it work with little to no manual intervention (and also generally clean it up)

How to Use

Because I don't want to mess with copyright stuff by rehosting WMATA data, and because I want to provide a mechanism for updating the data should it change over time (e.g. new stations, etc), there are a series of tools that must be run before you can get the live map working. These tools fetch some static data from the WMATA API and manipulate/combine/transform it into forms that are easier to deal with in the main code. The following directions will help you configure and run the tools.

  1. Obtain an API key from WMATA (free) and place it in the data directory in a file named WMATA_API_KEY.txt
  2. If you just want to get up and running quickly, run the autoconfigure.sh script in the tools directory. This will run the necessary tools (each tool does only one thing) and get the data directory properly configured. NOTE: You must run this script from inside the tools directory at the moment.
  3. If you'd like to obtain one of the intermediate data files, would like to fetch everything manually, or would like to update one, you can run the tools individually. Look at the README in each tool's directory for more info on what it needs to run.
  4. Set up MapKit JS credentials (see main/README.md for more details)

You do not need to do both step 2 and step 3 -- pick one or the other.

You can then run the main positions server that obtains live positions from the WMATA API and processes them with the data derived from the tools with node main/server.js. Then you can use webpage/mapkit.html to view the positions live updating.

Screenshot

Screenshot of map showing metro trains

License

MIT

wmatamap's People

Contributors

nathreed avatar

Watchers

 avatar  avatar  avatar

Forkers

dumbsheep123

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.