-
Notifications
You must be signed in to change notification settings - Fork 14
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
Scrape schedule versions #35
Scrape schedule versions #35
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry to always nitpick comments but they are super helpful to me!
f" The duplicate schedule versions are" | ||
f" {set(duplicates)}. Check whether these were in-effect." | ||
) | ||
# Keep the first occurrence of duplicates. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just checking here - "first" means "the one that appears first in the order of display on the Transitfeeds site, which was actually scraped later"? (That would be the correct implementation IMO, just wasn't sure whether "first" means chronologically or in display order which is reverse chronological)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes "first" here means the first in the order of display on Transitfeeds.
date_list
appears as
[...'14 September 2021', '7 September 2021', '1 September 2021',
'1 September 2021', '1 September 2021', '1 September 2021',
'1 September 2021', '2 August 2021', '15 June 2021',..]
So taking the first will take the latest version. I've added a note on that in the comments.
Description
A first attempt at scraping the schedule versions from transitfeeds.com. See #30 and #36
Type of change
How has this been tested?
Locally. Calling the function
create_schedule_list(5, 2022)
will re-create the original list ofschedule_feeds
, in addition to the schedule versions and their date ranges up to the current version.