Skip to content

nefrathenrici/theweekendest

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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:

About

Real-time New York City subway service map

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 92.1%
  • SCSS 4.2%
  • HTML 2.8%
  • Ruby 0.9%