Data-driven analysis of passenger demand, occupancy, route performance, stop-level activity, peak-hour pressure, and bus operational performance for the Bus Route Rationalization (BRR) Project under the Dhaka Transport Coordination Authority (DTCA).
This project provides a comprehensive analytical framework for examining bus survey data collected for the Bus Route Rationalization (BRR) Project under DTCA.
The analysis uses Python-based data processing and statistical exploration to understand:
- π§βπ€βπ§ Passenger demand and movement
- π Bus occupancy and passenger loading
- π£οΈ Route-level performance
- π Stop-level passenger demand
- β° Peak-hour passenger pressure
- β±οΈ Travel-time performance
- π Dwell-time characteristics
β οΈ Data-quality and passenger-flow anomalies
The project is designed to distinguish actual transportation patterns from data-quality issues, ensuring that anomalies are identified and investigated rather than silently removed.
The analysis is organized around five primary analytical areas:
| Priority | Analysis | Objective |
|---|---|---|
| βββββ | π§βπ€βπ§ Passenger Flow & Occupancy | Understand passenger demand and vehicle loading |
| βββββ | π Route Performance | Compare performance across bus routes |
| βββββ | π Stop Demand | Identify high-demand and critical stops |
| ββββ | β° Peak-Hour Analysis | Identify periods of high passenger pressure |
| ββββ | β±οΈ Travel & Dwell Time | Identify operational bottlenecks |
The initial dataset contains:
| Metric | Value |
|---|---|
| Records | 20,496 |
| Variables | 13 |
| Unique Routes | 98 |
| Unique Trips | 20 |
| Unique Stops | 311 |
The initial audit identified several important issues:
| Data-quality issue | Records | Percentage |
|---|---|---|
| Duplicate records | 370 | 1.81% |
Missing Distance |
20,496 | 100.00% |
Missing Time |
5,353 | 26.12% |
Missing Trip_ID |
45 | 0.22% |
| Negative Travel Time | 7 | β |
| Negative Dwell Time | 3 | β |
| Negative Occupancy | 164 | β |
Anomalous observations are investigated before removal.
Negative travel time, negative dwell time, negative occupancy, missing trip identifiers, missing timestamps, and duplicate observations are retained during the audit so their potential causes can be evaluated.
This prevents potentially meaningful operational or passenger-flow information from being lost through premature cleaning.
Passenger movement is analyzed using several complementary measures:
- Boarding β passengers entering the bus at a stop
- Alighting β passengers leaving the bus at a stop
- Passenger Activity β total boarding + alighting
- Net Passenger Change β boarding β alighting
- Observed Occupancy β recorded passenger load
- Reconstructed Occupancy β occupancy estimated from passenger-flow sequences
- Occupancy Consistency β comparison between observed and reconstructed passenger loads
The project specifically investigates:
- Negative occupancy
- Occupancy inconsistent with passenger movements
- Occupancy equal to
Boarding β Alighting - Passenger-flow discontinuities
- Potential trip-level inconsistencies
- Potential route-level inconsistencies
- Missing trip identifiers affecting reconstruction
The objective is to determine whether unusual occupancy values represent:
- Genuine passenger-flow conditions,
- Survey/data-entry issues,
- Trip sequencing problems, or
- Other data-processing anomalies.
Routes are evaluated using a combination of passenger, operational, and data-quality indicators.
- Total boarding
- Total alighting
- Passenger activity
- Mean occupancy
- Maximum occupancy
- Number of stops
- Number of records
- Travel time
- Dwell time
- Negative occupancy rate
- Occupancy variability
- Passenger demand concentration
This enables comparison between routes and identification of routes experiencing:
High passenger demand + high occupancy + operational pressure
Stop-level analysis identifies locations where passenger demand and operational pressure are concentrated.
- Total boarding
- Total alighting
- Total passenger activity
- Mean occupancy
- Maximum occupancy
- Number of observations
- Route coverage
- Passenger-flow characteristics
- Peak-period demand
This analysis can help identify:
- π΄ Critical high-demand stops
- π High passenger-activity locations
- π‘ Potential congestion points
- π’ Lower-demand locations
The results can support further investigation of stop consolidation, route restructuring, service frequency, and operational planning.
Available timestamp information is converted into analytical time periods.
| Period | Time |
|---|---|
| π Early Morning | Before 06:00 |
| π Morning Peak | 06:00β08:59 |
| βοΈ Morning | 09:00β11:59 |
| π Midday | 12:00β14:59 |
| π Afternoon Peak | 15:00β17:59 |
| π Evening | 18:00β20:59 |
| π Night | 21:00 onward |
| β Unknown | Missing/unusable time |
Missing time values are not silently discarded. They are retained as Unknown so that the impact of missing timestamps can be evaluated separately.
Peak-hour analysis examines:
- Passenger activity
- Boarding
- Alighting
- Occupancy
- Route demand
- Stop demand
- Travel time
- Dwell time
Operational performance is evaluated using:
Time required for movement between surveyed observations/stops.
Time associated with passenger/service activity at the surveyed location.
The analysis investigates:
- Average travel time
- Median travel time
- Route-level travel time
- Stop-level dwell time
- Peak-period travel time
- Peak-period dwell time
- Extreme values
- Negative values
- Potential operational bottlenecks
Negative values are retained for data-quality diagnostics but excluded from operational calculations where they cannot represent physically meaningful durations.
The project follows a staged analytical approach:
Raw Survey Data
β
βΌ
Data Quality Audit
β
βββ Missing Values
βββ Duplicates
βββ Invalid Values
βββ Negative Values
βββ Structural Issues
β
βΌ
Data Validation
β
βΌ
Passenger Flow Reconstruction
β
βΌ
Occupancy Consistency Analysis
β
βΌ
Route Performance
β
βΌ
Stop Demand
β
βΌ
Peak-Hour Analysis
β
βΌ
Travel / Dwell-Time Analysis
β
βΌ
Integrated RouteβStop Dashboard
The project uses the following tools and technologies:
| Technology | Purpose |
|---|---|
| π Python | Data analysis and processing |
| πΌ Pandas | Data manipulation and analysis |
| π’ NumPy | Numerical computation |
| π Matplotlib | Data visualization |
| π Jupyter Notebook | Interactive analysis |
| πΏ Git | Version control |
| π GitHub | Project hosting and collaboration |
DTCA-BRR-Bus-Survey-Analysis/
β
βββ README.md
βββ requirements.txt
β
βββ notebooks/
β βββ DTCA_BRR_Passenger_Flow_Analysis.ipynb
β
βββ data/
β βββ README.md
β
βββ outputs/
β βββ figures/
β βββ tables/
β
βββ src/
βββ analysis/
notebooks/
Contains Jupyter notebooks used for exploratory and analytical work.
data/
Reserved for authorized local copies of the survey dataset.
outputs/figures/
Contains generated charts and visualizations.
outputs/tables/
Contains analytical summary tables and exported results.
src/
Reserved for reusable Python analysis modules and processing functions.
The underlying survey dataset is not included in this public repository unless publication and redistribution have been explicitly authorized.
The analysis notebook is structured so that an authorized user can place the dataset in the appropriate local data directory before execution.
Local machine-specific paths should not be embedded in the notebook.
For example, instead of using:
E:\DTCA Project\BRR Project\Survey Data\...the project should use a relative project path such as:
from pathlib import Path
DATA_PATH = Path("../data/All_Processed_Survey_Data_Conda.csv")This makes the notebook portable across computers and suitable for GitHub.
- Dataset loading
- Dataset structure assessment
- Missing-value audit
- Duplicate-record audit
- Unique-value analysis
- Numeric-variable profiling
- Negative-value diagnostics
- Zero-value analysis
- Coordinate validation
- Passenger-variable assessment
- Route and trip assessment
- Time-variable assessment
- Negative occupancy investigation
- Occupancy consistency analysis
- Passenger-flow reconstruction
- Passenger-flow validation
- Route performance analysis
- Stop-demand analysis
- Peak-hour analysis
- Travel/dwell-time performance analysis
- Integrated routeβstop dashboard
The next stages of the project are:
Reconstruct passenger movement through stop sequences and validate observed occupancy.
Rank and compare routes using passenger demand, occupancy, travel time, dwell time, and data-quality indicators.
Identify critical passenger-demand locations and high-pressure stops.
Examine passenger activity and occupancy by time of day and peak periods.
Identify potential travel-time and dwell-time bottlenecks.
Develop a routeβstop analytical dashboard combining:
Route
+
Stop
+
Passenger Demand
+
Occupancy
+
Time
+
Operational Performance
+
Data Quality
The completed project is intended to produce:
- π Passenger-flow visualizations
- π Route performance rankings
- π Stop-demand rankings
- β° Peak-hour demand profiles
- π₯ Occupancy distributions
- β±οΈ Travel-time analysis
- π Dwell-time analysis
- πΊοΈ Spatial passenger-demand analysis
β οΈ Data-quality diagnostics- π Routeβstop performance dashboard
The analytical results may support further investigation into:
- Bus route restructuring
- Passenger-demand concentration
- Service frequency planning
- High-demand stop identification
- Route performance comparison
- Peak-period service planning
- Operational bottleneck identification
- Passenger-flow balancing
- Bus network rationalization
Important: Analytical findings should be interpreted alongside survey methodology, operational context, field observations, and relevant transport-planning criteria before being used for policy or network-design decisions.
A. T. M. Neamul
An appropriate license should be added after confirming:
- Ownership of the analytical code,
- Publication rights,
- Redistribution conditions for derived outputs, and
- Any restrictions associated with the underlying survey data.
π§ Active Development
This repository documents an ongoing analytical workflow for the DTCA / BRR Bus Survey Data Analysis Project.
The analysis will continue to evolve as passenger-flow validation, route performance, stop-demand, temporal, operational, and dashboard analyses are completed.
Turning survey observations into evidence for understanding passenger demand, route performance, and bus network operations.