Primary competition visual

Traffic Jam: Predicting People's Movement into Nairobi

Helping Kenya
$12 000 USD
Challenge completed almost 7 years ago
Prediction
1487 joined
203 active
Starti
Sep 06, 18
Closei
Jan 13, 19
Reveali
Jan 14, 19
Exploratory Data Analysis
Notebooks ยท 29 Oct 2018, 11:50 ยท 7

Hi all,

I did some EDA on the data as I considered some features I wanted to use to build a model. It's all very rough and I look forward to hearing your thoughts on what might be improved.

https://github.com/princelySid/zindi_traffic/blob/master/EDA.ipynb

Discussion 7 answers

It is impressive.

30 Oct 2018, 04:24
Upvotes 0

One question. Why didn't you use the to_datetime() function while extrating 'hour_booked'?

31 Oct 2018, 07:15
Upvotes 0

I didn't think to:D It shouldn't make a difference though, or does it?

I'm not sure myself but running indexing the hour part in the converted travel_time field should give you the hour.

Something like this:

df["travel_time"] = pd.to_datetime(df["travel_time"],infer_datetime_format=True)

df["hour_booked"] = df["travel_time"].dt.hour

1 Nov 2018, 04:27
Upvotes 0
User avatar
University of Lagos

this line of code

for x in bpf.index: b.loc[b['ride_id'].isin([x]), 'p_filled'] = bpf[x]

what are you actually calculating?

19 Dec 2018, 16:22
Upvotes 0

Wow, I should put more comments in my code. Took me too long to figure out what I was doing. :D

Here I was creating a variable called 'p_filled' that is the percentage the ride was filled to before it left. Hope that makes sense. Let me know if you have more questions

User avatar
University of Lagos

okay, thanks

19 Dec 2018, 18:20
Upvotes 0