-
Notifications
You must be signed in to change notification settings - Fork 3
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
Add more bus routes to tracking #86
Comments
Is there a particular process you followed to add those bus routes? it looks to me like that constants file is just a mapping of bus route numbers to stop numbers. Is this something that has to be manually figured out by physical visit? |
Nope, if you reference other PRs that's all you need. Gobble is the first step to adding it to the dashboard. There is more complex work that requires AWS access before it goes live in the dashboard, but we can't do that until ~1 month after gobble changes merged |
so for example to add line 100 i would go to https://www.mbta.com/schedules/100/line and make a dictionary of all the stop IDs on that line? I was going to use line 7 as an example but it seems like the stops have changed since your PR - the website shows 18 stops and the dict has less than that. Is this something that should be kept up to date/in sync with what the MBTA website says? |
if that method is in fact how these constants are added (and if they should be kept up to date) it seems as though these constants aren't really constant. In which case I have found a way to fetch this data using MBTAs own API (the same api that webpage uses).
{
"ids": [
"16535",
"6564",
"888",
"889",
"244",
"246",
"208",
"885",
"33"
]
} |
update: i have found a way to just grab all the route patterns for a given bus line (not just the one that you happen to know the identifier of - and even ones not shown on the site) and the stop ids for that pattern (as well as the rest of the data but for this simple script i'm just ignoring that data) output sample from this improved script as run on bus line 101: 101-patterns.json |
existing_route_constants.json Here is the JSON data from all the routes that have been checked off (existing) and not yet checked off (new) in this PR (except line 195 which i noticed has no routes). Both files should be in the same data format as the constants.py file in this PR. Once I have a better understanding of whether it would be helpful, I'd be happy to integrate the code that generated these into the main gobble script so it can automatically grab all the stops (or just the stops on the typical route) for all the bus lines on startup to ensure that the data feeding the rest of the TransitMatters dashboards is as complete as possible |
YEAR OF THE BUS, let's add a bunch more of the bus routes that don't share a schedule with any other bus routes
The text was updated successfully, but these errors were encountered: