I have location data of taxis moving around the city sourced from: Microsoft Research
Overall it has around 17million data points.
I have converted the data to JSON and filled up mongo. A sample looks like this:
{'lat': 39.84349, 'timestamp': '2008-02-08 17:38:10', 'lon': 116.33986, 'ID': 1131}
{'lat': 39.84441, 'timestamp': '2008-02-08 17:38:15', 'lon': 116.33995, 'ID': 1131}
{'lat': 39.8453, 'timestamp': '2008-02-08 17:38:20', 'lon': 116.34004, 'ID': 1131}
{'lat': 39.84615, 'timestamp': '2008-02-08 17:38:25', 'lon': 116.34012, 'ID': 1131}
{'lat': 39.84705, 'timestamp': '2008-02-08 17:38:30', 'lon': 116.34022, 'ID': 1131}
`{'lat': 39.84891, 'timestamp': '2008-02-08 17:38:40', 'lon': 116.34039, 'ID': 1131}
{'lat': 39.85083, 'timestamp': '2008-02-08 17:38:50', 'lon': 116.3406, 'ID': 1131}
It consists of a taxiID - ID field, timestamp of its latitude and longitude combination.
My question is: I want to use this data to calculate estimated time of arrival(ETA)
So far, I am doing it a crude way by querying mongoDB with aggregation. It is totally inefficient.
I am looking at some sort of learning algorithm where the historical data can be used to train it. In the end, given two points, the algorithm should traverse the possible route by referring historical data and give an estimate of time. Calculating time estimate is not a problem at all if I get the array of JSON documents between the points. But, getting those right arrays is.
Any pointers in this direction will be very helpful.