Statistical analysis of tool window usage patterns in IDE environments.
This project analyzes user behavior with IDE tool windows, investigating whether there's a meaningful difference in how long tool windows stay open depending on whether they were opened manually (via shortcuts, menus, icons) or automatically (triggered by events like debugging or test failures).
The analysis processes real-world event logs, handles messy data, reconstructs usage episodes, and performs rigorous statistical testing to determine if observed differences are significant.
Analyze tool window usage data to determine if there's a statistically significant difference in session duration between manual and automatic opening methods.
Event log tracking tool window activity with the following fields:
user_id- Anonymized user identifiertimestamp- Event time in epoch millisecondsevent- Either "opened" or "closed"open_type- "manual" or "auto" (only present on open events)
Real-world data includes:
- Close events without prior open
- Multiple opens in a row
- Opens without matching closes
- Out-of-order timestamps
- Missing or null values
- Code: Python pipeline with clear setup/run instructions
- Analysis Summary: PDF report documenting approach, assumptions, data handling, and findings
- Data Loading: Efficient CSV import to SQLite with multithreading
- Data Cleaning: Robust anomaly detection and filtering
- Episode Reconstruction: Smart open/close event matching per user
- Statistical Analysis:
- Descriptive statistics (mean, median, std, quartiles)
- Mann-Whitney U test (non-parametric group comparison)
- Cliff's Delta effect size measurement
- Visualization: Automated plot generation (histograms, box plots, comparison charts)
- Web Dashboard: FastAPI-based interactive results viewer
- Python 3.12+
- SQLite3 - Local data storage
- scipy - Statistical tests
- matplotlib - Data visualization
- FastAPI + Jinja2 - Web interface
- Docker - Containerized deployment
- Docker 20.10+
- Docker Compose 2.0+
- Python 3.12+
- pip
- SQLite3
Place your CSV file in the data/ directory:
cp your_toolwindow_data.csv data/toolwindow_data.csvmake allThis will:
- Build Docker images
- Initialize SQLite database
- Load and clean data
- Perform statistical analysis
- Generate plots
- Start web dashboard
- Web Dashboard: http://localhost:8000
- Plots: Check
./plots/directory - Database:
./database/toolwindow.db
make build # Build Docker images
make init-db # Initialize database only
make run # Run analysis pipeline
make web # Start web dashboard
make all # Run complete pipeline
make logs # View container logs
make clean # Remove containers and volumes
make stop # Stop running containerspip install -r requirements.txt# Create database and tables
sqlite3 database/toolwindow.db < database/toolwindow.sqlcp your_data.csv data/toolwindow_data.csv# Set environment variables (optional)
export CSV_PATH=./data/toolwindow_data.csv
export DB_PATH=./database/toolwindow.db
export MAX_DURATION=720
export WORKERS_COUNT=4
# Run pipeline
python run.pyuvicorn src.web:app --host 0.0.0.0 --port 8000Environment variables (optional, with defaults):
| Variable | Default | Description |
|---|---|---|
CSV_PATH |
./data/toolwindow_data.csv |
Input CSV file path |
DB_PATH |
./database/toolwindow.db |
SQLite database path |
MAX_DURATION |
720 |
Max episode duration (minutes) |
WORKERS_COUNT |
4 |
Number of worker threads |
BATCH_SIZE |
100 |
Database batch insert size |
LOG_LEVEL |
INFO |
Logging level |
Create .env file in project root to customize:
CSV_PATH=/app/data/toolwindow_data.csv
MAX_DURATION=720
WORKERS_COUNT=4
LOG_LEVEL=DEBUGToolWindowData/
├── run.py # Main pipeline entry point
├── Dockerfile # Docker image definition
├── docker-compose.yml # Multi-container orchestration
├── Makefile # Convenience commands
├── requirements.txt # Python dependencies
├── src/
│ ├── loader.py # CSV → SQLite import
│ ├── janitor.py # Data cleaning & anomaly detection
│ ├── science.py # Statistical analysis
│ ├── web.py # FastAPI web application
│ ├── resolver.py # Environment configuration
│ └── logger.py # Logging setup
├── data/
│ └── toolwindow_data.csv # Input data (user-provided)
├── database/
│ ├── toolwindow.sql # Database schema
│ └── toolwindow.db # SQLite database (generated)
├── plots/ # Generated visualizations
│ ├── histogram.png
│ ├── boxplot.png
│ └── comparison.png
└── templates/ # HTML templates for web
├── analysis.html
└── error.html
Raw events loaded from CSV:
id- Auto-increment primary keyuser_id- User identifiertimestamp- Event time (milliseconds)event- 'opened' or 'closed'type- 'manual', 'auto', or NULL
Clean episode records after filtering:
id- Episode identifiertype- 'manual' or 'auto'start- Opening timestampend- Closing timestampopen_event_id- Reference to events tableclose_event_id- Reference to events table
Filtered anomalous events with reason:
- Same fields as
eventstable detail- Anomaly type (e.g., 'missing_close', 'duplicate_open')
- Import CSV with multithreaded processing
- Validate and normalize event types
- Store raw events in SQLite
- Match open/close pairs per user chronologically
- Filter anomalies:
- Missing opens/closes
- Duplicate opens
- NULL types
- Negative durations
- Duration exceeds threshold
- Store clean episodes and anomalies separately
- Calculate duration statistics for manual/auto groups
- Perform Mann-Whitney U test (non-parametric, no normality assumption)
- Compute Cliff's Delta effect size
- Generate visualizations
- Web dashboard with interactive charts
- Downloadable plots
- Detailed statistics and confidence measures
The analysis provides:
- Descriptive Statistics: Mean, median, standard deviation, quartiles for both groups
- Statistical Test: Mann-Whitney U test p-value (significance threshold: 0.05)
- Effect Size: Cliff's Delta magnitude (small: 0.15, medium: 0.33, large: 0.47)
- Visualizations: Distribution comparison, box plots, histograms
This project is provided for educational and analysis purposes.
Developed as part of IDE tool window usage analysis task.