Dynamic Pricing for Urban Parking Lots

Intelligent dynamic pricing engine for urban parking lots, adjusting rates in real-time based on demand, traffic, and competitor prices.


πŸš— Dynamic Pricing for Urban Parking Lots

Capstone Project – Summer Analytics 2025
By: Chirayu Khalwa
πŸ“§ khalwachirayu@gmail.com
GitHub: raysamma

This project implements an intelligent dynamic pricing engine for urban parking lots, adjusting parking rates in real-time based on demand, queue lengths, traffic conditions, and competitor prices.

The solution uses real-time data streaming with Pathway and visualizes price fluctuations using interactive Bokeh plots.

🌟 Overview

Urban parking spaces are limited and static pricing often leads to underutilization or overcrowding. This project solves that problem by:

  • πŸ“ˆ Increasing prices during high demand and traffic
  • πŸ“‰ Reducing prices when occupancy is low
  • πŸ—ΊοΈ Considering competitor prices and proximity to suggest rerouting
  • πŸ”„ Streaming real-time data to update prices dynamically

We built three pricing models, progressively improving intelligence:

  • Baseline Linear Model
  • Demand-Based Price Function
  • Competitive Pricing Model

πŸ› οΈ Tech Stack

ComponentDetails
LanguagePython 3
Data ProcessingPandas, NumPy
Real-Time StreamingPathway
VisualizationBokeh, Panel
Hosting/SharingGoogle Colab, GitHub
Geospatial AnalysisLatitude/Longitude proximity

πŸ—οΈ Project Architecture & Workflow

1️⃣ Data Ingestion

  • Input data (dataset.csv) includes occupancy, capacity, traffic, queue lengths, and GPS for 14 lots.
  • Simulated real-time ingestion using Pathway.demo.replay_csv().

2️⃣ Feature Engineering

  • Parse timestamp, calculate occupancy ratio and demand metrics.
  • Extract day-level and lot-level features.

3️⃣ Pricing Models

  • Model 1: Simple linear pricing
    price_t+1 = price_t + Ξ± * (Occupancy / Capacity)
  • Model 2: Demand-based pricing using:
    • Occupancy Rate
    • Queue Length
    • Traffic Level
    • Special Day Indicator
    • Vehicle Type Weightage
  • Model 3: Adds competitor prices and rerouting logic.

4️⃣ Real-Time Visualization

  • Plot dynamic prices over time using Bokeh interactive charts.
  • Simulate price updates and recommendations live.

πŸ“‚ Project Structure

Dynamic-Pricing-Parking
 ┣ dataset.csv
 ┣ DynamicPricing.ipynb
 ┣ README.md
 ┣ images/
 ┃ β”— architecture_diagram.png

πŸ“ˆ Visual Output Examples

Sample: Real-time price fluctuations for Parking Lot 5

πŸ“ Documentation

✨ Features

  • Smooth price transitions (avoids erratic jumps)
  • Handles high-demand and low-capacity scenarios gracefully
  • Reroutes vehicles to nearby lots if occupancy is high

πŸ”₯ Challenges Solved

  • Simulating real-time streams in Colab
  • Normalizing demand and keeping prices bounded between 0.5x and 2x base price
  • Integrating geospatial logic with pricing

πŸš€ How to Run

  • Open in Google Colab
  • Upload dataset.csv
  • Run all cells to start real-time simulation

πŸ‘¨β€πŸ’» Author

Chirayu Khalwa
πŸ“§ khalwachirayu@gmail.com
🌐 GitHub - raysamma