Wrangling eyetracking data
This page is specific to Eyelink data
Last updated
This page is specific to Eyelink data
Last updated
This will walk you through how to get the data off the eyetracker. One key thing to remember when downloading your sample report is that you want to downsample to 50 Hz before you download the data. This will equate to 20ms time bins, which is a great size. It will also ensure that your data file won't be enormously gigantic.
Once you've set up an for your project, put your data into a folder (suggestion: call this folder "data") and then begin a script that's located in a different folder (suggestion: call this folder "scripts"). Then name this script "1_dataprep".
In this script you're going to do the very initial steps involved in getting your data into usable format. In this script, you should:
Rename your columns to be more transparent
Double check that you have all the columns you’ll need and that they contain the data you expect
Create a unique TIMESTAMP column that spans the beginning to the end of the experiment for each participant
Define your interest areas for each trial (e.g left half of screen is target for that trial): you will need to know where your target and distractor images are for each trial (hopefully in your datasource!)
Exclude participants who are being excluded for non-data reasons (e.g. wrong language background, parent pointed at the screen, not paying attention…)
At the end of this script, you should write out a new dataframe that contains all the renamed columns and all the participants who might be usable.
At the start of this script (named "2_cleaning") you should read in the dataframe you saved at the end of your dataprep script (this means you won't have to re-run your dataprep script every time you want to work on the data).
This script is where you'll make data-driven exclusion decisions that are hopefully pre-registered. From here on out, we recommend following the flowcharts and documentation on the webpage.
Your output here should include only trials and participants you plan to analyze.
This script, named "3_analysis", will include all your stats and findings.
This script has all your visualizations in it, and will probably need to source at least one other script in order to get the data. You can optionally add your visualizations at the end of your statistics script.