Cab Company Investment Firm Study

Overview


This project analyzes operational and financial performance across two competing cab companies, Pink Cab and Yellow Cab, to determine which company presents the stronger investment opportunity. The analysis evaluates revenue, cost structure, pricing behavior, and profit margins across multiple cities in the United States.

The dataset includes over 359,000 ride transactions, enabling a detailed comparison of profitability, pricing efficiency, and regional demand patterns. The goal of the analysis is to identify which company demonstrates stronger financial performance and long-term growth potential.

An interactive dashboard built in Microsoft Power BI allows users to explore performance metrics by state and company. Key performance indicators include:

  • Revenue generated by each cab company
  • Profit margin trends
  • Price charged per kilometer
  • Geographic performance differences across cities and states

The dashboard slicer enables users to toggle between companies to analyze operational trends and regional profitability differences.

Data & Tools

Data Sources

The project integrates four datasets provided through a Data Glacier internship that capture ride transactions, customer information, and city-level demographics:

  • Cab Data
    • Company
    • Date of Travel
    • City
    • KM Travelled
    • Price Charged
    • Cost of Trip
  • Customer Data
    • Customer ID
    • Gender
    • Age
    • Monthly Income
  • Transaction Data
    • Transaction ID
    • Customer ID
    • Payment Mode (Card or Cash)
  • City Data
    • City
    • Population
    • Number of Cab Users

These datasets were combined to create a comprehensive view of cab operations and customer behavior across major U.S. cities.

Tools and Technologies 🛠️

  • Python – data cleaning and transformation
  • Pandas – data manipulation and merging
  • Seaborn – exploratory data visualization
  • Matplotlib – supporting visual analysis
  • Microsoft Power BI – interactive dashboard development
  • GitHub – project documentation and version control

Methodology

Data Exploration

Initial exploration focused on identifying missing values, data types, and potential duplicate records across all datasets. Each dataset was evaluated to ensure data integrity before analysis.

Sanity checks included:

  • Verifying dataset dimensions
  • Reviewing column data types
  • Checking for missing values
  • Detecting duplicate records

No missing values or duplicate entries were found in the datasets.


Data Transformation

Several transformation steps were performed to prepare the data for analysis.

Dataset Merging

Multiple datasets were merged using unique identifiers:

  • Cab data merged with transaction data using Transaction ID
  • Customer demographic data merged using Customer ID

This resulted in a combined dataset containing operational, demographic, and transaction-level information.


Date Conversion

The Date of Travel column was converted from an integer format to a proper datetime format to support time-based analysis.

Additional time features were created:

  • Year
  • Month
  • Quarter
  • YearMonth

These variables allow analysis of trends across time periods.


Feature Engineering

Several calculated metrics were created to measure operational efficiency and profitability:

  • Profit Margin
  • Margin = Price Charged – Cost of Trip

Cost Efficiency Metrics

  • Cost per kilometer
  • Price charged per kilometer
  • Profit margin per kilometer

These metrics help evaluate pricing efficiency and operational performance between companies.


Geographic Standardization

City values were standardized to improve geographic consistency. Ambiguous entries such as:

  • Silicon Valley
  • Orange County

were converted into standardized City-State formats.

The city column was also split into two new variables:

  • City Name
  • State

This enabled geographic analysis at the state level.


Data Visualization

The processed dataset was imported into Microsoft Power BI to build an interactive dashboard.

The dashboard includes:

  • Revenue comparison between companies
  • Profit margin distribution
  • Pricing per kilometer by state
  • Geographic performance visualization

An interactive slicer allows users to switch between Pink Cab and Yellow Cab to compare operational performance.

Project Documentation

Project Documentation

Complete project documentation, including data preparation scripts and analysis steps, is available on:

The repository includes:

  • Python data preparation scripts
  • Dataset merging and transformation code
  • Feature engineering steps
  • Exploratory analysis outputs

Interactive Dashboard

Below is the interactive dashboard built using Microsoft Power BI.