trynmaps / opentransit-map

Web-app for OpenTransit
http://opentransit.city
Apache License 2.0
13 stars 15 forks source link

map transit incidents #89

Open EddyIonescu opened 5 years ago

EddyIonescu commented 5 years ago

While many agencies internally record incidents (which can often cause bunching and gaps down the line for hours), the TTC (Toronto Transit Commission) makes then publicly available here: https://www.toronto.ca/city-government/data-research-maps/open-data/open-data-catalogue/#bb967f18-8d90-defc-2946-db3543648bd6

This ticket only tracks putting them on the map (use fake hardcoded data when implementing this)

API endpoint creation tracked here: https://github.com/trynmaps/tryn-api/issues/30

lukemccrae commented 5 years ago

I'm looking into this. Should the frontend expect the location data to be geocoded into LatLng points?

EddyIonescu commented 5 years ago

@lukemccrae no, you should expect it to be a {lat: Number, lon: Number} object, from which you can make the LatLng point yourself.

yubozhao commented 5 years ago

@lukemccrae This will be fields available for each incident

    lat: Float
    lon: Float
    route: String
    type: String
    time: Int   // unix timestamp (in seconds)
    gap: Int  // in seconds
    delay: Int  // in seconds
    agency: String

It will be part of trynState Query

trynState(....) {
  ...
  routes: {...}
  incidents: {}
}

Let me know what you guys think and we can go from there. @EddyIonescu