Let me give you a background, so i\'m working on a timetable app for bus. I have my data in this form (I\'ve simplified the data for the purpose of the question)