Interactive dashboard for ORTHO game session data — trajectory visualization, kinematics processing, and game analysis.
Public code-only mirror in the DIMS-network, forked from bots-viewer. It ships no datasets (no
ortho.db, no session/timeseries data) and the multi-agent simulation module has been excluded. Buildortho.dbfrom your own data viaimport_data.sh(see Quick Start).
- 1,049 game tracks, 292k trajectory points
- Sessions metadata: team name, date, participant ages, companionship, duration
- Track‑level data: difficulty level, completion status, mistakes, timing
- Processed kinematics: vx, vy, speed, acceleration per point (computed lazily)
- Sidebar filters: team name, date range, age X/Y sliders, companionship
- Session table: click to select a game; "Processed" column shows kinematics status
- Lazy processing: first time you select a session → vx, vy, speed, acceleration computed and stored → instant on revisit
- Four tabs:
- Session Info – metadata, participant details, performance stats
- Tracks Timeline – horizontal Gantt bars (green=completed, red=mistake, orange=active)
- Trajectory – X,Y scatter plot; single‑track view colors points by speed (Plasma colorscale)
- Kinematics – four‑row subplot: speed | Vx | Vy | acceleration over time (all tracks overlaid)
ortho_db.py–OrthoDatabaseclass (CRUD + kinematics processing API)importer.py– JSON importer for ORTHO‑Data.json (Sessions_List/Track_Resultsformat)schema.sql– full SQLite schema (sessions, game_tracks, trajectories, kinematics, session_stats, …)
cd /home/m11/codes/DIMS_ORTHO_VIEWER
# Option A: Using the bash script (recommended)
./import_data.sh
# Option B: Using Python script directly
python import_data.py --db ortho.db
# Option C: Using the original importer
python importer.py --db ortho.db --json logs/ORTHO-Data.json./run.sh # defaults to port 8050
# or
python3 app.py --db ortho.db --port 80503. Open Browser: http://localhost:8050
- Filter sessions with the left‑sidebar controls
- Click a row in the session table to select a game
- First selection triggers kinematics computation (≈1‑2 sec)
- Navigate tabs to see trajectory, speed, acceleration plots
ORTHO‑Data.json (CNK‑ORTHO logs)
↓ (importer.py)
SQLite ortho.db (raw trajectories)
↓ (on first session select)
Kinematics table (vx, vy, speed, acceleration)
↓ (Dash callbacks)
Interactive visualizations
| Table | Description | Key Fields |
|---|---|---|
sessions |
Per‑session metadata | session_id, date, team_name, age_x, age_y, companionship_x, companionship_y |
game_tracks |
Level attempts | track_key, session_id, level_seq, difficulty_level, completed, mistake |
trajectories |
Raw X,Y positions | traj_id, session_id, track_key, point_x, point_y, timestamp_ms |
kinematics |
Computed velocities | session_id, track_key, timestamp_ms, vx, vy, speed, acceleration |
session_stats |
Cached aggregates | session_id, total_levels_attempted, total_mistakes, avg_speed |
| Table | Purpose | Analysis Type |
|---|---|---|
rqa_results |
Recurrence Quantification Analysis | Nonlinear dynamics |
crqa_results |
Cross‑Recurrence Quantification Analysis | Coordination between variables |
crosswavelet_results |
Wavelet coherence analysis | Time‑frequency coordination |
The system includes comprehensive analysis tools in analysis.py:
-
Recurrence Quantification Analysis (RQA)
- Recurrence rate, determinism, laminarity, divergence, entropy
- Automatic threshold selection for target recurrence rates
- Sparse matrix storage for efficiency
-
Cross‑Recurrence Quantification Analysis (cRQA)
- Coordination analysis between different variables (e.g., vx vs vy)
- Measures of synchronous behavior in dyadic interaction
-
Cross‑Wavelet Analysis
- Time‑frequency coherence between signals
- Phase synchronization analysis
- Significance testing against surrogate data
- Requires
pycwtpackage (optional)
- Lazy Processing: Kinematics computed only when first accessed, then cached
- Foreign Key Constraints: Ensures data integrity across tables
- Comprehensive Indexing: Optimized for common query patterns
- View Abstraction: Pre‑defined views for common analytical queries
- Schema Evolution: Migration system for adding new analysis tables
The docs/ directory contains a client-side DIMS dashboard for in-depth visualization of ORTHO games with eye-tracking data. This is a separate module that provides:
- Multi-perspective video visualization (wide, parent, child camera angles)
- Eye-tracking data integration with gaze visualization
- Advanced analyses: RQA (Recurrence Quantification Analysis) for gaze data
- Cross-wavelet analysis for velocity components
- Trajectory visualization with game path overlays
- Time-series synchronization across multiple modalities
From the main ORTHO Explorer app:
- Click the "🚀 Launch Detailed Dashboard" button in the sidebar
- The dashboard opens in a new browser tab
- If a session is selected, it will be passed to the detailed dashboard
| Feature | Description |
|---|---|
| Video Visualization | Multiple camera perspectives with synchronized playback |
| Eye-Tracking | Gaze data visualization and RQA analysis |
| Trajectory Overlay | Game path visualization on video frames |
| Time-Series Plots | Synchronized plots of velocity, gaze, and other metrics |
| RQA Analysis | Recurrence Quantification Analysis for nonlinear dynamics |
| Cross-Wavelet | Time-frequency coherence analysis between signals |
docs/
├── index.html # Main dashboard HTML
├── config.json # Dashboard configuration
├── css/reset.css # Styles
├── js/app.js # Main application logic
├── js/video-component.js # Video player component
├── optional_step_RQA.py # RQA analysis script
├── optional_step_crosswavelet.py # Cross-wavelet analysis script
├── run_all_steps.sh # Batch processing script
└── assets/ # Data assets
├── videos/ # Video files
├── images/ # Game path images
├── timeseries/ # CSV time-series data
└── transcripts/ # Video transcripts
cd /home/m11/codes/DIMS_ORTHO_VIEWER/docs
# Open in browser
open index.html # macOS
xdg-open index.html # Linux
start index.html # Windows
# Or run via Python HTTP server
python3 -m http.server 8000
# Then open: http://localhost:8000DIMS_ORTHO_VIEWER/
├── app.py # Main Dash dashboard application
├── ortho_db.py # Core database class (CRUD + kinematics)
├── ortho_db_new.py # Extended database with advanced analyses
├── analysis.py # RQA, cRQA, cross‑wavelet analysis functions
├── importer.py # JSON → SQLite data importer
├── import_data.py # Simple data import script (Python)
├── import_data.sh # Data import script (Bash)
├── schema.sql # Complete database schema (15+ tables)
├── ortho.db # Pre‑populated database (104 sessions) - NOT in git
├── run.sh # Application launcher script
├── requirements.txt # Python dependencies
├── module.yaml # DIMS plugin metadata
├── DATA_STRUCTURE.md # Detailed data format documentation
├── IMPLEMENTATION_PLAN.md # Project architecture and roadmap
├── README.md # This file
├── .gitignore # Git ignore rules (excludes *.db, logs_*.csv, etc.)
├── logs/ # ORTHO data files (tracked in git)
│ ├── ORTHO-Data.json # Complete JSON data
│ ├── ORTHO-Data.csv # Complete CSV data
│ ├── ORTHO-Data-Light.csv # Lightweight CSV
│ └── ORTHO-DataFrame.json # DataFrame JSON
├── docs/ # Detailed DIMS dashboard with eye-tracking
│ ├── index.html # Main dashboard HTML
│ ├── config.json # Dashboard configuration
│ ├── ReadMe.MD # Dashboard documentation
│ ├── css/reset.css # Styles
│ ├── js/app.js # Main application logic
│ ├── js/video-component.js # Video player component
│ ├── optional_step_RQA.py # RQA analysis script
│ ├── optional_step_crosswavelet.py # Cross-wavelet analysis
│ ├── run_all_steps.sh # Batch processing script
│ └── assets/ # Data assets (videos, images, timeseries)
└── agents/ # Multi‑agent simulation system
├── ortho_two_agents.py # Main simulation with live reward editor
├── ortho_agent.py # Abstract base agent + Q‑learning
├── ortho_engine.py # Game engine and physics
├── ortho_renderer.py # Visualization layer
├── ortho_runner.py # Experiment runner
├── ortho_data_analysis.py # Post‑experiment analysis
├── ortho_unsupervised_agent.py # Self‑supervised variant
├── visualize_ortho_path.py # Path visualization
├── README.md # Agent system documentation
├── games_config.json # Game scenario configurations
└── Paths/ # Pre‑defined maze paths (JSON)
├── path1_spiral.json
├── path2_s_curve.json
└── ...
conda activate dims
pip install dash plotly pandas numpy # For dashboard
pip install pygame numpy # For agent simulations- New Analysis Modules: Extend
OrthoDatabaseclass and add new tabs inapp.py - New Agent Strategies: Inherit from
BaseAgentinagents/ortho_agent.py - New Visualization Types: Add callback functions in
app.pywith new plot layouts - Database Schema Updates: Modify
schema.sqland implement migrations inortho_db.py
- Original ORTHO logs:
/home/m11/codes/DIMS_CORE/ortho/ORTHO‑logs‑Herman/ - CNK‑ORTHO dataset: 104 sessions, 1,049 tracks, 292k trajectory points
- No gaze data included (Herman logs lack eye‑tracking recordings)
- Participant Labels: X_axis and Y_axis are arbitrary labels, NOT fixed roles (parent/child)
- Coordinate System: Integer grid positions (0‑1800 pixels), velocity in "units per second"
- Date Handling: Stored as
YYYYMMDDstrings; filters convert toYYYY‑MM‑DD - Lazy Processing: Kinematics computed only when first accessed, then cached
- Performance: ~1‑2 seconds for initial kinematics computation per session
-
Database Connection Errors
# Check if database file exists ls -la ortho.db # Recreate from schema if needed rm ortho.db sqlite3 ortho.db < schema.sql
-
Missing Dependencies
# Install all requirements pip install -r requirements.txt # For agent simulations pip install pygame numpy
-
Port Already in Use
# Use a different port python app.py --port 8051 # Find and kill process using port 8050 lsof -ti:8050 | xargs kill -9
-
Agent Simulation Issues
- Ensure
pygameis installed:pip install pygame - Check Python version (requires 3.8+)
- Verify display is available for PyGame (or use headless mode)
- Ensure
To import new ORTHO session data:
python -c "
from importer import import_json_to_db
import_json_to_db('ORTHO-Data.json', 'ortho.db')
"This project supports research on:
- Interpersonal coordination in dyadic gameplay
- Embodied cognition through tabletop interaction
- Movement synchrony analysis using RQA and cross‑wavelet methods
- Multi‑agent coordination emergence in split‑control tasks
- Mathematics education through embodied design (ORTHO project)
Based on the ORTHO research:
Potega vel Żabik, K., Abrahamson, D., & Iłowiecka‑Tańska, I. (2024).
It Takes Two to OЯTHO: A Tabletop Action‑Based Embodied Design for the Cartesian System.
Digital Experiences in Mathematics Education, 10, 189–201.
- Gaze Data Integration: Incorporate eye‑tracking data from available sessions
- Real‑time Analysis: Stream processing for live data visualization
- Machine Learning: Predictive models for coordination success
- Extended Agent Models: Deep reinforcement learning agents
- Multi‑modal Analysis: Combine movement, gaze, and audio data
- DIMS Core: Full integration with DIMS dashboard ecosystem
- ELAN Export: Direct export to ELAN annotation format
- MATLAB/EEGLAB: Compatibility with neuroscience analysis pipelines
- Open Science: Data sharing formats for reproducibility
Repo: github.com/mikub97/DIMS_ORTHO_VIEWER (private)
Local path: /home/m11/codes/DIMS_ORTHO_VIEWER/
Live: http://localhost:8050 (when running)