Skip to content

An interactive Streamlit dashboard that standardizes BMTC (bus) and BMRCL (metro) ridership into comparable daily lakh units and visualizes YoY trends, mode share, and growth. It helps planners track shifts between bus and metro, spot policy or line-opening impacts, and make data-backed service and emissions decisions.

Notifications You must be signed in to change notification settings

advik-holalu/Bengaluru-Public-Transport-Daily-Ridership-Dashboard

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Bengaluru Public Transport — YoY Ridership Dashboard (BMTC + BMRCL)

Compare year-over-year (YoY) ridership trends for Bengaluru’s two major public transport agencies: BMTC (buses) and BMRCL / Namma Metro (metro rail). The app standardizes units, derives core KPIs, and visualizes long-term shifts in public transport usage.


Project Overview

  • Goal: Provide a clean, defensible view of how BMTC and BMRCL ridership evolves year by year, with derived KPIs to support capacity planning, policy evaluation, and climate impact narratives.
  • Stack: Python, pandas, plotly, Streamlit.
  • Outputs: Interactive charts (trend, YoY growth, mode split), KPI cards, and a tidy table ready for export.

This Project was created as a contribution at the Bengaluru Climate Hackathon, hosted by WRI India, BBMP, OpenCity, BCAP and partners.


Datasets (sources)

  1. BMTC Ridership Datadata.gov.in (Open Government Data)
  2. BMRCL Ridership DataWikipedia — Namma Metro (officially cited figures)

Notes

  • BMTC is typically available as year-wise totals or average daily numbers.
  • BMRCL often reports annual totals (in crore passengers). This dashboard converts to average daily (lakh) for an apples-to-apples comparison.

KPIs & Definitions

  • BMTC Daily (lakh) — Average daily BMTC ridership, in lakh.
  • Metro Daily (lakh) — Average daily BMRCL ridership, in lakh.
  • Total PT(Passenger Traffic) Daily (lakh) = BMTC Daily + Metro Daily
  • Metro Share (%) = (Metro Daily / Total PT Daily) × 100
  • YoY Growth (%) of Total PT = pct_change(Total PT Daily) × 100

Unit conventions: 1 crore = 100 lakh.
If BMRCL provides annual (crore):
Metro Daily (lakh) = annual_crore × 100 / 365.


Expected Data Schema

The app expects a year-level table after ingestion/standardization. You can prepare it in two ways:

Option A — Single combined file (recommended)

ridership_yoy.csv (or .xlsx) with columns:

Year BMTC_Daily_Lakh Metro_Daily_Lakh
2018 22.4 4.8
2019 23.1 5.6
2020 12.0 2.3

Option B — Two raw files (merged in code)

  • bmtc_yoy.csv with columns: Year, BMTC_Daily_Lakh
  • bmrcl_yoy.csv with columns: Year, Metro_Annual_Crore or Year, Metro_Daily_Lakh
    (If annual is provided, the app converts to daily in lakh using the formula above.)

Keep raw downloads in data/raw/ and the clean/derived table in data/processed/.


What the Dashboard Shows

  • Trend Line: Total PT Daily (lakh) over years, with BMTC vs Metro stacked or overlaid.
  • Mode Split (Donut/Bar): Metro Share (%) for a selected year.
  • YoY Growth Line/Bar: Year-over-year growth of Total PT (%).
  • KPI Cards: Selected year’s values + Δ vs previous year.
  • Events Overlay (optional): Policy changes (e.g., fare schemes), new line openings, pandemic years.

Development Phases

  1. Requirements & KPI Scoping
    Define the question (PT shift). Choose metrics: BMTC Daily (lakh), Metro Daily (lakh), Total PT Daily, Metro Share (%), YoY Growth (%).

  2. Data Sourcing
    Identify sources: BMTC year-wise (data.gov.in), BMRCL annual (Wikipedia/Namma Metro). Note access limits (no station-wise; some pages lack APIs).

  3. Data Collection / Ingestion
    Download CSV/XLSX, read into pandas. Keep raw files. Log source URLs and “Updated On” dates.

  4. Collation & Schema Design
    Standardize columns → Year, BMTC_Daily_Lakh, Metro_Daily_Lakh (or Metro_Annual_Crore to derive).

  5. Cleaning & Normalization
    Strip commas/strings, coerce numeric, ensure consistent units. Convert Metro annual crore → daily lakh with daily_lakh = annual_crore × 100 / 365. Handle missing/duplicate years.

  6. Feature Engineering

    • Total_PT_Daily_Lakh = BMTC_Daily_Lakh + Metro_Daily_Lakh
    • Metro_Share_Pct = Metro_Daily_Lakh / Total_PT_Daily_Lakh × 100
    • YoY_Growth_Pct = pct_change(Total_PT_Daily_Lakh) × 100
      Round for display; keep full precision internally.
  7. Packaging & Deployment
    requirements.txt (streamlit, plotly, pandas, openpyxl), optional runtime.txt. Deploy to Streamlit Cloud. Add “Data Sources” links in the footer.


Local Setup

# 1) Clone
git clone https://github.com/advik-holalu/Bengaluru-Public-Transport-Daily-Ridership-Dashboard.git
cd Bengaluru-Public-Transport-Daily-Ridership-Dashboard

# 2) (Optional) Virtual env
python -m venv .venv
# macOS/Linux:
source .venv/bin/activate
# Windows PowerShell:
# .\.venv\Scripts\Activate.ps1

# 3) Install
pip install -r requirements.txt

# 4) Run the app
streamlit run app.py

Team Behind the Work

  • Advik R Holalu
  • Akshath S Bhandiwad
  • Joselyn Riana Manoj
  • K Jaidev Shankar Reddy
  • Sanjan Dileep

About

An interactive Streamlit dashboard that standardizes BMTC (bus) and BMRCL (metro) ridership into comparable daily lakh units and visualizes YoY trends, mode share, and growth. It helps planners track shifts between bus and metro, spot policy or line-opening impacts, and make data-backed service and emissions decisions.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages