Primary competition visual

Traffic Jam: Predicting People's Movement into Nairobi

Helping Kenya
$12 000 USD
Completed (almost 8 years ago)
Prediction
1518 joined
203 active
Starti
06 Sep 18
Closei
13 Jan 19
Reveali
14 Jan 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
User avatar
Upvotes 0
User avatar

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

Upvotes 0
User avatar

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

Upvotes 0
User avatar

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

Upvotes 0
User avatar

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?

Upvotes 0
User avatar

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

Upvotes 0
User avatar
Upvotes 0