Google Summer of Code 2024:- DetourDetective

58 views
Skip to first unread message

Andrew Cunningham

unread,
May 29, 2024, 11:41:16 AMMay 29
to onebusaway...@googlegroups.com

Hi all,

I have just finished my second year exams in Dundalk Institute of Technology. I will now begin work on my Google Summer of Code 2024 project, the DetourDetective.

This week I was in contact with William Wong from MTA about getting GTFS, GTFS realtime and corresponding detour data. This went very well and we expect to receive the data from Will by the end of this week. 

We would like to thank the MTA for supporting us by providing data for this project.

I had two initial  meetings with my mentor (Sean Óg Crudden)  this week. 

Next week we intend to review this data from MTA and import it into a database. 

We would like to thank the MTA for supporting us by providing data for  this project.

I will be reporting progress every wednesday on the TrainsitClock and OneBusAway developers mailing list.

My mentor and I have scheduled a weekly meeting.

Thanks,

Andrew


Andrew Cunningham

unread,
May 29, 2024, 11:41:19 AMMay 29
to onebusaway...@googlegroups.com

Hi all,


This week I created a Ubuntu virtual machine to allow me to collect GTFS-realtime data and store it in a database. I set up a database through amazon and downloaded Sqlelectron to allow me to access and edit the database. I used gtfsrdb (https://github.com/ember-technology-ltd/gtfsrdb) to allow me to store GTFS-realtime data in the database. The data I collected was trip updates, alerts and vehicle positions from MBTA. I wrote some sql commands to get familiar with sql and the data.


Will Wong has been in contact with me this week and there is a short delay with the data from MTA in New York. We will hopefully receive this data early next week. 


Next week, we will 

  • Create a DetourDetective project stub within the TransitClock repository.

  • Import the data received from Will Wong into our online database.

  • Set up an instance of the TransitClock. 


I had a meeting with my mentor on Wednesday as is scheduled every week.


Thanks,

Andrew


Aaron Brethorst

unread,
May 29, 2024, 11:43:36 AMMay 29
to onebusaway...@googlegroups.com
Welcome, Andrew!

----

Aaron Brethorst
Executive Director, Open Transit Software Foundation

--
You received this message because you are subscribed to the Google Groups "onebusaway-developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to onebusaway-devel...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/onebusaway-developers/CAO49OLv1tOBhSt2cw%2BcHJDQ7z4SbGeJk%3D5E2K3fzhUAfdFaRVg%40mail.gmail.com.

Andrew Cunningham

unread,
Jun 6, 2024, 9:17:17 AMJun 6
to onebusaway...@googlegroups.com, Óg Crudden

Hi All,


This week I received the GTFS and real-time data from Will Wong at the MTA in New York. Thank you for all the data and help so far with this project. I also received information in relation to a detour that was in place.


I used GTFSdb to import the GTFS into the database. I used pgAdmin4 to allow me to import the real-time data received into my database. I ran some sql commands then exported the data to an excel file. I then imported it into google maps to show me all the points where the bus stops are in New York. Below is an image of the map. The red represents the stops, green presents all the GPS points reported by a single bus.


Next week, I will identify a detour and export the information into a file. This will allow me to begin creating some initial test cases for the DetourDetective algorithm.


Thanks,

Andrew


Andrew Cunningham

unread,
Jun 13, 2024, 7:20:09 AMJun 13
to onebusaway...@googlegroups.com, Óg Crudden

Hi all,


This week, I identified a trip with a detour. I did this by reporting the shape of the route from the database and plotting it onto a map. The sql command i used to get the route shape was 


SELECT trip_id, shape_pt_lat, shape_pt_lon 

FROM public.trips left join shapes on trips.shape_id = shapes.shape_id where  trips.trip_id like 'JG_A4-Weekday-SDon-081000_B43_463' order by shape_pt_sequence;


After this, I checked a number of different trips on this route and identified the detour. Below is an image of the detour being plotted.The green points are the shape of the route. The yellow points are the bus that had no detour and the blue points are the bus that was detoured. I will now use this data to create our first test cases. 





I inserted some of the real-time data I got from William  Wong at the MTA in New York into the vehicle_position table. Before doing this I truncated the vehicle_position as I had recorded real-time vehicle positions in this table during the start of the project. The sql command I used to do insert data into the vehicle_positions table was 


INSERT INTO public.vehicle_positions(trip_id, route_id, trip_start_date, vehicle_id, vehicle_label, vehicle_license_plate,  position_latitude, position_longitude, position_speed, "timestamp")

select TRIM(LEADING 'MTA NYCT_' from inferred_trip_id), TRIM(LEADING 'MTA NYCT_' from inferred_route_id), service_date, vehicle_id, vehicle_id, vehicle_id, latitude, longitude, speed, time_reported

from public."MTArealtimedata";


Next week, I plan on:

  • Conduct research on existing algorithms, and approaches used for detecting route deviations. 

  • Start a new project and develop java code that will read in the detour data.


Thanks,

Andrew


Andrew Cunningham

unread,
Jun 22, 2024, 10:28:51 AM (13 days ago) Jun 22
to onebusaway...@googlegroups.com, Óg Crudden

Hi all,


This week I set up a DetourDetective project stub within the TransitClock repository. We  then read in vehicle positions, trips and shapes. This is in preparation to create our first algorithm to detect a detour and related test cases. We have requested an additional detour example from William Wong at MTA.



TheTransitClock/DetourDetective: Detect detours on transit systems (github.com)


Next week, we plan on:

  • Implement our first basic algorithm to detect detours. With related test cases.

  • Import new detour sample into database to support test cases.

  • Conduct research on existing algorithms, and approaches used for detecting route deviations. 



    Thanks,

    Andrew


    Reply all
    Reply to author
    Forward
    0 new messages