📊 TheBus Dashboard Analyzer
📝 Über das Projekt
Ein erweitertes PHP Dashboard zur umfassenden Analyse von The Bus Betriebsdaten. Mit 11 interaktiven Tabs, Live-Status Monitoring, Health Scoring System und detaillierter Tour-Analyse für optimale Flottenplanung.
✨ Features
🔴 Live-Status
Echtzeit-Überwachung aller aktiven Busse mit Pünktlichkeits-Tracking
📈 Health Scoring
Automatische Bewertung der Datenqualität und Konsistenz
🚌 Effizienz-Analyse
Echte Standzeiten-Berechnung mit Optimierungsvorschlägen
📊 11 Tabs
Übersicht, Live, Validierung, Touren, Effizienz, Haltestellen, Analytics und mehr
🎯 Tab-Übersicht
1. 📊 Übersicht
Statistiken und Zusammenfassung aller Betriebsdaten
2. 🔴 Live
Echtzeit-Bus-Tracking mit simulierter Live-Anzeige
3. ⚠️ Unassigned
Touren ohne Fahrzeugzuordnung automatisch erkennen
4. ✅ Validierung
Gesundheitscheck der Daten, Mehrfachzuweisungen, Fehleranalyse
5. 🚌 Touren
Detaillierte Tour-Analyse mit Effizienz-Bewertung
6. ⚡ Effizienz
Fahrzeug-Effizienz-Analyse mit echten Standzeiten und Tour-Card Design
7. 🚏 Haltestellen
Erweiterte Haltestellen-Analyse mit:
- 24h Zeitverteilung mit grafischen Balken
- Taktung & Lücken-Analyse
- Optimierungsvorschläge
- Entwickler-Infos (klickbar ausklappbar)
- Raw JSON Data für APIs
8. 📅 Fahrpläne
Timetable-Übersicht und Abfahrtzeiten-Validierung
9. 📈 Analytics
Weitere statistische Analysen
10. 🚗 Fahrzeuge
Fahrzeugflotten-Details und Status-Tracking
11. 💾 Export
Daten-Export für externe Auswertungen
📥 Quick Setup
1. Dateien kopieren
dashboard_analyzer.php- Haupt-Dashboardconfig.php- Konfigurationsdatei
2. Ordnerstruktur erstellen
DeinProjekt/
├── dashboard_analyzer.php
├── config.php
├── DeinOperatingPlan/ ← Dein Ordner
│ ├── Lines/
│ ├── Routes/
│ ├── Timetables/
│ └── Tours/
└── DeineFahrzeugflotte/ ← Dein Ordner
└── config.vehiclefleet
3. Config anpassen
Öffne config.php und ändere:
'paths' => [
'operating_plan' => 'DeinOperatingPlan',
'vehicle_fleet' => 'DeineFahrzeugflotte',
],
4. Server starten
# Windows (PowerShell/CMD)
cd C:\Pfad\zu\deinem\Projekt
php -S localhost:8080
# Mac/Linux (Terminal)
cd /pfad/zu/deinem/projekt
php -S localhost:8080
5. Browser öffnen
Öffne http://localhost:8080
⚙️ Optionale Anpassungen
Rush Hour Zeiten ändern
'rush_hours' => [
'morning' => ['start' => 7, 'end' => 9],
'evening' => ['start' => 16, 'end' => 18],
],
Verkehrsdichte-Schwellenwerte
'traffic_density' => [
'high' => 50, // Ab wieviel Fahrten = "Hoch"
'medium' => 20, // Ab wieviel Fahrten = "Medium"
],
🔧 Für Entwickler
Code-Struktur
config.php- Alle konfigurierbaren WerteDashboardAnalyzerKlasse - Haupt-Logik- Modulare Tab-Funktionen
- JSON-Datenverarbeitung mit UTF-8 BOM-Handling
Datenquellen
- TheBus
.line,.lineRoute,.timetableDateien - Vehicle Fleet
config.vehiclefleet - Automatische Pfad-Erkennung
Erweiterbar
- Neue Tabs einfach hinzufügbar
- Konfigurierbare Schwellenwerte
- Mehrsprachigkeit vorbereitet
- CSS-Variablen für Theming
📄 Lizenz
Open Source (MIT) - Erstellt für TheBus Community 🚌💙
📊 TheBus Dashboard Analyzer
📝 About the Project
An advanced PHP dashboard for comprehensive analysis of The Bus operational data. Features 11 interactive tabs, live status monitoring, health scoring system, and detailed tour analysis for optimal fleet planning.
✨ Features
🔴 Live Status
Real-time monitoring of all active buses with punctuality tracking
📈 Health Scoring
Automatic evaluation of data quality and consistency
🚌 Efficiency Analysis
Real idle time calculation with optimization suggestions
📊 11 Tabs
Overview, Live, Validation, Tours, Efficiency, Stops, Analytics and more
🎯 Tab Overview
1. 📊 Overview
Statistics and summary of all operational data
2. 🔴 Live
Real-time bus tracking with simulated live display
3. ⚠️ Unassigned
Automatically detect tours without vehicle assignment
4. ✅ Validation
Data health check, duplicate assignments, error analysis
5. 🚌 Tours
Detailed tour analysis with efficiency rating
6. ⚡ Efficiency
Vehicle efficiency analysis with real idle times and tour card design
7. 🚏 Stops
Extended stop analysis with:
- 24h time distribution with graphical bars
- Frequency & gap analysis
- Optimization suggestions
- Developer info (clickable expandable)
- Raw JSON data for APIs
8. 📅 Timetables
Timetable overview and departure time validation
9. 📈 Analytics
Additional statistical analyses
10. 🚗 Vehicles
Vehicle fleet details and status tracking
11. 💾 Export
Data export for external evaluations
📥 Quick Setup
1. Copy Files
dashboard_analyzer.php- Main dashboardconfig.php- Configuration file
2. Create Folder Structure
YourProject/
├── dashboard_analyzer.php
├── config.php
├── YourOperatingPlan/ ← Your folder
│ ├── Lines/
│ ├── Routes/
│ ├── Timetables/
│ └── Tours/
└── YourVehicleFleet/ ← Your folder
└── config.vehiclefleet
3. Adjust Config
Open config.php and change:
'paths' => [
'operating_plan' => 'YourOperatingPlan',
'vehicle_fleet' => 'YourVehicleFleet',
],
4. Start Server
# Windows (PowerShell/CMD)
cd C:\Path\to\your\project
php -S localhost:8080
# Mac/Linux (Terminal)
cd /path/to/your/project
php -S localhost:8080
5. Open Browser
Navigate to http://localhost:8080
⚙️ Optional Customizations
Change Rush Hour Times
'rush_hours' => [
'morning' => ['start' => 7, 'end' => 9],
'evening' => ['start' => 16, 'end' => 18],
],
Traffic Density Thresholds
'traffic_density' => [
'high' => 50, // From how many trips = "High"
'medium' => 20, // From how many trips = "Medium"
],
🔧 For Developers
Code Structure
config.php- All configurable valuesDashboardAnalyzerclass - Main logic- Modular tab functions
- JSON data processing with UTF-8 BOM handling
Data Sources
- TheBus
.line,.lineRoute,.timetablefiles - Vehicle Fleet
config.vehiclefleet - Automatic path detection
Extensible
- New tabs easily added
- Configurable thresholds
- Multi-language ready
- CSS variables for theming
📄 License
Open Source (MIT) - Created for TheBus Community 🚌💙