Google Summer of Code 2024:- DetourDetective

31 views
Skip to first unread message

Andrew Cunningham

unread,
May 22, 2024, 7:27:30 AM5/22/24
to thetran...@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



Wojciech Kulesza

unread,
May 22, 2024, 8:17:39 AM5/22/24
to Andrew Cunningham, thetran...@googlegroups.com
Hi Andrew
Great to meet you. 
As a matter of fact, goEuropa, my company,
Was first founded in Regional Development Centre by DkIT!!
Which branch / github of Transitclock you’re based on when working on DetourDetective? I’m asking as we have forked the code some time ago and added a lot of new features and cleaned the code. Currently we’re working on a spring boot version too.

Regards
Wojciech Kulesza


Wojciech Kulesza

Właściciel / Owner

goEuropa Polska Wojciech Kulesza

+48616248682
wojciech...@goeuropa.eu
www.goeuropa.eu
ul. 28 Czerwca 1956r nr 400
Kiedy przyjedzie autobus? Sprawdż na www.kiedybus.pl


--
www.thetransitclock.org
---
You received this message because you are subscribed to the Google Groups "TheTransitClock" group.
To unsubscribe from this group and stop receiving emails from it, send an email to thetransitclo...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/thetransitclock/CAO49OLve2huLwtCi9OOyC2gF8EixQAprWorFje7Rjgkz4dapfQ%40mail.gmail.com.

Óg Crudden

unread,
May 22, 2024, 10:18:09 AM5/22/24
to Wojciech Kulesza, Andrew Cunningham, thetran...@googlegroups.com
Hi Wojciech,
We will be using the TheTransitClock repository code base. If you wish to submit a pull request with your company's changes we can review.
Thanks,
Sean.


Wojciech Kulesza

unread,
May 22, 2024, 11:28:16 AM5/22/24
to Óg Crudden, Andrew Cunningham, thetran...@googlegroups.com
Hi
Thanks for info. When is the start date? Your code base has last changes over a year ago…


Wojciech Kulesza

Właściciel / Owner

goEuropa Polska Wojciech Kulesza

+48616248682
wojciech...@goeuropa.eu
www.goeuropa.eu
ul. 28 Czerwca 1956r nr 400
Kiedy przyjedzie autobus? Sprawdż na www.kiedybus.pl

Óg Crudden

unread,
May 22, 2024, 11:53:20 AM5/22/24
to Wojciech Kulesza, Andrew Cunningham, thetran...@googlegroups.com
Hi Wojciech,

This process has already started. The official start of coding is May 27th.

If you wish to discuss possible pull requests from your company I would suggest a separate thread or make contact directly. It would be interesting to know what new functionality goEuropa would like to contribute.

Thanks,

Sean.

Andrew Cunningham

unread,
May 29, 2024, 7:41:08 AM5/29/24
to thetran...@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


Andrew Cunningham

unread,
Jun 6, 2024, 9:16:04 AM6/6/24
to thetran...@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:17:26 AM6/13/24
to thetran...@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:27:54 AM6/22/24
to thetran...@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