Skip to content

A web app displaying time, weather, and subway arrivals

Notifications You must be signed in to change notification settings

rmehyde/sunrise

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sunrise

Sunrise is a web app that displays real-time MTA train times and the weather

Screenshot

Status

The app only currently pulls the ACE subway time feed from the MTA. Weather location is a hard-coded configuration. If you're interested in using the app for a local project, any tweaks you need should be easy. But the project is a ways off from being friendly to users not looking to run in a one-off local environment.

Config & Keys

You will need to supply API Keys for the DarkSky Weather API and MTA Subway Real-Time Feed. Simply copy and rename the config_template.py file to config.py, and fill in the appropriate values.

Running

To run:

export FLASK_APP=sunrise.py
flask run

Using the App

The page offers the following configuration options as query parameters:

  • stopId: the subway stop to show information for, listed in app/assets/stops.txt
  • renderInterval: how often in seconds the page refreshes locally, updating the current time and recomputing subway arrivals from the new time basis
  • updateInterval: how often in seconds the page polls the API to update the subway arrival timestamps and weather information
  • timeRound: time in seconds to round all times to
  • timeOffset: time in seconds to offset all times (e.g. make everything slightly ahead)

For example:

http://127.0.0.1:5000/sunrise/app?stopId=A44N&updateInterval=15&renderInterval=5&timeRound=30&timeOffset=10

About

A web app displaying time, weather, and subway arrivals

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published