Primary competition visual

Sendy Logistics Challenge

Helping Kenya
$7 000 USD
Completed (almost 7 years ago)
Prediction
2202 joined
448 active
Starti
23 Aug 19
Closei
25 Nov 19
Reveali
26 Nov 19
if you don't know how to get data from api (try this script)
Notebooks ยท 6 Nov 2019, 22:09 ยท 42

import openrouteservice

from openrouteservice.directions import directions

client = openrouteservice.Client(key='xxxxxxxx') # Specify your personal API key

rootTrain=[]

rootTest=[]

train=train[['Order No', 'Pickup Long','Pickup Lat','Destination Long','Destination Lat']]

test=test[['Order No', 'Pickup Long','Pickup Lat','Destination Long','Destination Lat']]

for i in train.index:

coords=((train.at[i,'Pickup Long'],train.at[i,'Pickup Lat']),(train.at[i,'Destination Long'],train.at[i,'Destination Lat']))

rootTrain.append(directions(client, coords))

train['root']=rootTrain

for i in test.index:

coords=((test.at[i,'Pickup Long'],test.at[i,'Pickup Lat']),(test.at[i,'Destination Long'],test.at[i,'Destination Lat']))

#test.at[i,'route']=directions(client, coords)

rootTest.append(directions(client, coords))

test['root']=rootTest

Discussion 42 answers
User avatar

You should only loop over unique Pickup/Destinatoin Lat/Long combinations, it'll save you thousands of API requests. No need to get directions multiple times for the same route in this case.

Upvotes 0
User avatar

Thank you belaziz how do you create the personal API key?

Upvotes 0
User avatar
Upvotes 0
User avatar

https://openrouteservice.org/dev/#/home For newbies like me follow this link, create an account after that request for a token. It is generated immediately.

Upvotes 0
User avatar

I GET ApiError: 500

import openrouteservice from openrouteservice.directions import directions coords = ((-1.3177546999999998,36.8303703),(-1.3004062, 36.829741)) client = openrouteservice.Client(key='my_key goes here') # Specify your personal API key routes =directions(client, coords)

Upvotes 0
User avatar

I GET ApiError: 500

import openrouteservice

from openrouteservice.directions import directions

coords = ((-1.3177546999999998,36.8303703),(-1.3004062, 36.829741))

client = openrouteservice.Client(key='my_key goes here') # Specify your personal API key

routes =directions(client, coords)

Upvotes 0
User avatar

you can only make 2000 requests per day, so you need to rerun your script, every 24 hours, until you collect all of the data you need or maybe you may try another key from another account. Moreover, I think that with another account, not the free one, you can get what you want.

Upvotes 0
User avatar

I got the solution. The longitude needs to come before the latitude.

Upvotes 0
User avatar

of course

line9:coords=((train.at[i,'Pickup Long'],train.at[i,'Pickup Lat']),(train.at[i,'Destination Long'],train.at[i,'Destination Lat']))

Upvotes 0
User avatar

has anyone downloaded the data already? Only asking in case it is something you do not mind sharing to save people requesting tokens every day to download the same data?

Upvotes 0
User avatar

its ketuld@gmail.com. Thanks in advance!

Upvotes 0
User avatar

christopherajulo@gmail.com. Thank you.

Upvotes 0
User avatar

Hello Belaziz, I'm struggling with the errors to retrieve this data, could I have this data please, my mail is: mamadoutive4@gmail.com

Upvotes 0
User avatar
Upvotes 0
User avatar

sibrahim1396@gmail.com kindly send me the data too

Upvotes 0
User avatar

mmakky1@gmail.com

thanks in advance

Upvotes 0
User avatar
flamethrower

Please can you send to my email too

damolaoriola@gmail.com

Thanks so much in advance

Upvotes 0
User avatar

Pls can you forwarforward the datdata to me

nanabaffourowusu@gmail.com

Upvotes 0
User avatar

Dear belaziz, could you share the data file here with a link to some file sharing service so anybody in the competition could use it easily? Thanks!

Upvotes 0
User avatar
Upvotes 0
User avatar

Hi @belaziz. Would you please share the data with me as well? sburger29@gmail.com. Thank in advance!

Upvotes 0
User avatar

Please do send me the data too, justenyirimana@gmail.com

Upvotes 0
User avatar

can you please send the data to abhishekpatil0853@gmail.com?

Upvotes 0
User avatar

Pls I am interested in the data

nanabaffourowusu@gmail

Upvotes 0
User avatar

ayoub.chebbi3@gmail.com

thxxxxxxxxx

Upvotes 0
User avatar

Hi! I'm also interested in the data (cacos1988@gmail.com). :)

Upvotes 0
User avatar

Hi Belaziz! Thanks for sharing. Do you mind to send me the data at igbongba@gmail.com? Appreciate it

Upvotes 0
User avatar

Hi Belaziz, thanks for sharing, mosesbomera@yahoo.com thanks.

Upvotes 0
User avatar

Hi Belaziz!, I greatly appreciate if you could share the dataset with me... my email id is anirudh7873@gmail.com. Thanks!

Upvotes 0
User avatar

Thx for sharing. Can you a copy at papaass07@gmail.com

Upvotes 0
User avatar

Hello @belaziz Kindly email me the dataset, rose.wambui780@gmail.com

Or anyone who has been emailed the dataset can cc:

Upvotes 0
User avatar

Hello Belaziz , can you email me the data ?

Thanks.

Upvotes 0
User avatar

could anybody possibly send me the file as well?

kand3572@uni.sydney.edu.au

much appreciated!

Upvotes 0
User avatar

Hi Everyone!

Could anybody send me the data file?

archimedeameck@gmail.com

Thanks by anticipation!

Upvotes 0
User avatar

Hi All! Could anybody send me the data file?

namestnikov.nikita@gmail.com

Thank you in advance!

Upvotes 0
User avatar

Can anyone please send me the data in "" ibrahima.fall@aims-senegal.org "".

Thanks.

Upvotes 0