Uber: Optimize driver scheduling via peak detection and supply-demand correlation. Python, Pandas, NumPy, Matplotlib
Assignment
Using the provided dataset, answer the following questions:
- Which date had the most completed trips during the two week period?
- What was the highest number of completed trips within a 24 hour period?
- Which hour of the day had the most requests during the two week period?
- What percentages of all zeroes during the two week period occurred on weekend (Friday at 5 pm to Sunday at 3 am)?
Tip: The local time value is the start of the hour (e.g.
15 is the hour from 3:00pm - 4:00pm)
- What is the weighted average ratio of completed trips per driver during the two week period?
Tip: "Weighted average" means your answer should account for the total trip volume in each hour to determine the most accurate number in whole period.
- In drafting a driver schedule in terms of 8 hours shifts, when are the busiest 8 consecutive hours over the two week period in terms of unique requests? A new shift starts in every 8 hours. Assume that a driver will work same shift each day.
- True or False: Driver supply always increases when demand increases during the two week period.
Tip: Visualize the data to confirm your answer if needed.
- In which 72 hour period is the ratio of Zeroes to Eyeballs the highest?
- If you could add 5 drivers to any single hour of every day during the two week period, which hour should you add them to?
Hint: Consider both rider eyeballs and driver supply when choosing
- True or False: There is exactly two weeks of data in this analysis
- Looking at the data from all two weeks, which time might make the most sense to consider a true "end day" instead of midnight? (i.e when are supply and demand at both their natural minimums)
Tip: Visualize the data to confirm your answer if needed.
Data Description
To answer the question, use the dataset from the file dataset_1.csv. For example, consider the row 11 from this dataset:
| Date | Time (Local) | Eyeballs | Zeroes | Completed Trips | Requests | Unique Drivers |
|---|
| 2012-09-10 | 16 | 11 | 2 | 3 | 4 | 6 |
This means that during the hour beginning at 4pm (hour 16), on September 10th, 2012, 11 people opened the Uber app (Eyeballs). 2 of them did not see any car (Zeroes) and 4 of them requested a car (Requests). Of the 4 requests, only 3 complete trips actually resulted (Completed Trips). During this time, there were a total of 6 drivers who logged in (Unique Drivers).
Practicalities
Please work on the questions in the displayed order. Make sure that the solution reflects your entire thought process - it is more important how the code is structured rather than the final answers. You are expected to spend no more than 2-3 hours solving this project.