Loading in Data

Author

George Obongo

Load library and data

library(tidyverse)
── Attaching packages ─────────────────────────────────────── tidyverse 1.3.2 ──
✔ ggplot2 3.4.0     ✔ purrr   1.0.1
✔ tibble  3.1.8     ✔ dplyr   1.1.0
✔ tidyr   1.3.0     ✔ stringr 1.5.0
✔ readr   2.1.3     ✔ forcats 1.0.0
── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
✖ dplyr::filter() masks stats::filter()
✖ dplyr::lag()    masks stats::lag()
setwd("/Users/gobongo/Desktop/datasets")
eyetracking <- read_csv("Grid_Anonymized (2).csv")
New names:
Rows: 15372 Columns: 30
── Column specification
──────────────────────────────────────────────────────── Delimiter: "," chr
(7): Study_name, Respondent_Name, Gender, Group, Type, Label, ParentSti... dbl
(23): ...1, Age, Start, Duration, Parent_Stimulus_Start, Parent_Stimulus...
ℹ Use `spec()` to retrieve the full column specification for this data. ℹ
Specify the column types or set `show_col_types = FALSE` to quiet this message.
• `` -> `...1`

Explore the variables

names(eyetracking)
 [1] "...1"                       "Study_name"                
 [3] "Respondent_Name"            "Gender"                    
 [5] "Age"                        "Group"                     
 [7] "Type"                       "Label"                     
 [9] "Start"                      "Duration"                  
[11] "ParentStimulus"             "Parent_Stimulus_Start"     
[13] "Parent_Stimulus_Duration"   "Hit_time_G"                
[15] "Time_spent_G"               "Time_spent_G_Percentage"   
[17] "Respondent_ratio_G"         "Revisit_G_Revisitors"      
[19] "Revisit_G_Visitors"         "Revisit_G_Revisits"        
[21] "TTFF_F"                     "Time_spent_F"              
[23] "Time_spent_F_Percentage"    "Revisit_F_Revisitors"      
[25] "Revisit_F_Visitors"         "Revisit_F_Revisits"        
[27] "Fixations_Count"            "First_Fixation_Duration"   
[29] "Average_Fixations_Duration" "Mouse_Clicks"              

View the head data

head(eyetracking)
# A tibble: 6 × 30
   ...1 Study_name Respo…¹ Gender   Age Group Type  Label  Start Durat…² Paren…³
  <dbl> <chr>      <chr>   <chr>  <dbl> <chr> <chr> <chr>  <dbl>   <dbl> <chr>  
1     0 ECG Study  Reside… MALE       0 resi… Stim… Norm… 178603   30068 <NA>   
2     1 ECG Study  Reside… MALE       0 resi… Stat… V5-1… 178603   30068 Normal…
3     2 ECG Study  Reside… MALE       0 resi… Stat… II-1… 178603   30068 Normal…
4     3 ECG Study  Reside… MALE       0 resi… Stat… V1-1… 178603   30068 Normal…
5     4 ECG Study  Reside… MALE       0 resi… Stat… 1 NSR 178603   30068 Normal…
6     5 ECG Study  Reside… MALE       0 resi… Stat… aVR … 178603   30068 Normal…
# … with 19 more variables: Parent_Stimulus_Start <dbl>,
#   Parent_Stimulus_Duration <dbl>, Hit_time_G <dbl>, Time_spent_G <dbl>,
#   Time_spent_G_Percentage <dbl>, Respondent_ratio_G <dbl>,
#   Revisit_G_Revisitors <dbl>, Revisit_G_Visitors <dbl>,
#   Revisit_G_Revisits <dbl>, TTFF_F <dbl>, Time_spent_F <dbl>,
#   Time_spent_F_Percentage <dbl>, Revisit_F_Revisitors <dbl>,
#   Revisit_F_Visitors <dbl>, Revisit_F_Revisits <dbl>, …
hist(eyetracking$Age)

View plots of fixation count vs. gender

boxplot(eyetracking$Fixations_Count ~ eyetracking$Gender) # this chunk serves a purpose to see if there is a difference in mouse clicks between men and women

# Looking at this plot, it seems that females are conducting a higher amount of fixations as opposed to males.

barplot depicting the number of mouseclicks

barplot(eyetracking$Mouse_Clicks) # in the final doc I want to compare this data to ages to see if there is a correlation between age and # of mouse clicks

hist(eyetracking$Revisit_F_Revisitors)

# Upon looking at the data, I see that there is a higher prevalence of existing fixations (1) on the Area of Interest as opposed to no existing fixation at all (0)