Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Endpoint for routes #24

Open
jaronheard opened this issue May 30, 2018 · 6 comments
Open

Endpoint for routes #24

jaronheard opened this issue May 30, 2018 · 6 comments
Labels
blocked help wanted Extra attention is needed

Comments

@jaronheard
Copy link
Contributor

It should return an array with
route:
description:
to enable a dropdown like this one
image
https://trimet.org/#tracker/line/100+0

@bhgrant8
Copy link
Member

bhgrant8 commented Jun 1, 2018

@znmeb @code-farmhouse do you know if this info exists in the database somewhere currently? If not the info appears to be in the GTFS schedules and info download in a txt/csv:

https://developer.trimet.org/schedule/gtfs.zip

@bhgrant8 bhgrant8 added help wanted Extra attention is needed blocked labels Jun 1, 2018
@bhgrant8
Copy link
Member

bhgrant8 commented Jun 9, 2018

I believe this is getting pulled into our next db update, @znmeb is this correct?

@znmeb
Copy link
Contributor

znmeb commented Jun 10, 2018

The current state of things is

SELECT * FROM trimet_gis.tm_route_stops

That will correspond to the congestion data.

For the ridership data there is an equivalent table in the GTFS archives, or one can be made from that with a little work. I don't think the MAX or Streetcar line numbers have changed, so you can probably just assume that anything that isn't currently MAX or Streetcar is a bus.

P.S.: The MAX lines are easy to spot from the stop names - the one that has a segment from Hillsboro to Beaverton Transit Center is MAX Blue Line, etc. Same for the streetcar - nothing else stops at quite a few of the stops.

@bhgrant8
Copy link
Member

I just might hardcode this in as a static json or python dict from the gtfs. we can change later if needed

@alankessler
Copy link

@znmeb
Copy link
Contributor

znmeb commented Aug 22, 2018

It's in the database, but

a) it's static - it describes the routes as of when I inserted the shapefile into the database.
b) the shapefiles and their contents are not licensed for re-distribution via an API.

So ... if we want to expose current route information we need to get it from GTFS. I have links to GTFS-to-PostGIS repositories - I'm considering making a Docker image thereof. It's four bash scripts and should work with the PostGIS image in the data-science-pet-containers, although there's a lot in that image that isn't needed.

If I can get @code-farmhouse code for processing the historical GTFS data I can probably add that to the image. I have the code @jbeyer16 wrote for downloading the historical GTFS data.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

4 participants