Skip to main content

Interactive Streamlit workbench for visualizing eye-tracking-while-reading scanpaths, computing reading measures, and exporting figures and tabular data.

Project description

Scanpath Studio

PyPI Live demo CI License: MIT

An interactive workbench for visualizing eye-tracking-while-reading data. Drop in a trial and see the scanpath the way the reader saw it: words at their true on-screen positions, fixations and saccades layered on top, a density heatmap, side-by-side trial comparisons, and animated replay — all tunable, and all exportable as publication-ready figures.

It is dataset-agnostic (auto-detects EyeLink / Gazepoint / snake-case columns) and ships with a small OneStop demo so you can try it with zero setup.

Authors: Omer Shubi, Keren Gruteke Klein, and others (TBD) — LACC Lab, Technion.

A reading scanpath replayed fixation by fixation

A scanpath replayed fixation by fixation over the text the reader saw (bundled OneStop demo).


Try it

Live demo (zero install): https://scanpath-studio.streamlit.app

Or run locally:

pip install scanpath-studio
scanpath-studio      # launches the app in your browser

What you can visualize

The plot is built from layers you can toggle independently:

  • Text — every word drawn at the exact pixel coordinates the participant saw.
  • Fixations — where the eye paused, sized and colored by any column in your data (duration, GPT-2 surprisal, word frequency, …).
  • Saccades — the jumps between fixations; backward jumps (regressions) stand out.
  • Areas of interest — word bounding boxes that tie each fixation to a word.
  • Heatmap — the trial aggregated into a word-level measure (total fixation duration, fixation count, …).

On top of the layered view:

  • Animated replay — watch the scanpath unfold fixation by fixation, at real or scaled speed; export it as interactive HTML or a self-playing GIF / MP4 clip for slides and papers.
  • Compare two trials — overlaid on one canvas or side-by-side (e.g. ordinary vs. information-seeking reading, first vs. repeated reading, L1 vs. L2).
  • Critical-span highlight — mark a region of interest (e.g. an answer span) by color or border to see at a glance whether it was read.
  • Out-of-text & by-line — flag fixations that land outside every word box, or color fixations by the text line they fall on.
  • Fully customizable — map any field to color, size, or axes; set the plot background (white or a neutral gray); every toggle, palette, and scale is independent.

Two readers of the same paragraph, animated on a shared real-time clock

Overlay a second reading to compare two readers of the same text on a shared real-time clock.


The four tabs

Tab What's there
Interactive Plot The layered scanpath view, trial picker (by trial / text / participant), trial metadata, and two-trial comparison.
Animated Scanpath Frame-by-frame replay; each frame lasts the actual fixation duration ÷ playback speed. Export as interactive HTML, GIF, or MP4.
Raw Data Paginated word, fixation, and raw-gaze tables, each with CSV + Parquet download.
Data Statistics Summary stats (mean fixation duration, saccade amplitude, regression rate, reading speed), a fixation-duration distribution, and a per-word reading-measure bar plot.

The Scanpath Studio app


Reading measures from raw fixations

If your data only carries raw fixations, the app computes the canonical per-word measures itself (pre-aggregated EyeLink columns, if present, take precedence):

Measure Definition
FFD — first fixation duration duration of the first fixation to land on the word
FPRT / gaze duration sum of fixations from first entry until the eye first leaves
RPD / go-past time sum of fixations from first entry until the eye first moves past the word
TFD / dwell sum of all fixations on the word
fixation count, skip, regression in/out, saccade amplitude standard reading-research flags and counts

Definitions follow Rayner (1998) and Inhoff & Radach (1998).


Triage your trials

Filter the trial pool by condition — information-seeking Hunting vs. ordinary Gathering reading, difficulty, first vs. repeated reading, answer correctness — or by your own annotations. Star favorites, tag trials (e.g. "To exclude"), and jot per-trial notes; download everything as a JSON sidecar and restore it in a later session.


Your data

Upload CSV, Parquet, or Feather tables for words/AoIs, fixations, and (optionally) raw gaze. Columns are auto-detected from common EyeLink, Gazepoint, and snake-case conventions; a sidebar Column mapping panel lets you override any guess.

Areas of interest come straight from your word boxes — given as (x, y, width, height) or EyeLink's IA_LEFT/RIGHT/TOP/BOTTOM — the app never invents them. Fixations are tied to words by bounding-box containment (with a small nearest-word fallback); fixations that miss every box are flagged out-of-text.

Bulk export

One panel exports artifacts for every filtered trial into a single zip — per-trial PNG + SVG figures, the exact plot settings (plot_config.json), fixations, and per-word measures, plus aggregated tables across trials. Ideal for paper figures or building an image dataset of scanpaths for vision models.


Run from source

git clone https://github.com/lacclab/scanpath-studio.git
cd scanpath-studio
pip install -e ".[test]"          # or: uv sync
streamlit run streamlit_app.py

Tested on Python 3.11–3.13. Run the tests with pytest; lint with ruff check --exclude other_vis .. See AGENTS.md for an architectural overview.


Citation

A system-demo paper is in preparation — citation TBD. Until then, cite the software via GitHub's "Cite this repository" button (generated from CITATION.cff).

If you use the bundled demo data, please cite the OneStop corpus:

@article{berzak2025onestop,
  title     = {{OneStop}: A 360-Participant {E}nglish Eye Tracking Dataset
               with Different Reading Regimes},
  author    = {Berzak, Yevgeni and Malmaud, Jonathan and Shubi, Omer
               and Meiri, Yoav and Lion, Ella and Levy, Roger},
  journal   = {Scientific Data},
  year      = {2025},
  publisher = {Nature Publishing Group},
  doi       = {10.1038/s41597-025-06272-2},
  url       = {https://www.nature.com/articles/s41597-025-06272-2},
}

The bundled demo is a subset of OneStop Eye Movements, used under its original license (docs).


License

MIT — see LICENSE.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

scanpath_studio-0.16.0.tar.gz (694.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

scanpath_studio-0.16.0-py3-none-any.whl (674.7 kB view details)

Uploaded Python 3

File details

Details for the file scanpath_studio-0.16.0.tar.gz.

File metadata

  • Download URL: scanpath_studio-0.16.0.tar.gz
  • Upload date:
  • Size: 694.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for scanpath_studio-0.16.0.tar.gz
Algorithm Hash digest
SHA256 d64a6d8121445e2706b99dda8a3e1943442da0c2f4c42c89e0ab5ea7168eaa35
MD5 b07bd4833926a084e394e9ce01da8bb8
BLAKE2b-256 bbe4b5d42be894eb5f1ef845f7fbf8144e54dc82a390990ad48894748d0c007b

See more details on using hashes here.

Provenance

The following attestation bundles were made for scanpath_studio-0.16.0.tar.gz:

Publisher: publish.yml on lacclab/scanpath-studio

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file scanpath_studio-0.16.0-py3-none-any.whl.

File metadata

File hashes

Hashes for scanpath_studio-0.16.0-py3-none-any.whl
Algorithm Hash digest
SHA256 10dde4897f9d667ca7d94cdfcc6147b6c408a1fba047f5e3e24be6f6b4725e68
MD5 42c4d44a1b433a62687280c9db134295
BLAKE2b-256 2aa552ce533d074809efe4e1e1ef1d4279759b9bf32bb4c6e9f746e572c4f4ce

See more details on using hashes here.

Provenance

The following attestation bundles were made for scanpath_studio-0.16.0-py3-none-any.whl:

Publisher: publish.yml on lacclab/scanpath-studio

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page