-
Notifications
You must be signed in to change notification settings - Fork 22
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
Busiest day of the service is not exhaustive #71
Comments
Thanks for sharing your findings @praneethd7. I took a look at the linked GTFS file and it matches the results from partridge. % curl -L -o trimet.zip https://transitfeeds.com/p/trimet/43/20220201/download
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
100 18.1M 100 18.1M 0 0 16.6M 0 0:00:01 0:00:01 --:--:-- 31.9M
% unzip trimet.zip calendar.txt calendar_dates.txt
Archive: trimet.zip
inflating: calendar.txt
inflating: calendar_dates.txt
% cat calendar_dates.txt | grep 20220124
A.613,20220124,1
D.613,20220124,1
W.613,20220124,1
Q.613,20220124,1
% cat calendar.txt
service_id,monday,tuesday,wednesday,thursday,friday,saturday,sunday,start_date,end_date
B.613,0,0,0,0,0,0,0,20220123,20220205
B.614,0,0,0,0,0,0,0,20220206,20220514
C.613,0,0,0,0,0,0,0,20220123,20220205
C.614,0,0,0,0,0,0,0,20220206,20220514
A.613,0,0,0,0,0,0,0,20220123,20220205
A.614,0,0,0,0,0,0,0,20220206,20220514
F.613,0,0,0,0,0,0,0,20220123,20220205
F.614,0,0,0,0,0,0,0,20220206,20220514
E.613,0,0,0,0,0,0,0,20220123,20220205
E.614,0,0,0,0,0,0,0,20220206,20220514
D.613,0,0,0,0,0,0,0,20220123,20220205
D.614,0,0,0,0,0,0,0,20220206,20220514
W.613,0,0,0,0,0,0,0,20220123,20220205
W.614,0,0,0,0,0,0,0,20220206,20220514
Q.613,0,0,0,0,0,0,0,20220123,20220205
Q.614,0,0,0,0,0,0,0,20220206,20220514
U.613,0,0,0,0,0,0,0,20220123,20220205
U.614,0,0,0,0,0,0,0,20220206,20220514
S.613,0,0,0,0,0,0,0,20220123,20220205
S.614,0,0,0,0,0,0,0,20220206,20220514
Take a look at http://gtfs.transitq.com/TriMet_20220201_20220201/serviceids/A.613 and this gist showing that on 20220124 trips for the |
Thank you @invisiblefunnel for the quick response and gist. I had an incorrect notion that |
Partridge uses the number of trips to approximate busyness. The earliest date is returned if multiple dates have the same number of trips. partridge/partridge/readers.py Lines 57 to 60 in df3167e
partridge/partridge/readers.py Lines 117 to 128 in df3167e
partridge/partridge/readers.py Lines 222 to 229 in df3167e
|
That makes sense! Thank you so much @invisiblefunnel! |
'1.1.1'
'3.10.2'
'Windows 10'
Description
Describe what you were trying to get done.
partridge
library and observe the busiest day of service(especially for buses)Tell us what happened, what went wrong, and what you expected to happen.
service_id
s in the busiest day (output ofread_busiest_date
) was missing severalservice_id
that were actually in service on that particular day.read_busiest_date
to output all theservice_id
operational in that particular day but it only seems to include theservice_id
listed in thecalendar_dates.txt
. The GTFS documentation has the following description forcalendar_dates.txt
: "Exceptions for the services defined in the calendar.txt. If calendar.txt is omitted, then calendar_dates.txt is required and must contain all dates of service."calendar.txt
andcalendar_dates.txt
, I believe theread_busiest_date
is considering only exceptions in theservice_id
ignoring the regularservice_id
.service_id
s incalendar.txt
with0
for Mon- Sun. However, this might lead to incorrect results while usingread_busiest_date
as the function excludes these regularservice_id
s with0
s. An example of this can be seen below.What I Did
Example:
Output:
(datetime.date(2022, 1, 24), frozenset({'A.613', 'D.613', 'Q.613', 'W.613'}))
service_ids
are missing in the output : [B.613
,C.613
,F.613
,E.613
,U.613
,S.613
]service_ids
include both Light Rail & Busroute_type
. For exampleB.613
(Light Rail) consists of the route 'MAX Red Line' that operates Monday-Friday & Weekends. This is perhaps most busiest line as it connects the Portland Airport. AlsoU.613
(Bus) consists of 48 routes. All the routes in thisservice_id
can be seen [here].(http://gtfs.transitq.com/TriMet_20220201_20220201/serviceids/U.613)The text was updated successfully, but these errors were encountered: