Interview Task - Locale
Interview Task - Locale
Location is at the core of every business today. Whether you are moving people, goods or even
milk and eggs, location adds a layer of context over your data. It tells you where your customers
are, where your assets are and how to connect them. But, leveraging this data is not easy.
It comes with its own challenges. Seeing a lat/long column in a spreadsheet adds no value and
neither does visualize a million points on a map.
However, when used right it can be the key to understanding and improving any business. Here
are some examples we at Locale love.
The image above is a visualization of 1.2 Billion taxi trips across NYC
VIIRS satellite Image used to capture nighttime light activity. Read more about it here:
https://disasters.nasa.gov/news/new-night-lights-maps-open-possible-real-time-applications
Background
One of the leading ride-hailing companies, XRides in Bangalore has approached Locale to help
use its location data to make better decisions. They have shared a dataset of ~40,000 trips with
their time, starting and ending locations along with some other attribute data.
Using this dataset, we can recommend better geo-marketing tactics and increase cab utilization,
tell the drivers where to be at different times of the day to bridge supply and demand gaps or
help reduce cancellations. For this exercise, use one of the below-attached tasks that best suits
your skills and deliver a solution. Now, we need your help.
You can also choose a combination of tasks that fit your area of interest. Along with the code,
we also expect you to understand the dataset, share your inferences and write up a document
about your approach and understanding of the problem.
The task will be judged on code quality, implementation details and your write-up about the
approach to solve the problem.
Best of Luck!
Data Description
● id - booking ID
● user_id - the ID of the customer (based on mobile number)
● vehicle_model_id - vehicle model type.
● package_id - type of package (1=4hrs & 40kms, 2=8hrs & 80kms, 3=6hrs & 60kms, 4= 10hrs
& 100kms, 5=5hrs & 50kms, 6=3hrs & 30kms, 7=12hrs & 120kms)
● travel_type_id - type of travel (1=long distance, 2= point to point, 3= hourly rental).
● from_area_id - unique identifier of area. Applicable only for point-to-point travel and
packages
● to_area_id - unique identifier of area. Applicable only for point-to-point travel
● from_city_id - unique identifier of city
● to_city_id - unique identifier of city (only for intercity)
● from_date - time stamp of requested trip start
● to_date - time stamp of trip end
● online_booking - if booking was done on desktop website
● mobile_site_booking - if booking was done on mobile website
● booking_created - time stamp of booking
● from_lat - latitude of from area
● from_long - longitude of from area
● to_lat - latitude of to area
● to_long - longitude of to area
● Car_Cancellation - whether the booking was cancelled (1) or not (0) due to unavailability of a
car.
Front-end Task
The goal for you in this task is to create a front-end application where the user can upload a
CSV, select the Latitude and Longitude column of the CSV and then view the points on the
map.
Now the tricky part, after creating this basic visualization, you need to create some charts and
graphs that depict a story and are useful for the end-user. For example, you could plot the
medium of booking, a visualization of distances or a plain-old time-series histogram.
Brownie Points:
1. If your chart or bar-graph also acts as a filter and filters the data on the map
2. The query DSL that you would write if the data wasn’t available locally and had to be
fetched from a server.
Technologies:
Our ideal front-end framework is Vue/React. But choose a framework that you’re most
comfortable with.
Use Mapbox-GL-JS or Leaflet-JS for the map visualization and your favorite charting library.
Back-end Task
XRides, delivers about a 200 rides per minute or 288,000 rides per day. Now, they want to send
this data to your system via an API. Your task is to create this API and save the data into
PostgreSQL.
The API should be designed, keeping in mind the real-time streaming nature of data and the
burst of requests at peak times of the day. The user of this API expects an acknowledgment that
the data is accepted and a way to track if the request fails.
Brownie Points:
1. Write a query DSL of how you would want this data to be queried and how someone
would be able to run analytics operations on top of it.
2. Write up on the ideal system architecture and the design of API given enough time and
resources.
Technologies:
Our ideal stack is Python/Go. But feel free to use the language of your choice.
More than any other task, it will be critical for you to get a deep understanding of the dataset,
the business and how you can help them.
Brownie points if you share a recommendation or strategy backed by data that helps them
reduce cancellation, increase revenue or reduce costs.