An Exploratory Data Analysis (EDA) project based on Uber user/trip data. The project uses Python and popular data analysis and visualization libraries to understand trip patterns, mileage distribution, travel timing, monthly trends, and unusual observations in the dataset.
The dataset contains Uber trip records with information such as:
- Start and end date/time
- Trip category
- Starting location
- Destination
- Distance traveled in miles
- Trip purpose
The analysis also creates additional features such as date, time, day/night category, month, and day of the week.
The original dataset contains 1,156 rows and 7 columns.
Column Description
START_DATE Trip start date and time
END_DATE Trip end date and time
CATEGORY Trip category
START Trip starting location
STOP Trip destination
MILES Distance traveled
PURPOSE Purpose of the trip
During preprocessing and feature engineering, the project creates:
date-- extracted date fromSTART_DATEtime-- extracted hour fromSTART_DATEday-night-- time-based category such as Morning, Afternoon, Evening, or NightMONTH-- month extracted from the trip dateDAY-- day of the week
- Python
- Pandas
- NumPy
- Matplotlib
- Seaborn
- Jupyter Notebook
The analysis follows these main steps:
- Import required Python libraries.
- Load the Uber dataset using Pandas.
- Explore the dataset using functions such as
head()and basic inspection. - Convert date columns into datetime format.
- Extract useful date and time features.
- Categorize trips according to time of day.
- Analyze monthly and daily trip patterns.
- Analyze the
MILESvariable. - Detect potential outliers using boxplots.
- Study mileage distribution using histograms and KDE.
- Visualize important patterns using Matplotlib and Seaborn.
The MILES column is analyzed to understand the typical distance of
Uber trips.
A boxplot is used to identify unusually high mileage observations. The analysis shows that most trips are relatively short, while some trips have considerably higher mileage.
A filtered analysis of trips below 100 miles and below 40 miles is also used to examine the main distribution more clearly.
A histogram with KDE is used to understand the distribution of trip distances.
The distribution of trips below 40 miles is concentrated toward lower mileage values and has a longer tail toward higher values, indicating a right-skewed distribution.
The trip start time is extracted from START_DATE and grouped into
categories such as:
- Morning
- Afternoon
- Evening
- Night
This helps analyze when trips are commonly made.
The month is extracted from the trip start date and used to analyze trip patterns across the year.
- The dataset contains 1,156 trip records.
- Most recorded trips are relatively short-distance.
- Several high-mileage observations appear as potential outliers.
- The mileage distribution is positively/right-skewed.
- Date and time features can be used to study travel behavior across months, days, and different times of the day.
Uber-User-Data-Analysis/
│
├── UberDataset.xlsx
├── project.ipynb
├── README.md
- Clone or download this repository.
- Make sure Python is installed.
- Install the required libraries:
pip install pandas numpy matplotlib seaborn openpyxl jupyter- Open the Jupyter Notebook:
jupyter notebook- Run the notebook cells sequentially.
This project demonstrates a practical Exploratory Data Analysis workflow using Uber trip data. It covers data preprocessing, feature engineering, statistical exploration, outlier detection, and visualization to understand trip behavior and mileage patterns.
Niraj Kumar Maurya