Coder Social home page Coder Social logo

blahblahblah- / theweekendest Goto Github PK

View Code? Open in Web Editor NEW
78.0 2.0 11.0 21.83 MB

Real-time New York City subway service map

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

License: MIT License

JavaScript 93.23% HTML 2.10% Ruby 0.70% SCSS 3.97%
transit subway nyc mta gtfs gtfs-rt mapbox react

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

  • To have nice looking paths, download the GTFS schedule files from MTA at http://web.mta.info/developers/developer-data-terms.html (agree to the terms, look for "GTFS" then download the data for New York City Transit). 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:

Subway Route Symbols ®: Metropolitan Transportation Authority. Used with permission.

theweekendest's People

Contributors

blahblahblah- avatar dependabot[bot] avatar tf9047 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  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

theweekendest's Issues

7 train countdown times

Today I noticed that the countdown times for the 7 train weren't working normally. They were showing things like 1 min, 1min or DueDueDue, 1 min. Screenshot at 19:41 today 2021-03-11:

Screenshot_20210311-194113

Broadway via Bridge/Tunnel renders incorrectly?

image
image
image

As shown here, uptown N trains are listed as running via the Montague St Tunnel, the bridge platforms at Canal St are shown receiving bidirectional service, the Broadway local platforms at Canal St are hown receiving uptown-only service, and no service is shown at the stations between Court St (Brooklyn) and City Hall.

When I checked the MTA website and subsequently refreshed theweekendest.com, I didn't find any such service change, so I suspect this issue was caused by a single Queens-bound N train being rerouted via the tunnel. Once that train passes City Hall, there would be no subsequent N service expected to run via tunnel and so no service would be (correctly) shown. If subsequent Queens-bound N trains were routed via the bridge, it would be correct to show bidirectional service at the bridge platforms. I don't have logs of subwaytime to investigate this issue to validate or falsify my hypothesis.

Startup gives only black screen

When I open this on my phone (Moto G6, Android 9), I briefly see the startup screen. It then goes completely black after a few seconds.

I have been using this site for 1-2 years and have not encountered this before.

Add tooltips to train bullets or station symbols?

Would it be possible to add some additional information when hovering over the train bullets or stop indicators if there are service changes? Without leaving the page and looking for the legend, it isn't always clear what a half-filled circle means.

See screenshots:

Screen Shot 2022-05-17 at 10 50 31 AM
Screen Shot 2022-05-17 at 10 54 07 AM

You could even take this to the next level and add a popover or overlay when you hover over the bullets to give more information or format the information more cleanly. This popover could give upcoming transfer information at that stop, etc.

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.