Authors

Inspiration

People are forced to stay at home, not to travel and avoid social contact - because of the new Corona Virus. All kind of traffic comes to a rest. The upside of this - the environment says thank you and people don't infect each other on public transport. Furthermore we find motivation to go walking outside or do some indoor sports just to get some distraction and an improved work-life balance. But what will happen as soon as an end of the Crisis is in sight, when public transport is available again and we actually have to go back to the office?

At some point people will wonder if it is save again to use public transport without risking an infection with the novel Corona Virus. Or they will wonder how to improve their ecological footprint. Some will maybe complain about large travel times that keeps them from doing sports and staying healthy.

What it does

Our idea is to create an application that allows everybody to find the best route to their destination with respect to three factors:

  • Time efficiency
  • Least Social Contact (= Lowest infection risk)
  • Least CO2 emission (= most ecological)

Our application will help to find the route which meets the above criteria best. The user can provide a time window in which he/she would like to arrive and the application will tell the optimal departure time and travel route. The calculations are based on historical and realtime public transport data, the google maps APIs for route finding and a machine learning algorithm that estimates the percentage of occupied places on all transit modes at each intermediate step. It will then present several options to the User:

  • Fastest route
  • Route with the least infection risk
  • Most ecological route

Sometimes, the preferred option can involve some waiting time or instead suggesting to leave a lot earlier than originally planned. In any case, there is some unexpected spare time during the day for which the app suggests an efficient use, e.g.:

  • alternative transport modes such as bike, walking, closest e-bike renting station, available car-sharing services
  • alternative activity during waiting time, such as short work-out exercises to do at home, interesting newspaper aticles,...etc

Of course, the user can modify his/her priorities if not all criteria can be met at once.

This mechanism brings several more advantages with it which are not all connected to Corona, such as

  • Enabling an earlier transition from private transport back to public transport
  • Redistributing passengers from peak hours to a larger time window, relieving public transport during rush hour.
  • Raising awareness for ecological efficiency
  • Deceleration while being at the same time time efficient

How We built it

We split our code prototyp into two parts.

  • The first part uses google maps API to get possible routes and handles input and output
  • The second part uses VBZ data to predict the occupancy of a vehicle at a given time with machine learning

The first part uses googles direction API to get possible connections from points A to B in a time frame. Because the ZVV data only covers bus and tram passenger data we ignore all routes with other vehicles. In every connection we find all tram/bus steps. Each step consists of a bus/tram stops, line and timestamps of the stops. We give these steps to our second part which gives us a prediction of occupied seats for every bus/tram stop in our step. We take the mean of the seat occupancy for every step and calculate the mean ratio of ccupied seats over each route.Then we output the route with the least  seat occupancy ratio which has also the least infection probability.

For the second part we used a dataset from VBZ which counts people entering and leaving a certain vehicle, at a certain time and place. After cleaning it up, which took most of the time, we trained a linear regressor on the features, which are all treated as categories. The features were: bus/tram line, day, time, stop and direction.

Challenges we ran into

  • The dataset from VBZ was impossible to work with, and the documentation incomprehensible. But after hours of plotting and cleaning it is very valuable
  • The transit patterns might have changed not just proportionally
  • The Goolge Direction API is very restrictive, we needed to find a hack using the VBZ data in order to get all the stations between to stops
  • Communication over Slack, Discord, Zoom, Whatsapp was challenging and prone to failure
  • Splitting the coding tasks into separate pieces and defining a clean interface

Accomplishments that we're proud of

  • Succesfully implementing a working prototyp
  • fitting together portions of code written by different team members

What We learned

  • How to use the Google Maps API to implement new applications
  • How to derive different machine learning algorithms and decide on the best methods for specific problems
  • How to divide a larger project into multiple subtasks and efficiently distribute the work among all the participants
  • How to build up a project from a simple idea
  • How to present  and explain our ideas to the public

What's next for "HealthyWays - the future of public mobility"

  • get better historical and real time data of public transport usage of whole switzerland
  • integrate the algorithm into an existing navigation app
  • integrate additional services such as, office management, e-bike renting, car-sharing,...

Try It out

Hackathons

Technologies

google-maps-apis, python

Devpost Software Identifier

258341