Primary competition visual

Sendy Logistics Challenge

Helping Kenya
$7 000 USD
Challenge completed almost 6 years ago
Prediction
2171 joined
448 active
Starti
Aug 23, 19
Closei
Nov 25, 19
Reveali
Nov 26, 19
Using Uber movement data
Help · 4 Nov 2019, 14:34 · 9

In Uber Time, can anyone share how to obtain Sourceid and dstid from Longitude and Latitude?

Discussion 9 answers

Hello,

u can use Point and Polygon from shapely : from shapely.geometry import Point, Polygon

create your point and polygon :

p = Point(24.952242, 60.1696017) poly = Polygon( [(24.950899, 60.169158), (24.953492, 60.169158), (24.953510, 60.170104), (24.950958, 60.169990)])

after that you can check if your polygon contains your point :

poly.contains(p)

or if your point is in polygon :

p.within(poly)

4 Nov 2019, 14:47
Upvotes 0

Thanks Yos.This makes sense. I will try it.

There is a json file called sublocations in the uber data defining the boundaries of each 'district' in Nairobi. You have to use a geocoding library to map your points ( you have to do some searching inside the polygones ) to those districts.

The ID's obtained are sourceid for a pickup point, dstid for a destination point.

4 Nov 2019, 14:50
Upvotes 0

Thanks Blenz. I have downloaded the sublocations file. Will try now.

Has adding the Uber movement data improve the results for anyone?

6 Nov 2019, 13:25
Upvotes 0

same question here

Uber data did'nt give me much improvement

9 Nov 2019, 18:48
Upvotes 0

@seddik11, how many seconds improvement did you get on the leaderboard?