A Flask/Dash-based web application for sensor data visualization and analysis with advanced caching and interactive features.
- Interactive 3D scatter plots for data visualization
- Advanced filtering and color mapping options
- Decay effects for temporal data analysis
- Dual-panel 2D scatter plots (left and right views)
- Synchronized data filtering across multiple views
- Interactive data exploration tools
- Heatmap visualization for correlation analysis
- Histogram analysis with customizable binning
- Parallel categories (parcats) for categorical data
- Violin plots for distribution analysis
- Efficient Data Processing: WebWorker-based caching system for smooth performance
- Multiple File Support: Load and compare multiple datasets simultaneously
- Session Management: Isolated data sessions for concurrent users
- Interactive Controls: Frame navigation, playback controls, and data updates
- Dark/Light Mode: Theme switching for different viewing preferences
- Data Buffering: IndexedDB-based client-side caching for large datasets
- Configuration Persistence: JSON-based configuration management
- Test Case Management: Organized data file and test case selection
- Flask/Dash Server: Main application server with REST API endpoints
- WebWorker Integration: Client-side data management and processing
- Cache Management: Multi-level caching (server + client-side IndexedDB)
- Session Isolation: Independent data sessions for multiple users
- Interactive UI: Modal dialogs for configuration and file selection
- Dynamic Updates: Automatic data refresh and visualization updates
- IndexedDB Storage: Browser-based data persistence and buffering
See requirements.txt for complete list:
- Flask & Dash: Web framework and interactive components
- plotly: Advanced visualization library
- pandas & numpy: Data manipulation and analysis
- flaskwebgui: Desktop application wrapper
- Clone the repository:
git clone https://github.com/rookiepeng/sensorview.git
cd sensorview- Install Python dependencies:
pip install -r requirements.txt- Data Format: Save data as
.pkl(pickle) or.csvfiles - Directory Structure: Organize data under
./datadirectory - Configuration: Create
info.jsonin each test case directory
./data/
├── Example/
│ ├── info.json # Required: Column specifications
│ ├── sensor_data.csv # Data files
│ ├── test_results.pkl # Alternative format
│ └── subfolder/ # Nested data organization
│ └── more_data.csv
└── Another_Test/
├── info.json
└── dataset.pkl
Specify data column mappings, visualization settings, and metadata:
{
"slider": "Frame",
"x_3d": "Latitude",
"y_3d": "Longitude",
"z_3d": "Height",
"x_ref": "Host_Latitude",
"y_ref": "Host_Longitude",
"z_ref": "Height",
"keys": {
"Height": {
"description": "Height (m)",
"decimal": 2,
"type": "numerical"
},
"Longitude": {
"description": "Longitude (m)",
"decimal": 2,
"type": "numerical"
},
"Latitude": {
"description": "Latitude (m)",
"decimal": 2,
"type": "numerical"
},
"Time": {
"description": "Time (s)",
"decimal": 2,
"type": "numerical"
},
"Sensor": {
"description": "Sensor",
"type": "categorical"
},
"Frame": {
"description": "Frame",
"decimal": 0,
"type": "numerical"
},
"Host_Latitude": {
"description": "Ref Latitude (m)",
"decimal": 2,
"type": "numerical"
},
"Host_Longitude": {
"description": "Ref Longitude (m)",
"decimal": 2,
"type": "numerical"
}
}
}Configuration Parameters:
- slider: Column to use for frame navigation/time slider
- x_3d, y_3d, z_3d: Default columns for 3D visualization axes
- x_ref, y_ref, z_ref: Reference point columns for 3D visualization
- keys: Column definitions with metadata:
- description: Human-readable column description
- decimal: Number of decimal places for numerical display
- type: Data type ("numerical" or "categorical")
python app.pySet DEBUG = True in app.py for development with hot reload.
python app.pyThe application will launch as a desktop application using FlaskWebGUI.
Uncomment the Waitress server lines in app.py for production deployment:
from waitress import serve
serve(app.server, listen="*:8000")- Data Path Selection: Choose root directory for data files
- Test Case Selection: Pick from available test cases
- File Selection: Select specific data files to analyze
- Settings Persistence: Automatic configuration saving
- Frame Navigation: Manual frame selection or automatic playback
- View Customization: Toggle between different visualization modes
- Color Mapping: Customizable color schemes and mappings
- Filtering: Interactive data filtering and selection
- Multi-file Comparison: Load multiple files for comparative analysis
- Automatic Caching: Server and client-side data buffering
- Session Management: Isolated data sessions
- Dynamic Updates: Automatic data refresh and synchronization
- Performance Optimization: IndexedDB storage for large datasets
The application uses a modular callback system with separate modules for different views:
test_case_view: Test case managementcontrol_view: Playback and navigation controlsscatter_3d_view: 3D visualization callbacksscatter_2d_left_view&scatter_2d_right_view: 2D visualization panelsheatmap_view: Statistical heatmap visualizationhistogram_view: Distribution analysisparcats_view: Parallel categories visualizationviolin_view: Violin plot analysis
The application includes several client-side callback functions for:
- WebWorker initialization and management
- IndexedDB data storage and retrieval
- Dynamic figure updates and buffering
- Performance optimization
GPL-3.0 License - see LICENSE file for details.
Contributions are welcome! Please feel free to submit pull requests or open issues for bugs and feature requests.


