MohGovIL / hamagen-react-native

Israel's Ministry of Health's COVID-19 Exposure Prevention App
https://health.gov.il/
MIT License
509 stars 153 forks source link

Looking for ideas: Identify public transportation movement #218

Open kaplanlior opened 4 years ago

kaplanlior commented 4 years ago

We're looking for ways to identify usage of public transportation from the recorded locations (e.g. compared to walking or driving).

A relevant reference would be https://www.researchgate.net/publication/305728530_Identifying_Transportation_Modes_from_Raw_GPS_Data

This might help for both alerting other people who used the same bus/train and to exclude alerting others who might not be relevant around the same locations (e.g. pedestrians or car passengers).

Aric5301 commented 4 years ago

I don't understand too much about the technological aspect of how it works, but I know that Google Timeline is usually very accurate for me in determining what mode of transport I'm using.

An article I found about it: https://www.citymetric.com/horizons/google-knows-you-took-bus-creepy-accuracy-google-maps-timeline-4467

etis commented 4 years ago

Maybe by mapping and identifying the WiFi networks on busses/train? Or based on Rav Kav data? Assuming Rav Kav has or can expose an API, either gain access to the Rav Kav app or have users manually enter their Rav Kav number or take a picture of their card will provide the time the user boarded a specific bus/entered the train station. Crossing the time from Rav Kav, the bus/train route from and the GPS data could provide public transport usage.

kaplanlior commented 4 years ago

Thanks @etis for participating.

Wifi - what would be different about WIFI if I'm near the bus (e.g. a pedestrian). My guess is also that WiFi on buses isn't reliable source, and doesn't exist on most buses (Dan in Tel Aviv for example). Also, don't forget one buses can service a few lines during the day, so WiFi doesn't hint which line we're talking about.

I think RavKav option might be interesting. You idea will require to break user's privacy in a few ways. On the other hand, we can think of a way to deliver such notifications for users based on their RavKav ID (keeping their identification private).

etis commented 4 years ago

Yes, I guess you're right and relaying on WiFi can't be accurate. Even if urban busses had WiFi and some minimum time near a network is defined to avoid pedestrians, there's no end to it with traffic jams etc.

Back to focusing on Rav Kav, as long as it's voluntary, processed locally and explained well to the user I don't see a major privacy concern? Assuming you only get rides data without any personal details and cross it with user's location and MOH exposures locally. The biggest challenge is probably to get users to adopt it and actually provide the Rav Kav details. Which raises a different question. What if we could get in contact with Moovit and offer them to use Hamagen method and technology inside Moovit, and use it to alert people?

LiorGingi commented 4 years ago

What about trying to understand if the individual is in motorized movement (the same as Waze's "I'm not the driver") combined with trying to figure out how many people surrounding the individual via Bluetooth? For example, If the individual is currently moving in a speed greater than 40 KM/h and there are more than 4 people surrounding the individual, this might be an indication for movement in public transportation.

etis commented 4 years ago

@LiorGingi This raises the same issue as in basing it on WiFi networks, while driving in traffic it's likely there are a dozen or more BT devices in range from other cars, busses or pedestrians.

chaimPaneth commented 4 years ago

We can probably use react-native-sensors https://react-native-sensors.github.io/docs/Usage.html and detect if the user is above a certain speed and assume they're in a vehicle and fire a local notification asking them "Are you on public transportation? This will help us determine your safety and the passengers around you... etc" and of course have a "Don't ask again" checkmark so to not frustrate users with their own means of transportation. We can also check if in the city area where the speed went above walking and running average that if there is a full-stop to the speed parameter every half a minute or so and then the speed goes back up to driving speeds - we can assume that the stops were bus stops and the user is on public transportation (assuming that a drive full of stops is a bus ride - to not confuse with traffic stops we should check if the speed was at driving speeds for more then 10 seconds each interval and the stop no more then 10 seconds or something like this). For trains we can probably check the geolocation of the route of the tracks that will require us mapping the geolocations (or Geofencing) of the train tracks or train stations and check if the user was in the range of those locations and his speed was driving speed telling us that he was on the train.