Skip to content

coreylee1990/operator_dashboard_standalone

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

1 Commit
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿ“Š Operator Dashboard - Standalone Edition

๐ŸŽฏ Overview

This is a completely self-contained operator dashboard system that provides sophisticated data visualization and analysis capabilities. It has been extracted from the larger OrionTechAudits system and can run independently.

โœจ Features

  • ๐Ÿง  Smart Table System - Auto-detects data types and applies appropriate filters
  • ๐ŸŒ Web Interface - Modern Flask-based web application
  • ๐Ÿ“Š Multiple Dashboard Types
    • Operator Dashboard (HTML & Web): Standard, Modular, and Visualization dashboards
    • Status Flow Dashboard: Advanced status transitions and flow visualizations (Sankey, network, violin, treemap, sunburst, timeline, and more)
  • ๐Ÿ“ˆ Interactive Charts - Chart.js and D3.js integration with real-time data
  • ๐Ÿ“ค Export Capabilities - CSV, Excel, PDF, and print options
  • ๐ŸŽจ Professional UI - Bootstrap 5 with mobile support
  • โšก High Performance - Optimized for large datasets
  • ๐Ÿ”„ Complete Data Pipeline - From raw files to finished dashboards
  • ๐Ÿ—‚๏ธ Comprehensive Reports - Excel, JSON, CSV, and HTML outputs

๐Ÿš€ Quick Start

1. Prerequisites

  • Python 3.8 or higher
  • All required packages are listed in requirements.txt

2. Running the Dashboard

Easiest way:

python run_dashboard.py

This will:

  • Check and install dependencies
  • Present a menu of options
  • Start the web application (recommended)

Direct web app launch:

python -m src.operator_html_generator.web_app

Generate HTML dashboard only:

python -m src.operator_html_generator.main

3. Accessing the Dashboard

๐Ÿ–ฅ๏ธ Dashboard Types & Outputs

Operator Dashboards

  • Standard Operator Dashboard: reports/html_reports/operator_dashboard.html
  • Modular Dashboard: reports/html_reports/modular_dashboard.html, operator_dashboard_modular.html
  • Visualization Dashboard: reports/html_reports/visualization_dashboard.html

Status Flow Dashboard

  • Status Transitions & Flows: reports/status_flow_dashboard.html, reports/visualizations/status_transitions_standalone.html
  • Advanced Visualizations: Sankey diagrams, network graphs, violin plots, treemaps, sunburst, timelines, and more (see src/status_flow_dashboard/visualizations/)

Reports & Data Exports

  • Excel Reports: reports/operator_status_report.xlsx
  • JSON Data: reports/consolidated_dashboard_data.json, reports/detailed_records.json, etc.
  • CSV/Statistical Reports: reports/status_statistics.csv, reports/status_statistics_all_operators.csv, etc.

Interactive Console & Automation

  • Console Menu: python console_app.py for all workflows
  • All-in-One Processing: Fully automated pipeline from raw data to dashboard

๐Ÿ“ Project Structure

operator_dashboard_standalone/
โ”œโ”€โ”€ ๐Ÿ“„ run_dashboard.py              # Main launcher script
โ”œโ”€โ”€ ๐Ÿ“„ console_app.py                # Interactive console interface
โ”œโ”€โ”€ ๐Ÿ“„ requirements.txt              # Python dependencies
โ”œโ”€โ”€ ๐Ÿ“„ README.md                     # This file
โ”‚
โ”œโ”€โ”€ ๐Ÿ“ src/                          # Source code
โ”‚   โ”œโ”€โ”€ ๐Ÿ“ operator_html_generator/  # Main dashboard system
โ”‚   โ”‚   โ”œโ”€โ”€ web_app.py              # Flask web application
โ”‚   โ”‚   โ”œโ”€โ”€ main.py                 # CLI dashboard generator
โ”‚   โ”‚   โ”œโ”€โ”€ html_generator.py       # HTML generation engine
โ”‚   โ”‚   โ”œโ”€โ”€ ๐Ÿ“ templates/           # Jinja2 templates
โ”‚   โ”‚   โ”œโ”€โ”€ ๐Ÿ“ static/              # CSS, JS assets
โ”‚   โ”‚   โ””โ”€โ”€ ๐Ÿ“ data_preparers/      # Data processing modules
โ”‚   โ”‚
โ”‚   โ”œโ”€โ”€ ๐Ÿ“ operator_excel_generator/ # Data processing backend
โ”‚   โ”œโ”€โ”€ ๐Ÿ“ status_flow_dashboard/   # Status flow & advanced visualizations
โ”‚   โ”‚   โ”œโ”€โ”€ main.py                # Status flow dashboard generator
โ”‚   โ”‚   โ”œโ”€โ”€ ๐Ÿ“ visualizations/     # Sankey, network, violin, treemap, etc.
โ”‚   โ”œโ”€โ”€ process_audit_files.py     # Raw data processor
โ”‚   โ””โ”€โ”€ update_dashboard_with_historical_data.py
โ”‚
โ”œโ”€โ”€ ๐Ÿ“ Files/                       # Data directories
โ”‚   โ”œโ”€โ”€ ๐Ÿ“ raw_files/              # Input: Raw Excel files
โ”‚   โ”‚   โ”œโ”€โ”€ ๐Ÿ“ Operators/          # Operator data files
โ”‚   โ”‚   โ””โ”€โ”€ ๐Ÿ“ Vehicles/           # Vehicle data files
โ”‚   โ”œโ”€โ”€ ๐Ÿ“ processed/              # Output: Processed CSV files
โ”‚   โ”œโ”€โ”€ ๐Ÿ“ DailyAudits/           # Output: Daily Excel reports
โ”‚   โ””โ”€โ”€ ๐Ÿ“ ...
โ”‚
โ”œโ”€โ”€ ๐Ÿ“ reports/                     # Generated reports
โ”‚   โ”œโ”€โ”€ detailed_records.json      # Main data file
โ”‚   โ”œโ”€โ”€ operator_status_report.xlsx # Excel output
โ”‚   โ””โ”€โ”€ ๐Ÿ“ html_reports/          # HTML dashboards
โ”‚
โ”œโ”€โ”€ ๐Ÿ“ downloads/                   # Intermediate processing
โ”œโ”€โ”€ ๐Ÿ“ misc/                       # Configuration files
โ””โ”€โ”€ ๐Ÿ“ logs/                       # Processing logs

๐Ÿ”„ Data Processing Pipeline

Step 1: Raw Data Input

Place your raw Excel files in:

  • Files/raw_files/Operators/ - Operator certification files
  • Files/raw_files/Vehicles/ - Vehicle certification files

Expected file naming pattern:

  • Operators: ExportTemplate.xlsx, ExportTemplate (1).xlsx, etc.
  • Vehicles: ExportTemplateFleet.xlsx, ExportTemplateFleet (1).xlsx, etc.

Step 2: Data Processing

Run the data processor:

python src/process_audit_files.py

This will:

  1. Copy and rename files to downloads/
  2. Generate Excel reports in Files/DailyAudits/
  3. Create CSV files in Files/processed/
  4. Generate JSON data in reports/

Step 3: Dashboard Generation

Run the dashboard generator:

python -m src.operator_html_generator.main

๐ŸŒ Web Application & Visualization Features

Main Interface

  • Generate Dashboard: Creates new operator analytics dashboard
  • View Dashboard: Opens generated dashboard in new tab
  • Real-time Progress: Live progress updates during generation
  • Loading Screen: Professional loading interface with Orion branding

Dashboard Sections

  1. ๐Ÿ“ˆ Summary Cards - Key metrics overview
  2. ๐Ÿ‘ฅ Operators Table - Smart filterable data table
  3. ๐Ÿ“Š Status Analysis - Multi-perspective analytical dashboard
  4. ๐Ÿ”„ Transitions - Status change tracking
  5. ๐ŸŽฏ Happy Path - Progress metrics and analysis
  6. ๐Ÿ“ˆ Time Series - Historical trend analysis
  7. ๐Ÿงฎ Analytics - Advanced statistical insights
  8. ๐ŸŒ€ Status Flow Visualizations - Sankey, network, violin, treemap, sunburst, timeline, and more

๐Ÿ”ฌ Status Flow Dashboard

The Status Flow Dashboard provides advanced visualizations for operator status transitions and flows, including:

  • Sankey Diagrams
  • Network Graphs
  • Violin Plots
  • Treemaps
  • Sunburst Charts
  • Timelines
  • Statistical Analysis
  • Stream Graphs
  • Chord, Arc, and Flowchart Visualizations

These are available via the console menu, web app, or by running:

python -m src.status_flow_dashboard.main

or by opening the generated HTML files in reports/visualizations/.

Interactive Features

  • ๐Ÿ” Advanced Filtering - Excel-style filters with multiple types
  • ๐Ÿ“ค Export Options - Copy, CSV, Excel, PDF, Print
  • ๐Ÿ“ฑ Responsive Design - Works on desktop, tablet, and mobile
  • ๐ŸŽจ Theme Support - Light/dark theme toggle
  • ๐Ÿ”„ Real-time Search - Instant filtering across all columns

โš™๏ธ Configuration

Division Mapping

The system uses a predefined mapping for file processing:

OPERATOR_FILE_MAPPINGS = {
    "ExportTemplate": "IL",           # Illinois
    "ExportTemplate (1)": "TX",       # Texas
    "ExportTemplate (2)": "CA",       # California
    "ExportTemplate (3)": "FL",       # Florida
    "ExportTemplate (4)": "MI",       # Michigan
    "ExportTemplate (5)": "OH",       # Ohio
    "ExportTemplate (6)": "OR",       # Oregon
    "ExportTemplate (7)": "GA",       # Georgia
    "ExportTemplate (8)": "PA",       # Pennsylvania
    "ExportTemplate (9)": "AutoSync-CHI"  # AutoSync Chicago
}

Status Colors

Status colors and groupings are defined in misc/status_colors.json

๐Ÿ› ๏ธ Development

Adding New Features

  1. Data Preparers: Add new modules in src/operator_html_generator/data_preparers/
  2. Templates: Create new components in src/operator_html_generator/templates/components/
  3. Visualizations: Extend src/status_flow_dashboard/visualizations/

Dependencies

Core dependencies include:

  • Flask - Web application framework
  • Pandas - Data manipulation and analysis
  • Jinja2 - HTML templating
  • OpenPyXL - Excel file processing
  • NumPy - Numerical computing
  • SciPy - Statistical analysis

๐Ÿšจ Troubleshooting

Common Issues

1. Missing Dependencies

pip install -r requirements.txt

2. Data File Not Found

  • Ensure raw files are in Files/raw_files/
  • Check file naming matches expected pattern
  • Run data processing first: python src/process_audit_files.py

3. Port Already in Use

  • Web app runs on port 5000 by default
  • Stop other Flask applications or modify port in web_app.py

4. Import Errors

  • Ensure you're running from the project root directory
  • Check Python path includes src/ directory

Logs

Processing logs are saved in logs/ directory for debugging.

๐Ÿ“‹ Usage Examples

Console Interface

python console_app.py

Direct Processing

# Process raw files
python src/process_audit_files.py

# Generate consolidated data
python src/update_dashboard_with_historical_data.py

# Create HTML dashboard
python -m src.operator_html_generator.main

# Generate status flow dashboard
python -m src.status_flow_dashboard.main

Web Development

# Start in debug mode
FLASK_DEBUG=1 python -m src.operator_html_generator.web_app

๐Ÿ“„ License

This standalone version maintains all functionality from the original OrionTechAudits system while being completely self-contained and portable.

๐Ÿ†˜ Support

For issues or questions:

  1. Check the troubleshooting section above
  2. Review log files in logs/ directory
  3. Ensure all dependencies are properly installed
  4. Verify data files are in correct locations

๐ŸŽ‰ Ready to use! Run python run_dashboard.py to get started.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages