Supplementary data for the paper Berge S. H., De Winter, J. C. F., Dodou, D., Pooyan Afghari, A., Papadimitriou, E., Reddy, N., Dong, Y., Raju, N., & Farah, H. (2024). Understanding cyclists’ perception of driverless vehicles through eye-tracking and interviews. Transportation Research Part F. https://doi.org/10.1016/j.trf.2024.11.015

* read_and_process.m					MATLAB script that produces all figures and analyses.
* yoloresults/yoloresults_Pxx_Session_y_Round_z.mat	MATLAB data files with bounding box dimensions, coordinates, labels, and confidence scores per video frame (only frames surrounding the cyclist-car interaction were analysed).
* Tobii 3/Tobii 3 - eye - Participant xx Session y.mat	MATLAB data files with eye-tracking data (filtered and unfiltered x and y coordinates and pupil diameter) per video frame.
* Landmarks.xlsx					Excel file with manual annotations of video frames for nine landmarks identified in the eye-tracking videos, participants’ utterances about the letters and the driver’s presence, and the driver's presence based on the experimental protocol.
* fixgaps.m						MATLAB function that linearly interpolates eye gaze data in case of blinks.
* findInSorted.m					MATLAB function that performs a fast binary search replacement for ismember(A,B) for the special case where the first input argument is sorted. Source: Daniel Roeske (2016).
* createHeatmaps.m					MATLAB function that creates heatmaps.
* customcolormap.m					MATLAB function for a customised colorbar. Source: Víctor Martínez-Cagigal (2022).

* determine_angular_distance.m				MATLAB script that determines the minimum angular distance of the cyclist's gaze to the bounding box of the car (angular_distance_to_car_min), the coordinates of the bounding box (CX, CY) that are the closest to the cyclist's gaze, and the angular height of the bounding box of the car (height_bb).
* determine_angular_distance_pedestrian.m		MATLAB script that determines the minimum angular distance of the cyclist's gaze to the bounding box of the experimenter holding the sign for the letter-reading task (angular_distance_to_pedestrian_min), the coordinates of the bounding box (CX, CY) that are the closest to the cyclist's gaze, and the angular height of the bounding box of the experimenter (height_bb).

* ttest_output.m					MATLAB function that performs a paired-samples t-test on two vectors and outputs the result in a string with means, SD, t, and p values.
* video_stats.mat					MATLAB data file with video statistics (number of frames, frame rate, current playback time, video width, video height, and total duration) for each interaction.
* Participant data for statistical comparisons.xlsx	Excel file with the following sheets:
							(1) Participants' demographics from the post-experiment questionnaire`s and gaze and speed data per participant, per session and per trial.
							(2) Percentage looking at vehicle per participant per session, for 12 distance intervals.

InterviewAPI/
* InterviewAPI.m					MATLAB script that inputs the interview transcripts to the GPT-4 API for analysis.
* GPT-4/Interview_API_transcript_no_x_prompt_no_y.mat	MATLAB data files with the prompts that were input to the GPT-4 API and the corresponding responses from GPT-4.
* Interview analysis full.xlsx				Excel file with the following sheets:
							(1) Comparison of manually versus automatically created summaries of the interviews of the first 15 participants of Session 1. Used as verification for the automated summarisation.
							(2) Manual counts from the interview transcripts of the number of participants who 
							    (i) did not mention that a driver was absent; 
							    (ii) mentioned that a driver was absent; 
							    (iii) did not mention the notion of a driver.
							(3) Interview transcripts. The audio was transcribed in clean verbatim by Amberscript and checked manually to correct the interviewer and interviewee identification.
* InterviewAPI_duration_extraction.m			MATLAB script that calculates the average duration of the interviews after Session 1 and after Session 2, based on the timestamps in the transcribed interviews as presented in Interview analysis full.xlsx.

Note
The MATLAB scripts were tested using MATLAB R2024a.

References
Martínez-Cagigal, V. (2022). Custom Colormap. MATLAB Central File Exchange. https://www.mathworks.com/matlabcentral/fileexchange/69470-custom-colormap
Roeske, D. (2016). findInSorted. GitHub. https://github.com/danielroeske/danielsmatlabtools/blob/master/matlab/data/findinsorted.m