Airport Analytics Dashboard
šÆ Project Overview
A professional airport passenger analytics dashboard built for technical interview demonstration. Visualizes predicted passenger data and flight information for KLIA (Kuala Lumpur International Airport) with interactive charts and SQL query demonstrations.
š Interview Questions Addressed
1. Data Linking Strategy
"How would you link all our flight data with the predicted passenger numbers?"
Solution:
- SQL JOIN on
FLIGHTNO
(with space removal) and FLIGHT_DATETIME
- Pre-processed CSV data with proper relationships
- Live SQL query demonstration in dashboard
2. Top 5 Continents Visualization
"Can you find the top 5 continents with the most predicted passengers on 14 Jun 2025?"
Solution:
- Chart: Bar Chart with color-coded continents
- Data: Aggregated by continent with passenger totals
- Features: Hover tooltips, responsive design
3. Daily Passenger Trends
"Can you show daily total of all predicted passengers in suitable chart?"
Solution:
- Chart: Line Chart with area fill
- Data: Daily aggregated passenger totals
- Features: Smooth curves, date formatting, trend visualization
4. Hourly Terminal Traffic Analysis
"How can we show the predicted passenger traffic for each terminal, hour by hour on 14 Jun 2025?"
Solution:
- Chart: Stacked Bar Chart (KLIA vs KLIA2)
- Data: Hourly breakdown by terminal
- Features: 24-hour timeline, terminal comparison, interactive legend
š Technical Stack
- Frontend: Svelte 5 + SvelteKit
- Charts: Chart.js (direct implementation)
- Styling: Tailwind CSS
- Build: Vite + pnpm
- Language: TypeScript
š Quick Start
# Install dependencies
pnpm install
# Start development server
pnpm run dev
# Open http://localhost:5173
š Dashboard Features
Three Main Sections:
1. š Interactive Charts
- Top 5 Continents (Bar Chart)
- Daily Passenger Totals (Line Chart)
- Hourly Terminal Traffic (Stacked Bar Chart)
- Professional styling with hover tooltips
- Responsive design for all screen sizes
2. š Raw Data Viewer
- Toggle-able CSV data display
- Clean table format (not JSON)
- First 20 rows with scroll indicators
- Professional styling with alternating row colors
3. š» SQL Queries & Results (NEW)
- 4 Complete SQL Queries with syntax highlighting
- Live Data Results showing query outputs
- Professional Presentation for interview discussions
- Query Types:
- Flight Data JOIN with Predicted Passengers
- Top 5 Continents Aggregation
- Daily Totals Grouping
- Hourly Terminal Traffic Analysis
Professional UI/UX
- Enterprise-grade design (Power BI/Tableau inspired)
- Card-based layout with subtle shadows
- Consistent color palette and typography
- Mobile-responsive grid system
- Loading states and error handling
š Project Structure
airport-v2/
āāā src/
ā āāā lib/
ā ā āāā Dashboard.svelte # Main component (887 lines)
ā āāā routes/
ā ā āāā +page.svelte # App entry point
ā āāā app.html # HTML template
āāā static/data/ # CSV datasets
ā āāā top5_continents.csv
ā āāā daily_totals.csv
ā āāā hourly_terminal.csv
ā āāā PredictedPax_Table.csv
ā āāā FlightData_Table.csv
āāā package.json
š§ Key Implementation Details
Data Processing
- Parallel CSV fetching for optimal performance
- Custom CSV parser with proper type handling
- Date formatting for DD/MM/YYYY format
- SQL query simulation with real data
Chart Management
- Direct Chart.js implementation (Svelte 5 compatible)
- Proper lifecycle management (create/destroy)
- Memory leak prevention
- Responsive canvas rendering
Code Quality
- TypeScript with full type safety
- Comprehensive comments for interview discussion
- Error handling and validation
- Professional code organization
šØ Design Philosophy
- Clean & Minimal: Professional enterprise aesthetic
- Data-First: Charts optimized for data interpretation
- Interview-Ready: Clear code structure for technical discussions
- Responsive: Works on desktop, tablet, and mobile
š SQL Query Examples
-- Top 5 Continents Query
SELECT
f.CONTINENT,
SUM(p.PREDICTED_PAX) AS total_passengers
FROM flightdata f
JOIN PredictedPax p
ON REPLACE(f.FLIGHTNO,' ','') = p.FLIGHT_NO
AND DATE(f.FLIGHT_DATETIME) = p.FLIGHT_DATE
WHERE DATE(f.FLIGHT_DATETIME) = '2025-06-14'
GROUP BY f.CONTINENT
ORDER BY total_passengers DESC
LIMIT 5;
Developer: Irman Wafi
Project: Technical Interview Demonstration
Focus: Data Visualization & Analytics