This repository contains Python code underlying analyses in the paper "Staying and Returning Dynamics of Young Children's Attention", by Kim, Singh, Vales, Keebler, Fisher, & Thiessen.
The below instructions explain the steps needed to reproduce the analyses reported in the paper. All necessary data files needed are included in the repository. These instructions were tested on Ubuntu 16.04, but should be easy to adapt to other *nix systems.
- You will need Python 3.6+.
- Since GitHub has a maximum file size of 100MB, some of the data files have been compressed using
lrzip
. You will needlrunzip
to decompress these files. This can be installed byapt-get install lrzip
. - You should probably initialize and activate a Python virtual environment.
- Install necessary Python modules:
python -m pip install -r requirements.txt
- Navigate to the code directory:
cd analysis_code
- Use
lrzip
to uncompress the data files:
lrunzip \*.lrz
- To run the analyses, run the analysis script:
python staying_and_returning_analysis.py
By default, this will run the analyses of Experiment 1 with gaze data coded by the hidden Markov model. To run the Labeling Dataset analyses of Experiment 2, change Line 17 of staying_and_returning_analysis.py
from _DATASET = 'ORIGINAL'
to _DATASET = 'LABELING'
. To run the Human Coding analyses of Appendix B, change Line 18 of staying_and_returning_analysis.py
from _CODING = 'HMM'
to _CODING = 'HUMAN'
.