A full-stack web application providing real-time operational intelligence for airport ride-hailing parking management. Features interactive vehicle animation, comprehensive analytics, and executive-grade visualizations.
This dashboard transforms raw parking occupancy data into actionable insights through an interactive, animated visualization system. It enables airport executives and operations staff to optimize parking efficiency, reduce passenger wait times, and make data-driven infrastructure decisions.
Key Features:
- 🚗 Real-time vehicle occupancy animation (60+ frames)
- 📊 Dynamic KPI dashboard with smart caching
- 📈 Comprehensive analytics charts (service mix, utilization, dwell time)
- 📋 Active vehicles table with entry times
- 🎨 Executive-grade design with Sky Harbor branding
Backend:
- FastAPI - Modern Python web framework
- Pandas - Data processing and analytics
- NumPy - Numerical computations
- Uvicorn - ASGI server
Frontend:
- React 18 - Component-based UI library
- Vite - Fast build tool and dev server
- Axios - HTTP client
- Recharts - Charting library
mini-project-3-ken-valenzuela/
├── assets/ # Source assets (map, car sprites, plates, data)
│ ├── map.png
│ ├── car_sprites/
│ ├── plates/
│ └── ride_hailing.xlsx
├── backend/ # FastAPI backend
│ ├── app.py # Main API server
│ └── requirements.txt # Python dependencies
├── frontend/ # React frontend
│ ├── src/
│ │ ├── components/ # React components
│ │ ├── hooks/ # Custom React hooks
│ │ ├── state/ # State management
│ │ ├── utils/ # Utility functions
│ │ └── api.js # API client
│ ├── public/ # Static assets (copied from assets/)
│ └── package.json # Node dependencies
├── CASE_STUDY.md # Comprehensive case study
├── SLOT_MAPPING.md # Slot numbering documentation
└── README.md # This file
Live Application:
- Frontend: https://frontend-ken-valenzuelas-projects.vercel.app
- Backend API: https://miniproject3-ljou.onrender.com
- API Documentation: https://miniproject3-ljou.onrender.com/docs
The application is fully deployed and ready to use!
- Python 3.8+
- Node.js 16+
- npm or yarn
-
Clone the repository
git clone <repository-url> cd mini-project-3-ken-valenzuela
-
Set up the backend
cd backend pip install -r requirements.txt -
Set up the frontend
cd ../frontend npm install -
Copy assets to public directory (if not already done)
# Assets should already be in frontend/public/ # If not, copy from assets/ directory
-
Start the backend server
cd backend uvicorn app:app --reload --port 8000 -
Start the frontend dev server (in a new terminal)
cd frontend npm run dev -
Open your browser
- Frontend: http://localhost:5173
- Backend API: http://localhost:8000
- API Docs: http://localhost:8000/docs
Or use the live version:
- Frontend: https://frontend-ken-valenzuelas-projects.vercel.app
- Backend API: https://miniproject3-ljou.onrender.com
- API Docs: https://miniproject3-ljou.onrender.com/docs
Live API Base URL: https://miniproject3-ljou.onrender.com
The backend provides the following RESTful endpoints:
| Endpoint | Method | Description |
|---|---|---|
/timestamps |
GET | Returns all available timestamps |
/frame/{ts} |
GET | Returns slot states for a timestamp |
/stats/{ts} |
GET | Basic occupancy statistics |
/stats_timestamp/{ts} |
GET | Comprehensive timestamp statistics |
/utilization |
GET | Slot utilization across dataset |
/service_mix |
GET | Service provider distribution |
/dwell_time |
GET | Dwell time statistics |
/summary |
GET | Overall dataset summary |
/vehicles_at_timestamp/{ts} |
GET | Vehicle details at timestamp |
/occupancy_timeline |
GET | Occupancy count per timestamp |
See CASE_STUDY.md for detailed API documentation.
- 60+ frames of vehicle movement data
- Smooth transitions with CSS animations
- 6 vehicle types (Audi, Car, Mini_truck, Mini_van, Taxi, Truck)
- Playback controls (play/pause, speed adjustment, scrubbing)
- Hover tooltips with vehicle details
- 4 key metrics updating in real-time:
- Avg Dwell Time
- Max Dwell Time
- Active Reservations
- Avg Reservation Duration
- Smart caching - Shows peak values when parking lot is empty
- Sky Harbor branding - Orange, royal blue, and white color scheme
- Service Share Over Time - Stacked area chart showing Uber/Lyft distribution
- Top 20 Slot Utilization - Bar chart of most-used parking slots
- Vehicle Dwell Time Distribution - Histogram of parking durations
- Real-time list of all vehicles at current timestamp
- Shows: Vehicle sprite, license plate, service provider, entry time, current dwell time
- Updates automatically with animation
- Real-time counter in top-left of animation
- Shows: Occupied (green), Vacant (yellow), Total slots
- Multi-tier caching prevents "N/A" display
cd backend
uvicorn app:app --reload --port 8000The backend:
- Loads data from
assets/ride_hailing.xlsxat startup - Precomputes timestamps, slot positions, utilization, service mix
- Serves JSON API endpoints
- Handles CORS for frontend communication
cd frontend
npm run devThe frontend:
- Uses Vite for fast HMR (Hot Module Replacement)
- Proxy configured for API requests to
http://localhost:8000(development) - Production: Connects to https://miniproject3-ljou.onrender.com
- React Context for state management
- Component-based architecture
# Frontend
cd frontend
npm run build
# Backend
# No build step needed - just deploy app.py with dependencies- React Context Provider - Shared state across all components
- Request Deduplication - Prevents duplicate API calls
- Smart Caching - Peak values and last-known stats
- Precomputed Data - Backend precomputes at startup
- Memoization - React
useMemofor expensive computations - CSS Transitions - Hardware-accelerated animations
- Frame Caching - Reduces redundant data loading
- Custom mapping system for intuitive 1-24 numbering
- Maintains data integrity (backend IDs unchanged)
- Natural reading pattern (left-to-right, top-to-bottom)
The application expects an Excel file (ride_hailing.xlsx) with the following columns:
current_time- Timestamp (datetime)slot_id- Parking slot identifierx,y- Slot coordinates (pixels)plate_number- Vehicle license plateservice- Service provider (Uber, Lyft)reservation_id- Reservation identifier (optional)rider_id- Rider identifier (optional)driver_id- Driver identifier (optional)
-
Operational Monitoring
- Real-time parking slot occupancy
- Vehicle movement tracking
- Service provider distribution
-
Analytics & Reporting
- Peak occupancy analysis
- Dwell time patterns
- Slot utilization trends
-
Strategic Planning
- Capacity planning
- Infrastructure optimization
- Service provider negotiations
-
Executive Dashboards
- High-level KPIs
- Visual data presentation
- Historical trend analysis
- CASE_STUDY.md - Comprehensive case study with all features
- SLOT_MAPPING.md - Slot numbering system documentation
Port already in use:
# Change port in uvicorn command
uvicorn app:app --reload --port 8001Missing dependencies:
cd backend
pip install -r requirements.txtData file not found:
- Ensure
assets/ride_hailing.xlsxexists - Check file path in
app.py(line 18)
Module not found:
cd frontend
rm -rf node_modules
npm installAPI connection errors:
- Ensure backend is running on port 8000 (local) or use live API: https://miniproject3-ljou.onrender.com
- Check CORS settings in
backend/app.py - Verify proxy configuration in
frontend/vite.config.js(development only) - For production, ensure
VITE_API_BASE_URLenvironment variable is set
Assets not loading:
- Ensure assets are in
frontend/public/directory - Check file paths in components (should start with
/)
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is part of a mini-project assignment.
- Ken Valenzuela - Initial development
- Sky Harbor Airport for the use case
- FastAPI and React communities for excellent documentation
- Recharts for beautiful chart components
For questions or issues, please open an issue in the repository.
This application is deployed using:
- Frontend: Vercel (https://vercel.com) - React/Vite application
- Backend: Render (https://render.com) - FastAPI/Python application
- Repository: https://github.com/KenValenzuela/MiniProject3
Both services auto-deploy on every push to the main branch.
Last Updated: December 2024
