trynmaps / metrics-mvp

Prototype of public transit data visualization system
https://muni.opentransit.city
MIT License
30 stars 34 forks source link

Historic Route/Schedules: Download Transitfeed GTFS #643

Open EddyIonescu opened 4 years ago

EddyIonescu commented 4 years ago

Write a script that, given a date and agency, downloads the appropriate GTFS from TransitFeeds and uploads it to S3. It doesn't download anything from TransitFeeds if the GTFS is already in S3. This script would be deployed to run before save_routes does.

Is an extension of #642 but could be done concurrently

EddyIonescu commented 4 years ago

Once this and #642 are done modify save_routes to get the appropriate GTFS from S3 instead of downloading the latest directly from the agency by default (ie. when a date isn't provided, meaning it's the current date)

architec commented 4 years ago

hi I'm interested. Could you assign this issue to me?

EddyIonescu commented 4 years ago

Hey @arctdav have you joined our Slack channel and Github organization? If so then you can assign it to yourself. Note that it'd have to be written in Python (and for this PR you could test it on your personal S3 until the PR's approved). Note that a naming convention like the one in #638 should be used.

architec commented 4 years ago

@EddyIonescu joined Slack channel

architec commented 4 years ago

@EddyIonescu two questions

  1. what directory should the GTFS store after download?
  2. what file name should the script be?
  3. are there any existing helper function for API calls from TransitFeed for this project?
architec commented 4 years ago

Seems to me that transitfeeds.com/api/swagger/#!/default/getLatestFeedVersion isn't working. For example if I pass feed ID "aachener-verkehrsverbund/836" with my key, it says "no response from server". However I assume we use the URL this API responded to download file?

architec commented 4 years ago

@EddyIonescu @Brian-Lee

Brian-Lee commented 4 years ago

@arctdav @EddyIonescu I think I know the problem. When using the "Try it out" button at https://transitfeeds.com/api/swagger/#!/default/getLatestFeedVersion, the result is "no content." This appears to be a bug. However, if you copy the link generated there in the "Request URL" field, you can successfully use that link by pasting it into a browser. It will go ahead and start a download of a gtfs zip file.

architec commented 4 years ago

@EddyIonescu PR created, waiting for review