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

We don't always see the planned route - why? #544

Open
NoamGaash opened this issue Mar 2, 2024 · 8 comments
Open

We don't always see the planned route - why? #544

NoamGaash opened this issue Mar 2, 2024 · 8 comments
Labels
backend backend developers issue bug Something isn't working bus-expert-needed for issues that require deep understanding of the data data research figure out problems with the data, and develop new ideas question Further information is requested

Comments

@NoamGaash
Copy link
Member

When going to the map-by-line page (מפה לפי קו), we don't always see both planned and actual route.

Why?
Any help with investigating it will be appreciated

@NoamGaash NoamGaash added the question Further information is requested label Mar 2, 2024
@itsoriki
Copy link
Collaborator

itsoriki commented May 5, 2024

@NoamGaash Can you give a case where this is happening? I can't reproduce the issue...

@NoamGaash
Copy link
Member Author

sure
05/05/2024
דן
9
מסוף הטייסים-תל אביב יפו ⟵ קריית חינוך-תל אביב יפו
5:25:00 AM

@itsoriki itsoriki changed the title We don't always see the planned rout - why? We don't always see the planned route - why? May 8, 2024
@itsoriki itsoriki self-assigned this May 8, 2024
@itsoriki
Copy link
Collaborator

itsoriki commented May 8, 2024

@NoamGaash The planned route only shows if the data from the API exists - as it appears here (in the example case you gave), the API returns an empty array so there is nothing to show.
I've looked in the gtfsService's relevant method - getStopsForRouteAsync and found a simple logic that returns an empty array if no rides are found for the given routeId & timestamp (see picture)
image
Now there are 2 options here:

  1. The example you gave has planned route data in the backend but somehow it doesn't get to the client - I will need your help in finding the code of this part in the backend (Mainly because I am not so familiar with the architecture of the backend services of the system - of course, I would love to learn!)
  2. The example you gave doesn't have planned route data at all and there is no issue (🤔)

What do you think?

@NoamGaash
Copy link
Member Author

@itsoriki
I tried playing with the time range -
https://open-bus-stride-api.hasadna.org.il/gtfs_rides/list?limit=1&gtfs_route_id=4804646&start_time_from=2024-05-03T01%3A25%3A00.000Z&start_time_to=2024-05-05T03%3A25%3A00.000Z&order_by=start_time

[
{
"id": 74536249,
"gtfs_route_id": 4804646,
"journey_ref": "4191144_040524",
"start_time": "2024-05-05T02:00:00+00:00",
"end_time": "2024-05-05T02:43:28+00:00",
"gtfs_route__date": "2024-05-05",
"gtfs_route__line_ref": 2294,
"gtfs_route__operator_ref": 5,
"gtfs_route__route_short_name": "9",
"gtfs_route__route_long_name": "מסוף הטייסים-תל אביב יפו<->קריית חינוך-תל אביב יפו-20",
"gtfs_route__route_mkt": "17009",
"gtfs_route__route_direction": "2",
"gtfs_route__route_alternative": "0",
"gtfs_route__agency_name": "דן",
"gtfs_route__route_type": "3"
}
]

seems like there was a planned ride to 5:25 on the GTFS data, but not on the siri data.
a week ago we got an email:

מזה תקופה שאני חושד כי חברות תחבורה שמתקשות לבצע נסיעות מסוימות, מעדכנות בדיעבד את מערכות המידע כך שהנסיעה החסרה תופיע ככזו שלא תוכננה.

אני נמצא כעת בדיון מול חברת אפיקים אלקטרה בקשר לשני נסיעות ספציפיות.

מדובר בקו 350 מאשדוד לבני ברק בלילה שבין 27-28 ליולי 2023. בשעות 00:50, 01:00.
בדקתי אצלכם באתר ואכן הם מופיעות כנסיעות חסרות

קישור:
https://open-bus-map-search.hasadna.org.il/gaps?timestamp=1690468299000&operatorId=25&lineNumber=350&routeKey=%D7%A8%D7%9B%D7%91%D7%AA%2F%D7%9E%D7%A1%D7%95%D7%A3+%D7%91%D7%99%D7%92+-+%D7%A8%D7%A6%D7%99%D7%A4%D7%99%D7%9D-%D7%90%D7%A9%D7%93%D7%95%D7%93%3C-%3E%D7%9E%D7%92%D7%93%D7%9C+%D7%95%D7%99%D7%98%D7%94%2F%D7%93%D7%A8%D7%9A+%D7%91%D7%9F+%D7%92%D7%95%D7%A8%D7%99%D7%95%D7%9F-%D7%91%D7%A0%D7%99+%D7%91%D7%A8%D7%A7-1%23

לעומת זאת מצ"ב לו"ז שקיבלתי ממשרד התחבורה שם הנסיעה לא מופיעה כלל.

אשמח מאוד אם תוכלו לאתר את מקור אי ההתאמה, ולכל הפחות לכוון אותי למקור הנתונים שלכם.

I wonder whether it's related

@itsoriki
Copy link
Collaborator

itsoriki commented May 9, 2024

@NoamGaash
That's interesting!
How do you think we should progress? Should we leave this issue for now? Or maybe we should find more cases like this one to prove the point mentioned in the email?

@NoamGaash
Copy link
Member Author

I'm not sure. Investigation is a good first step

@itsoriki
Copy link
Collaborator

itsoriki commented May 9, 2024

@NoamGaash
I think I need some more guidance - what should I investigate here? Should I do specific queries to the API?

@NoamGaash
Copy link
Member Author

See this, it can be related
hasadna/open-bus-stride-etl#16
I would start with making a script to list all problematic rides, and find if I can see patterns

@itsoriki itsoriki removed their assignment May 13, 2024
@NoamGaash NoamGaash added bug Something isn't working backend backend developers issue data research figure out problems with the data, and develop new ideas bus-expert-needed for issues that require deep understanding of the data labels May 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend backend developers issue bug Something isn't working bus-expert-needed for issues that require deep understanding of the data data research figure out problems with the data, and develop new ideas question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants