Giter Site home page Giter Site logo

vito-swift / theweekendest Goto Github PK

View Code? Open in Web Editor NEW

This project forked from blahblahblah-/theweekendest

0.0 1.0 0.0 19.3 MB

Real-time New York City subway service map

Home Page: https://www.theweekendest.com

License: MIT License

JavaScript 91.82% HTML 3.14% CSS 3.97% Ruby 1.07%

theweekendest's Introduction

theweekendest

This is a React app that relies heavily on goodservice.io's APIs to dynamically generate real-time route maps for the New York City subway with the help of Mapbox, particularly useful when service changes regularly occur on weekends and overnights.

A Mapbox theme was created for this project and has been made public.

See it live at https://www.theweekendest.com.

Running locally

  • Sign up for an account with Mapbox, get a token and add it to an .env file as MAPBOX_TOKEN.

  • Download Stations.csv from the MTA's website and drop it in /src/data/files

  • Download the GTFS schedule files from MTA at https://web.mta.info/developers/developer-data-terms.html (agree to the terms, and then download the data for New York City Transit. (look for "GTFS"). Drop transfers.txt in /src/data/files

  • To have nice looking paths, you'd need to parse out the shapes.txt file from the GTFS package. I wrote a script that takes .csv files to generate these paths. Each .csv file is expected to be a contiguous path for a train route. I took the first shape path (with some exceptions) for each route in shapes.txt and dumped each into its own .csv file before running it.

ruby src/data/generate_json.rb
ruby src/data/generate_transfers_json.rb
yarn install
yarn start

Inspirations:

theweekendest's People

Contributors

blahblahblah- avatar dependabot[bot] avatar

Watchers

 avatar

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.