A comprehensive eye tracking data analysis platform built with Tauri, SolidJS, and TypeScript. This application analyzes how Cantonese-speaking children understand the word "only" (淨係, 得, 咋) through gaze pattern analysis and Area of Interest (AOI) classification.
This application studies how Cantonese-speaking children understand the word "only" (淨係, 得, 咋) in different sentence structures:
- Szinghai (Subject only): "淨係牛仔拎咗枝鉛筆" / "得牛仔拎咗枝鉛筆" (Only cow took a pencil)
- Vzinghai (Verb only): "牛仔淨係拎咗枝鉛筆" / "牛仔拎咗枝鉛筆咋" (Cow only took a pencil)
Previous research shows Szinghai performs worse than Vzinghai. The experiment uses eye-tracking to validate if children's gaze patterns match their verbal answers.
- Test names: Tx (correct answer expected), Fx (incorrect answer expected), where x = 1,2...
- Subjects: 9 animals (貓仔、豬仔、牛仔、狗仔、馬騮、馬仔、雞仔、兔仔、羊仔)
- Objects: 21 items (水樽、紙巾、火車、香蕉、餅乾、單車、匙羹、鉛筆、口罩、牙膏、蘋果、飛機、較剪、蛋糕、書包、鎖匙、頸巾、雪條、西瓜、枕頭、鑰匙)
- Measure words: 8 types (個、盒、架、隻、塊、枝、把、條)
- Verb: Always "拎咗" (took)
- Only words: 淨係, 得, 咋, or no "only"
- Correct AOI: Object next to the mentioned object (for subject-only sentences)
- Incorrect AOI: Other animals that took the pencil (indicates misunderstanding)
This application processes eye tracking data from the above experiment, providing:
- Real-time gaze data visualization and analysis
- AOI (Area of Interest) classification and comparison
- Participant performance metrics and quality control
- Advanced statistical analysis with bootstrapping and permutation testing
- Multi-test comparison capabilities
- Frontend: SolidJS + TypeScript + Tailwind CSS
- Backend: Tauri (Rust)
- Database: SQLite (eye_tracking.db)
- Charts: Chart.js with custom plugins
- UI Components: Kobalte (headless UI primitives)
The SQLite database (src-tauri/resources/eye_tracking.db) contains:
gaze_data(1.8M rows): Timestamped gaze coordinates with AOI classifications- Columns: Exact time, Gaze point X/Y, Box, Presented Media name, Timeline name, Participant name, Recording name, Test Name
test_catalog(48 rows): Test metadata and AOI definitions- Columns: test_name, sentence, group, self_AOIs, correct_AOIs, potentially_correct_AOIs, incorrect_AOIs, correct_NULL, potentially_correct_NULL, incorrect_NULL, image_path
participants(36 rows): Participant information with QAC flags- Columns: participant (PRIMARY KEY), is_qac (INTEGER NOT NULL)
recordings: Session metadatatest_group: Test grouping information
Tests (stimuli) → Participants → Sessions (Timeline/Recording) → Gaze Points → AOI Classifications
- Real-time gaze point visualization over stimulus images
- Time-series charts showing AOI percentages over time
- Quality filtering based on recording validity percentages
- Playback controls with progressive revelation
- Side-by-side comparison of two test sessions
- Synchronized playback with gaze overlay
- Statistical analysis of AOI performance differences
- Multi-test, multi-participant statistical analysis
- Bootstrap confidence intervals and cluster permutation testing
- Flexible AOI set configuration
- Word window alignment and analysis
- Disable problematic test/participant/recording combinations
- Quality control through selective data exclusion
- Persistent settings via
disabled_slices.json
- QAC Participants: TLK311–TLK320 marked as
is_qac = 0(non-QAC) - Quality Filtering: Recording validity percentages filter out low-quality sessions
- Data Toggle: Manual exclusion of problematic data combinations
Key Tauri commands:
get_participants(): Returns participant table with QAC flagssearch_tests(): Searchable test metadataget_gaze_data(): Filtered gaze data by test/participant/sessionget_box_stats(): AOI percentage statisticsget_timeline_recordings(): Available sessions for test/participant pairs
- Fixed participant selection issues in Advanced Compare
- Added race condition protection to async effects
- Cleaned up debug logging for production
- Enhanced error handling and user feedback
- Improved CSS consistency
- Race condition protection in all async effects
- Proper cleanup of stale requests
- Production-ready logging (debug statements commented out)
- Consistent error handling patterns