pupil labs is awesome

Pupil Labs detects your pupil size and gaze position pretty well, and lets you export excessively granular data. Here’s a map of my tracked gaze as I got a tutorial from Cristobal:

According to the Thinking, Fast and Slow chapter I read last week, pupil dilation correlates with the exertion of mental effort. With this in mind, I decided to do another reading experiment in two vastly different environments: 1) on the floor on pb&j day, and 2) alone at home. I was particularly interested to see my eye movements, as my recently developed deficit in attention requires me to read sentences, and even entire paragraphs, multiple times after realizing that I’ve looked at the words without actually processing them in the slightest.

Here’s the map of my eye movements in the second environment:

Looks cool, but is not very informative, so I decided to throw together a quick p5 sketch (with d3 support) to animate the movements over time, and add in the corresponding diameter data.

Here’s a new visualization with the same at-home dataset:

And here’s one for pb&j day:

So the image positioning for both are eyeballed, but it’s pretty clear by the density of the movement data for the latter set that sitting next to the pb&j cart between classes upsets my concentration, and forced me to reread the same lines an embarrassing number of times. Pupil diameter (concomitantly encoded in the position tracking lines, as well as supplementally represented with the circles the lower-right corner) was also on average larger at school than in my quiet home environment, suggesting that more effort was required at the former.

That is, if you can ignore the extremely anomalous data that came in at the end of the at-home dataset, which explains the huge circle left behind in the supplemental diameter visualization.

I tried uploading the sketches to gist, and you can try loading the at-home viz here, but the huge dataset will probably cause the browser to freeze at some point. Will try to clean up the data later and re-upload.

2 thoughts on “pupil labs is awesome

  1. Hi Jenna, Thanks for sharing this. I was wondering if you can explain to me how you were able to visualize the data you collected from your Pupil Labs recording?

    1. Hey Marc!

      So when you export a recording, you’ll get two enormous CSV files: gaze_positions.csv and pupil_cleanup.csv. I used python to create new CSVs that only included the columns I was interested in (gaze_point_3d_x and gaze_point_3d_y from the former, and diameter_3d from the latter). I used d3 to load these files to the webpage, but used p5 to do the actual visualization, as its looping draw() function makes animation effortless.

      Let me know if you have any specific questions, but the code can be found here: https://bl.ocks.org/xujenna/6a0c20affcda7335bc0ef84d8d5b70c0

Leave a Reply

Your email address will not be published. Required fields are marked *