Visualizing Eye Tracking Data

When I relearned programming, I was fascinated by the process of constructing data visualizations; You load your data, process it and start plotting, thinking about each element you want to include in your plot. I usually start drafting the idea of a plot on paper then work on creating that on the computer. It is an ongoing learning process that never ends!

While there are different resources on types of data visualizations, I wanted to create an interactive dashboard (see Figure 1) that presents some eye-tracking-specific plots. Keep in mind that, when visualizing data, you’re aggregating or reducing it to what can reasonably fit in a plot. Hence, it’s always a good idea to accompany the visual output with statistical analysis.

A screen shot of the eye tracking data explorer dashboard with embedded link
Eye Tracking Data Explorer Dashboard

The Infamous Heatmap

If you want to get a sense of where people generally focus their attention, this visualization can be useful. It accumulates gaze coordinates from one or more participants, changing its color or intensity where there are more gaze points (or fixations).

This type of visualization does not include any temporal information, or clues as to which gaze points occurred first, unless a dynamic heatmap is used.

A screen shot of a two dimensional heat map typically used for visualizing eye tracking data
Heatmap example of two dimensional data

Areas of Interest (AOI)

This is a more advanced phase in data analysis, because it requires more steps to prepare, namely the selection of certain areas of the stimulus (i.e. AOIs) from which to extract certain metrics. It can be really useful when exploring the data in a more top-down manner, or when we have some assumptions of where people should or could have looked, or when we are presenting the data and trying to tell a story.

Some metrics can be displayed on their corresponding AOIs, like the number of participants who looked at these areas (Total Seen), how many interacted with them (Total Selections) and for how long was each area looked at (Fixation Duration).

A screenshot of areas of interest with tag hover function that shows some area-related metrics
Areas of interest visualization with embedded metrics

Clusters

In some situations, researchers might not have an a priori hypothesis of how the stimulus should be divided, or the stimulus might not be clearly segmented (e.g. consisting of different objects that can have an area of interest each). For this, using clustering, one type of unsupervised machine learning, could help discovering how the data is segmented.

This method can be very helpful during data exploration, and the result can be used for later segmentation of the data and to extract gaze related metrics specific to each cluster.

A visualization of gaze points with four clusters highlighted

Bonus Plot

Recurrence Quantification Analysis (RQA)

Which can be helpful to indicate the amount of gaze points that return to the same areas, either immediately (alternating fixations) or later in time. Some papers (like this one) correlated higher recurrence with more complicated stimuli which can lead to a higher cognitive load. Make sure to check this paper that explains the different metrics on RQA with gaze data.

A screenshot of a recurrence matrix plot
A recurrence matrix plot for fixation data. It is always symmetric and the diagonal line shows that each fixation is recurrent with itself

I will be adding more plots in the future so make sure to keep checking in. If you have questions on this or related topics or need help visualizing your data, feel free to contact me through this form or on social media links below.