Email : sabrina.amelia@student.matanauniversity.ac.id
RPubs : https://rpubs.com/sabrinayose
Github : https://github.com/sabrinayose
Jurusan : Teknik Informatika
Address : ARA Center, Matana University Tower
Jl. CBD Barat Kav, RT.1, Curug Sangereng, Kelapa Dua, Tangerang, Banten 15810.
Exploratory Data Analysis
library(readr) # interface the dataset
df= read_csv("Data/students.csv") # import the data set
spec(df)## cols(
## ID = col_double(),
## Gender = col_character(),
## Grade = col_double(),
## Horoscope = col_character(),
## Subject = col_character(),
## IntExt = col_character(),
## OptPest = col_character(),
## ScreenTime = col_double(),
## Sleep = col_double(),
## PhysActive = col_double(),
## HrsHomework = col_double(),
## SpendTime1 = col_character(),
## SpendTime2 = col_character(),
## Self1 = col_character(),
## Self2 = col_character(),
## Career = col_character(),
## Superpower = col_character()
## )
#str(df) # check data structure if you wan to
apply(is.na(df),2, which) # check NA`s in data frame## $ID
## integer(0)
##
## $Gender
## integer(0)
##
## $Grade
## integer(0)
##
## $Horoscope
## integer(0)
##
## $Subject
## [1] 95
##
## $IntExt
## integer(0)
##
## $OptPest
## integer(0)
##
## $ScreenTime
## integer(0)
##
## $Sleep
## integer(0)
##
## $PhysActive
## [1] 146
##
## $HrsHomework
## integer(0)
##
## $SpendTime1
## integer(0)
##
## $SpendTime2
## integer(0)
##
## $Self1
## [1] 95 147
##
## $Self2
## [1] 95
##
## $Career
## [1] 97 100
##
## $Superpower
## [1] 30 42 60 113 123 153 163 185
df<-na.omit(df) # remove missing value
head(df,3) # just to view 3 rows of your data## # A tibble: 3 x 17
## ID Gender Grade Horoscope Subject IntExt OptPest ScreenTime Sleep
## <dbl> <chr> <dbl> <chr> <chr> <chr> <chr> <dbl> <dbl>
## 1 1 male 4 Scorpio Math Extravert Optimist 1 7
## 2 2 female 4 Capricorn Gym Extravert Optimist 1 8
## 3 3 male 4 Taurus Math Introvert Optimist 4 9
## # ... with 8 more variables: PhysActive <dbl>, HrsHomework <dbl>,
## # SpendTime1 <chr>, SpendTime2 <chr>, Self1 <chr>, Self2 <chr>, Career <chr>,
## # Superpower <chr>
Cat1 <- table(df$Gender) # count the frequencies
Cat1 ##
## Don't Identify female male
## 2 85 85
Cat4 <- table(df$Horoscope) # count the frequencies
Cat4 ##
## Aquarius Aries Cancer Capricorn Gemini Leo
## 10 21 18 13 14 16
## Libra Pisces Sagittarius Scorpio Taurus Virgo
## 11 15 10 17 14 13
Cat5 <- table(df$Subject) # count the frequencies
Cat5 ##
## Art Gym History Math Science
## 36 64 7 40 25
Cat6 <- table(df$IntExt) # count the frequencies
Cat6 ##
## Don't Know Extravert Introvert
## 34 91 47
prop.table(table(df$Gender)) ##
## Don't Identify female male
## 0.01162791 0.49418605 0.49418605
library(readr) # interface the dataset
library(dplyr) # for data manipulation
library(magrittr) # for data manipulation similar to dplyr
Cat2<- df %>% # load the data
select(Gender, Horoscope) %>% # select vectors into matrix and inspect
table() # count frequencies of bivariate combinations
#prop.table() # use proportion table if you want to
Cat2 ## Horoscope
## Gender Aquarius Aries Cancer Capricorn Gemini Leo Libra Pisces
## Don't Identify 0 1 0 0 0 0 1 0
## female 2 9 11 6 6 11 5 9
## male 8 11 7 7 8 5 5 6
## Horoscope
## Gender Sagittarius Scorpio Taurus Virgo
## Don't Identify 0 0 0 0
## female 6 7 6 7
## male 4 10 8 6
Cat3 <- df %>% # load the data
select(Gender, Horoscope, Subject) %>% # select vectors into matrix and inspect
#table() # a machine readable table
#prop.table() # use proportion table if you want to
ftable() # human readable table
Cat3 ## Subject Art Gym History Math Science
## Gender Horoscope
## Don't Identify Aquarius 0 0 0 0 0
## Aries 0 0 1 0 0
## Cancer 0 0 0 0 0
## Capricorn 0 0 0 0 0
## Gemini 0 0 0 0 0
## Leo 0 0 0 0 0
## Libra 1 0 0 0 0
## Pisces 0 0 0 0 0
## Sagittarius 0 0 0 0 0
## Scorpio 0 0 0 0 0
## Taurus 0 0 0 0 0
## Virgo 0 0 0 0 0
## female Aquarius 0 2 0 0 0
## Aries 3 4 1 1 0
## Cancer 4 4 0 1 2
## Capricorn 2 3 0 1 0
## Gemini 1 2 0 1 2
## Leo 2 3 1 3 2
## Libra 1 0 0 3 1
## Pisces 3 3 0 2 1
## Sagittarius 1 1 0 1 3
## Scorpio 3 1 0 2 1
## Taurus 4 2 0 0 0
## Virgo 0 1 1 2 3
## male Aquarius 3 3 0 1 1
## Aries 1 3 0 4 3
## Cancer 0 5 1 1 0
## Capricorn 1 5 0 1 0
## Gemini 0 4 1 2 1
## Leo 3 1 0 0 1
## Libra 1 3 0 1 0
## Pisces 0 2 0 2 2
## Sagittarius 0 1 0 3 0
## Scorpio 1 6 0 1 2
## Taurus 0 2 1 5 0
## Virgo 1 3 0 2 0
Quan <- df %>%
select_if(is.numeric) # select only numeric columns
names(Quan) # check the names of Quantitave variables## [1] "ID" "Grade" "ScreenTime" "Sleep" "PhysActive"
## [6] "HrsHomework"
Mean
mean(Quan$Grade) # average of `Grade`## [1] 5.767442
Quantile
quantile(Quan$Grade) # quantile of `Grade`## 0% 25% 50% 75% 100%
## 3 5 6 7 8
Median
median(Quan$Grade) # median of `Grade`## [1] 6
Mode
mode(Quan$Grade) # Mode of `Grade`## [1] "numeric"
Summary
summary(Quan) # basic summary statistics in one function ## ID Grade ScreenTime Sleep
## Min. : 1.00 Min. :3.000 Min. : 0.000 Min. : 2.000
## 1st Qu.: 45.75 1st Qu.:5.000 1st Qu.: 1.000 1st Qu.: 8.000
## Median : 89.50 Median :6.000 Median : 2.500 Median : 9.000
## Mean : 91.58 Mean :5.767 Mean : 2.968 Mean : 8.608
## 3rd Qu.:137.25 3rd Qu.:7.000 3rd Qu.: 4.000 3rd Qu.:10.000
## Max. :184.00 Max. :8.000 Max. :18.000 Max. :12.000
## PhysActive HrsHomework
## Min. : 0.00 Min. : 0.000
## 1st Qu.: 6.00 1st Qu.: 1.000
## Median : 9.00 Median : 3.000
## Mean :11.80 Mean : 4.142
## 3rd Qu.:13.25 3rd Qu.: 6.000
## Max. :82.00 Max. :35.000
Variance
var(Quan$Grade) # Variance of `Grade`## [1] 1.957296
Standar Deviation
sd(Quan$Grade) # Standard Deviation of `Grade`## [1] 1.399034
Median Absolute Deviation
mad(Quan$Grade) # the Median Absolute Deviation of `Grade`## [1] 1.4826
Inter Quantile Range
IQR(Quan$Grade) # Inter Quantile Range## [1] 2
library(e1071) # load e1071
skewness(Quan$Grade) # apply the `skewness` function## [1] 0.2625807
kurtosis(Quan$Grade) # apply the `kurtosis` function## [1] -1.048464
Covariance
cov(Quan$Grade,Quan$Sleep) # apply the `cov()` function## [1] -0.7263022
Pearson’s Correlation Coefficient
cor(Quan$Grade,Quan$Sleep) # apply the `corr()` function## [1] -0.3412488
Z-Score
zscore=(Quan$Grade-mean(Quan$Grade))/sd(Quan$Grade) # z-score manualSample Covariance Matrix
cov(Quan) # apply the `cov()` function## ID Grade ScreenTime Sleep PhysActive
## ID 2897.976710 2.7545220 4.807987 -6.2523290 25.2957296
## Grade 2.754522 1.9572963 1.428193 -0.7263022 -3.4439004
## ScreenTime 4.807987 1.4281926 5.444878 -1.7757803 -5.1116211
## Sleep -6.252329 -0.7263022 -1.775780 2.3143870 0.4541344
## PhysActive 25.295730 -3.4439004 -5.111621 0.4541344 147.7384741
## HrsHomework -32.874864 0.7321501 2.121541 -0.3063460 6.7944036
## HrsHomework
## ID -32.8748640
## Grade 0.7321501
## ScreenTime 2.1215405
## Sleep -0.3063460
## PhysActive 6.7944036
## HrsHomework 22.6711121
Sample Correlation Matrix
cor(Quan) # apply the `corr()` function## ID Grade ScreenTime Sleep PhysActive
## ID 1.00000000 0.03657384 0.03827557 -0.07634426 0.03865921
## Grade 0.03657384 1.00000000 0.43748625 -0.34124875 -0.20252353
## ScreenTime 0.03827557 0.43748625 1.00000000 -0.50023856 -0.18022614
## Sleep -0.07634426 -0.34124875 -0.50023856 1.00000000 0.02455950
## PhysActive 0.03865921 -0.20252353 -0.18022614 0.02455950 1.00000000
## HrsHomework -0.12825671 0.10990955 0.19095052 -0.04229197 0.11740001
## HrsHomework
## ID -0.12825671
## Grade 0.10990955
## ScreenTime 0.19095052
## Sleep -0.04229197
## PhysActive 0.11740001
## HrsHomework 1.00000000
library(funModeling)
library(tidyverse)
library(Hmisc)
library(skimr)
basic_eda <- function(data)
{
glimpse(data)
skim(data)
df_status(data)
freq(data)
profiling_num(data)
plot_num(data)
describe(data)
}
basic_eda(df)## Rows: 172
## Columns: 17
## $ ID <dbl> 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17,~
## $ Gender <chr> "male", "female", "male", "male", "male", "male", "male", ~
## $ Grade <dbl> 4, 4, 4, 4, 4, 4, 3, 6, 6, 6, 4, 4, 4, 7, 8, 8, 8, 8, 8, 8~
## $ Horoscope <chr> "Scorpio", "Capricorn", "Taurus", "Aquarius", "Scorpio", "~
## $ Subject <chr> "Math", "Gym", "Math", "Math", "Gym", "Gym", "Art", "Math"~
## $ IntExt <chr> "Extravert", "Extravert", "Introvert", "Don't Know", "Don'~
## $ OptPest <chr> "Optimist", "Optimist", "Optimist", "Don't Know", "Don't K~
## $ ScreenTime <dbl> 1, 1, 4, 3, 1, 2, 1, 4, 6, 3, 1, 1, 0, 5, 6, 5, 8, 4, 2, 3~
## $ Sleep <dbl> 7, 8, 9, 9, 9, 9, 11, 9, 8, 9, 10, 10, 9, 8, 9, 7, 7, 8, 9~
## $ PhysActive <dbl> 10, 5, 22, 9, 10, 20, 4, 12, 4, 12, 5, 5, 5, 14, 25, 6, 2,~
## $ HrsHomework <dbl> 10, 0, 1, 1, 1, 2, 14, 21, 6, 3, 0, 0, 0, 4, 2, 3, 0, 0, 3~
## $ SpendTime1 <chr> "baseball", "playing outside", "video games", "video games~
## $ SpendTime2 <chr> "relaxing", "swimming", "soccer", "sports", "hanging out",~
## $ Self1 <chr> "active", "kind", "active", "active", "intellegent", "funn~
## $ Self2 <chr> "competitive", "active", "creative", "responsible", "stron~
## $ Career <chr> "professional baseball player", "Teacher", "professional s~
## $ Superpower <chr> "sonic speed", "power to grant wishes", "powerful kick", "~
## variable q_zeros p_zeros q_na p_na q_inf p_inf type unique
## 1 ID 0 0.00 0 0 0 0 numeric 172
## 2 Gender 0 0.00 0 0 0 0 character 3
## 3 Grade 0 0.00 0 0 0 0 numeric 6
## 4 Horoscope 0 0.00 0 0 0 0 character 12
## 5 Subject 0 0.00 0 0 0 0 character 5
## 6 IntExt 0 0.00 0 0 0 0 character 3
## 7 OptPest 0 0.00 0 0 0 0 character 3
## 8 ScreenTime 3 1.74 0 0 0 0 numeric 13
## 9 Sleep 0 0.00 0 0 0 0 numeric 12
## 10 PhysActive 1 0.58 0 0 0 0 numeric 33
## 11 HrsHomework 23 13.37 0 0 0 0 numeric 17
## 12 SpendTime1 0 0.00 0 0 0 0 character 90
## 13 SpendTime2 0 0.00 0 0 0 0 character 102
## 14 Self1 0 0.00 0 0 0 0 character 98
## 15 Self2 0 0.00 0 0 0 0 character 94
## 16 Career 0 0.00 0 0 0 0 character 100
## 17 Superpower 0 0.00 0 0 0 0 character 97
## Gender frequency percentage cumulative_perc
## 1 female 85 49.42 49.42
## 2 male 85 49.42 98.84
## 3 Don't Identify 2 1.16 100.00
## Horoscope frequency percentage cumulative_perc
## 1 Aries 21 12.21 12.21
## 2 Cancer 18 10.47 22.68
## 3 Scorpio 17 9.88 32.56
## 4 Leo 16 9.30 41.86
## 5 Pisces 15 8.72 50.58
## 6 Gemini 14 8.14 58.72
## 7 Taurus 14 8.14 66.86
## 8 Capricorn 13 7.56 74.42
## 9 Virgo 13 7.56 81.98
## 10 Libra 11 6.40 88.38
## 11 Aquarius 10 5.81 94.19
## 12 Sagittarius 10 5.81 100.00
## Subject frequency percentage cumulative_perc
## 1 Gym 64 37.21 37.21
## 2 Math 40 23.26 60.47
## 3 Art 36 20.93 81.40
## 4 Science 25 14.53 95.93
## 5 History 7 4.07 100.00
## IntExt frequency percentage cumulative_perc
## 1 Extravert 91 52.91 52.91
## 2 Introvert 47 27.33 80.24
## 3 Don't Know 34 19.77 100.00
## OptPest frequency percentage cumulative_perc
## 1 Optimist 92 53.49 53.49
## 2 Pessimist 49 28.49 81.98
## 3 Don't Know 31 18.02 100.00
## SpendTime1 frequency percentage cumulative_perc
## 1 video games 17 9.88 9.88
## 2 reading 11 6.40 16.28
## 3 sports 11 6.40 22.68
## 4 friends 7 4.07 26.75
## 5 read 7 4.07 30.82
## 6 soccer 7 4.07 34.89
## 7 netflix 5 2.91 37.80
## 8 Sports 5 2.91 40.71
## 9 Read 4 2.33 43.04
## 10 gymnastics 3 1.74 44.78
## 11 playing sports 3 1.74 46.52
## 12 reading 3 1.74 48.26
## 13 tv 3 1.74 50.00
## 14 baseball 2 1.16 51.16
## 15 family 2 1.16 52.32
## 16 fortnite 2 1.16 53.48
## 17 Netflix 2 1.16 54.64
## 18 playing with dog 2 1.16 55.80
## 19 sleeping 2 1.16 56.96
## 20 Video Games 2 1.16 58.12
## 21 Videogames 2 1.16 59.28
## 22 Watch TV 2 1.16 60.44
## 23 reading 1 0.58 61.02
## 24 Active 1 0.58 61.60
## 25 activeitys 1 0.58 62.18
## 26 Art 1 0.58 62.76
## 27 Baking 1 0.58 63.34
## 28 ball hockey 1 0.58 63.92
## 29 basketball 1 0.58 64.50
## 30 Being active 1 0.58 65.08
## 31 bike 1 0.58 65.66
## 32 Code 1 0.58 66.24
## 33 computer games 1 0.58 66.82
## 34 crafting 1 0.58 67.40
## 35 D&D 1 0.58 67.98
## 36 dance 1 0.58 68.56
## 37 Dancing 1 0.58 69.14
## 38 draw 1 0.58 69.72
## 39 Draw 1 0.58 70.30
## 40 drawing 1 0.58 70.88
## 41 drawing 1 0.58 71.46
## 42 eating 1 0.58 72.04
## 43 eating 1 0.58 72.62
## 44 Friends 1 0.58 73.20
## 45 games 1 0.58 73.78
## 46 Games 1 0.58 74.36
## 47 Go to the Park 1 0.58 74.94
## 48 going to the park 1 0.58 75.52
## 49 Guild 1 0.58 76.10
## 50 hockey 1 0.58 76.68
## 51 Hockey 1 0.58 77.26
## 52 house 1 0.58 77.84
## 53 IDK 1 0.58 78.42
## 54 instagram 1 0.58 79.00
## 55 nothing 1 0.58 79.58
## 56 origami 1 0.58 80.16
## 57 outside 1 0.58 80.74
## 58 Outside 1 0.58 81.32
## 59 pet project 1 0.58 81.90
## 60 Pets 1 0.58 82.48
## 61 phone 1 0.58 83.06
## 62 Play 1 0.58 83.64
## 63 play w/ friends 1 0.58 84.22
## 64 playing 1 0.58 84.80
## 65 playing on computer 1 0.58 85.38
## 66 playing outside 1 0.58 85.96
## 67 playing soccer 1 0.58 86.54
## 68 Reading 1 0.58 87.12
## 69 relaxing 1 0.58 87.70
## 70 road hockey 1 0.58 88.28
## 71 rubix cubes 1 0.58 88.86
## 72 run 1 0.58 89.44
## 73 running 1 0.58 90.02
## 74 singing 1 0.58 90.60
## 75 Skateboard 1 0.58 91.18
## 76 Soccer 1 0.58 91.76
## 77 soccer 1 0.58 92.34
## 78 staring blankly into space 1 0.58 92.92
## 79 talk with friends 1 0.58 93.50
## 80 trampoline 1 0.58 94.08
## 81 Tv 1 0.58 94.66
## 82 watching netflix 1 0.58 95.24
## 83 watching pokemon 1 0.58 95.82
## 84 watching tv 1 0.58 96.40
## 85 watching TV 1 0.58 96.98
## 86 watching youtube 1 0.58 97.56
## 87 with friends 1 0.58 98.14
## 88 xbox 1 0.58 98.72
## 89 youtube 1 0.58 99.30
## 90 Youtube 1 0.58 100.00
##
## SpendTime2 frequency percentage cumulative_perc
## 1 reading 10 5.81 5.81
## 2 video games 8 4.65 10.46
## 3 friends 7 4.07 14.53
## 4 Fortnite 5 2.91 17.44
## 5 sports 5 2.91 20.35
## 6 netflix 4 2.33 22.68
## 7 sleeping 4 2.33 25.01
## 8 youtube 4 2.33 27.34
## 9 drawing 3 1.74 29.08
## 10 eating 3 1.74 30.82
## 11 Friends 3 1.74 32.56
## 12 lego 3 1.74 34.30
## 13 play 3 1.74 36.04
## 14 playing games 3 1.74 37.78
## 15 playing with friends 3 1.74 39.52
## 16 soccer 3 1.74 41.26
## 17 swimming 3 1.74 43.00
## 18 tv 3 1.74 44.74
## 19 Videogames 3 1.74 46.48
## 20 Hanging with friends 2 1.16 47.64
## 21 idk 2 1.16 48.80
## 22 outside 2 1.16 49.96
## 23 Play with Friends 2 1.16 51.12
## 24 ps4 2 1.16 52.28
## 25 read 2 1.16 53.44
## 26 Relax 2 1.16 54.60
## 27 talk 2 1.16 55.76
## 28 talking 2 1.16 56.92
## 29 art 1 0.58 57.50
## 30 baking 1 0.58 58.08
## 31 basket ball 1 0.58 58.66
## 32 basketball 1 0.58 59.24
## 33 Beating friend 1 0.58 59.82
## 34 being happy 1 0.58 60.40
## 35 being myself 1 0.58 60.98
## 36 bike 1 0.58 61.56
## 37 Bike 1 0.58 62.14
## 38 biking 1 0.58 62.72
## 39 chill 1 0.58 63.30
## 40 cooking 1 0.58 63.88
## 41 crafts 1 0.58 64.46
## 42 dance 1 0.58 65.04
## 43 dancing 1 0.58 65.62
## 44 dog 1 0.58 66.20
## 45 Dog 1 0.58 66.78
## 46 Drawing 1 0.58 67.36
## 47 dungeons and dragons 1 0.58 67.94
## 48 Eating 1 0.58 68.52
## 49 family 1 0.58 69.10
## 50 games 1 0.58 69.68
## 51 Guitar 1 0.58 70.26
## 52 hanging out 1 0.58 70.84
## 53 helpful 1 0.58 71.42
## 54 hockey 1 0.58 72.00
## 55 IDK 1 0.58 72.58
## 56 looking at nothing 1 0.58 73.16
## 57 making things 1 0.58 73.74
## 58 music 1 0.58 74.32
## 59 Netflix 1 0.58 74.90
## 60 nothing 1 0.58 75.48
## 61 out side 1 0.58 76.06
## 62 outdoors 1 0.58 76.64
## 63 phone 1 0.58 77.22
## 64 piano 1 0.58 77.80
## 65 Piano 1 0.58 78.38
## 66 Play 1 0.58 78.96
## 67 play games 1 0.58 79.54
## 68 play ps4 1 0.58 80.12
## 69 Playing 1 0.58 80.70
## 70 playing fortnite 1 0.58 81.28
## 71 playing outside 1 0.58 81.86
## 72 playing sports 1 0.58 82.44
## 73 playing video games 1 0.58 83.02
## 74 Playing w/ sister 1 0.58 83.60
## 75 playing with animals 1 0.58 84.18
## 76 playing with brother 1 0.58 84.76
## 77 playing with her birds 1 0.58 85.34
## 78 ranbowloom 1 0.58 85.92
## 79 Reading 1 0.58 86.50
## 80 relaxing 1 0.58 87.08
## 81 running 1 0.58 87.66
## 82 shoping 1 0.58 88.24
## 83 Shopping 1 0.58 88.82
## 84 sing on a couch 1 0.58 89.40
## 85 Sleep 1 0.58 89.98
## 86 Sleeping 1 0.58 90.56
## 87 Sports 1 0.58 91.14
## 88 staying home 1 0.58 91.72
## 89 summer school 1 0.58 92.30
## 90 swim 1 0.58 92.88
## 91 technology 1 0.58 93.46
## 92 texting talking 1 0.58 94.04
## 93 tree tag 1 0.58 94.62
## 94 TV 1 0.58 95.20
## 95 Video Games 1 0.58 95.78
## 96 volley ball 1 0.58 96.36
## 97 watch 1 0.58 96.94
## 98 Watch my Fish 1 0.58 97.52
## 99 watching videos 1 0.58 98.10
## 100 Work 1 0.58 98.68
## 101 Writitng 1 0.58 99.26
## 102 you tube 1 0.58 100.00
## Self1 frequency percentage cumulative_perc
## 1 funny 15 8.72 8.72
## 2 fun 7 4.07 12.79
## 3 smart 7 4.07 16.86
## 4 active 5 2.91 19.77
## 5 Active 5 2.91 22.68
## 6 athletic 5 2.91 25.59
## 7 nice 5 2.91 28.50
## 8 shy 4 2.33 30.83
## 9 Smart 4 2.33 33.16
## 10 active 3 1.74 34.90
## 11 cool 3 1.74 36.64
## 12 Gamer 3 1.74 38.38
## 13 happy 3 1.74 40.12
## 14 talkative 3 1.74 41.86
## 15 weird 3 1.74 43.60
## 16 agressive 2 1.16 44.76
## 17 calm 2 1.16 45.92
## 18 Chill 2 1.16 47.08
## 19 creative 2 1.16 48.24
## 20 empathetic 2 1.16 49.40
## 21 friendly 2 1.16 50.56
## 22 Fun 2 1.16 51.72
## 23 funny 2 1.16 52.88
## 24 idk 2 1.16 54.04
## 25 kind 2 1.16 55.20
## 26 lazy 2 1.16 56.36
## 27 sassy 2 1.16 57.52
## 28 small 2 1.16 58.68
## 29 sporty 2 1.16 59.84
## 30 adventurous 1 0.58 60.42
## 31 angry 1 0.58 61.00
## 32 Annoying 1 0.58 61.58
## 33 Annoying 1 0.58 62.16
## 34 anoying 1 0.58 62.74
## 35 art 1 0.58 63.32
## 36 Athletic 1 0.58 63.90
## 37 awesome 1 0.58 64.48
## 38 Bookworm 1 0.58 65.06
## 39 caring 1 0.58 65.64
## 40 cheerful 1 0.58 66.22
## 41 childish 1 0.58 66.80
## 42 Childish 1 0.58 67.38
## 43 clueless 1 0.58 67.96
## 44 Competetive 1 0.58 68.54
## 45 curious 1 0.58 69.12
## 46 determined 1 0.58 69.70
## 47 emotional 1 0.58 70.28
## 48 Energetic 1 0.58 70.86
## 49 extraverted 1 0.58 71.44
## 50 Fashionable 1 0.58 72.02
## 51 free spirited 1 0.58 72.60
## 52 Friendly 1 0.58 73.18
## 53 Funny 1 0.58 73.76
## 54 generouse 1 0.58 74.34
## 55 greatful 1 0.58 74.92
## 56 Happy 1 0.58 75.50
## 57 Hilarious 1 0.58 76.08
## 58 Human 1 0.58 76.66
## 59 hungry 1 0.58 77.24
## 60 hyper 1 0.58 77.82
## 61 indecisive 1 0.58 78.40
## 62 intellegent 1 0.58 78.98
## 63 Intelligent 1 0.58 79.56
## 64 joyful 1 0.58 80.14
## 65 Kind 1 0.58 80.72
## 66 laid back 1 0.58 81.30
## 67 Lazy 1 0.58 81.88
## 68 lazy 1 0.58 82.46
## 69 living 1 0.58 83.04
## 70 load 1 0.58 83.62
## 71 loud 1 0.58 84.20
## 72 loyal 1 0.58 84.78
## 73 moody 1 0.58 85.36
## 74 n/a 1 0.58 85.94
## 75 negative 1 0.58 86.52
## 76 optimistic 1 0.58 87.10
## 77 overly energetic 1 0.58 87.68
## 78 peculiar 1 0.58 88.26
## 79 petty 1 0.58 88.84
## 80 positive 1 0.58 89.42
## 81 pretty 1 0.58 90.00
## 82 quiet 1 0.58 90.58
## 83 Quiet 1 0.58 91.16
## 84 quite 1 0.58 91.74
## 85 rebel 1 0.58 92.32
## 86 sad 1 0.58 92.90
## 87 Sarcastic 1 0.58 93.48
## 88 short 1 0.58 94.06
## 89 Shy 1 0.58 94.64
## 90 simple 1 0.58 95.22
## 91 tall 1 0.58 95.80
## 92 the 1 0.58 96.38
## 93 thoughtful 1 0.58 96.96
## 94 unsure 1 0.58 97.54
## 95 Weird 1 0.58 98.12
## 96 wierd 1 0.58 98.70
## 97 Wierd 1 0.58 99.28
## 98 Witty 1 0.58 100.00
## Self2 frequency percentage cumulative_perc
## 1 active 9 5.23 5.23
## 2 kind 7 4.07 9.30
## 3 smart 7 4.07 13.37
## 4 awesome 6 3.49 16.86
## 5 happy 6 3.49 20.35
## 6 funny 5 2.91 23.26
## 7 annoying 4 2.33 25.59
## 8 athletic 4 2.33 27.92
## 9 caring 4 2.33 30.25
## 10 energetic 4 2.33 32.58
## 11 Smart 4 2.33 34.91
## 12 creative 3 1.74 36.65
## 13 friendly 3 1.74 38.39
## 14 n/a 3 1.74 40.13
## 15 nice 3 1.74 41.87
## 16 Active 2 1.16 43.03
## 17 Annoying 2 1.16 44.19
## 18 Athletic 2 1.16 45.35
## 19 calm 2 1.16 46.51
## 20 cool 2 1.16 47.67
## 21 curious 2 1.16 48.83
## 22 energitic 2 1.16 49.99
## 23 Extreverted 2 1.16 51.15
## 24 fun 2 1.16 52.31
## 25 idk 2 1.16 53.47
## 26 lazy 2 1.16 54.63
## 27 outgoing 2 1.16 55.79
## 28 pretty 2 1.16 56.95
## 29 responsible 2 1.16 58.11
## 30 sassy 2 1.16 59.27
## 31 Shy 2 1.16 60.43
## 32 small 2 1.16 61.59
## 33 sporty 2 1.16 62.75
## 34 Sporty 2 1.16 63.91
## 35 Sweet 2 1.16 65.07
## 36 tall 2 1.16 66.23
## 37 amazing 1 0.58 66.81
## 38 Amazing 1 0.58 67.39
## 39 anoying 1 0.58 67.97
## 40 artistic 1 0.58 68.55
## 41 asian 1 0.58 69.13
## 42 Awesome 1 0.58 69.71
## 43 awkward 1 0.58 70.29
## 44 basic 1 0.58 70.87
## 45 beyond not annoying 1 0.58 71.45
## 46 blond 1 0.58 72.03
## 47 blonde 1 0.58 72.61
## 48 Boring 1 0.58 73.19
## 49 cat 1 0.58 73.77
## 50 cats 1 0.58 74.35
## 51 competitive 1 0.58 74.93
## 52 Condesending 1 0.58 75.51
## 53 confident 1 0.58 76.09
## 54 confused 1 0.58 76.67
## 55 Cool 1 0.58 77.25
## 56 Crazy 1 0.58 77.83
## 57 Curious 1 0.58 78.41
## 58 Dude 1 0.58 78.99
## 59 Embarassed 1 0.58 79.57
## 60 expressive 1 0.58 80.15
## 61 extravert 1 0.58 80.73
## 62 fidgety 1 0.58 81.31
## 63 flimsy 1 0.58 81.89
## 64 funky 1 0.58 82.47
## 65 Gifted 1 0.58 83.05
## 66 goat 1 0.58 83.63
## 67 Happy 1 0.58 84.21
## 68 impatient 1 0.58 84.79
## 69 intelligent 1 0.58 85.37
## 70 intense 1 0.58 85.95
## 71 Kind 1 0.58 86.53
## 72 korean 1 0.58 87.11
## 73 Lazy 1 0.58 87.69
## 74 loud 1 0.58 88.27
## 75 loyal 1 0.58 88.85
## 76 observant 1 0.58 89.43
## 77 odd 1 0.58 90.01
## 78 optimistic 1 0.58 90.59
## 79 persistent 1 0.58 91.17
## 80 Person 1 0.58 91.75
## 81 quiet 1 0.58 92.33
## 82 rude 1 0.58 92.91
## 83 Sassy 1 0.58 93.49
## 84 setericle 1 0.58 94.07
## 85 shy 1 0.58 94.65
## 86 sneaky 1 0.58 95.23
## 87 strong 1 0.58 95.81
## 88 stuburn 1 0.58 96.39
## 89 Tall 1 0.58 96.97
## 90 thiccc 1 0.58 97.55
## 91 tired 1 0.58 98.13
## 92 unpredictable 1 0.58 98.71
## 93 Video Game Lover 1 0.58 99.29
## 94 witty 1 0.58 100.00
##
## Career frequency percentage cumulative_perc
## 1 doctor 12 6.98 6.98
## 2 lawyer 12 6.98 13.96
## 3 engineer 7 4.07 18.03
## 4 idk 6 3.49 21.52
## 5 Doctor 4 2.33 23.85
## 6 n/a 4 2.33 26.18
## 7 Teacher 4 2.33 28.51
## 8 vet 4 2.33 30.84
## 9 Athlete 3 1.74 32.58
## 10 author 3 1.74 34.32
## 11 hockey player 3 1.74 36.06
## 12 scientist 3 1.74 37.80
## 13 Scientist 3 1.74 39.54
## 14 surgeon 3 1.74 41.28
## 15 actress 2 1.16 42.44
## 16 athlete 2 1.16 43.60
## 17 baseball player 2 1.16 44.76
## 18 chef 2 1.16 45.92
## 19 computer scientist 2 1.16 47.08
## 20 designer 2 1.16 48.24
## 21 dessinger 2 1.16 49.40
## 22 interior designer 2 1.16 50.56
## 23 Lawyer 2 1.16 51.72
## 24 model 2 1.16 52.88
## 25 N/A 2 1.16 54.04
## 26 professional hockey player 2 1.16 55.20
## 27 Programmer 2 1.16 56.36
## 28 Rich 2 1.16 57.52
## 29 teacher 2 1.16 58.68
## 30 actor/model 1 0.58 59.26
## 31 animator 1 0.58 59.84
## 32 architect 1 0.58 60.42
## 33 Architect 1 0.58 61.00
## 34 arcitect 1 0.58 61.58
## 35 artist 1 0.58 62.16
## 36 Artist 1 0.58 62.74
## 37 Athelete 1 0.58 63.32
## 38 auther 1 0.58 63.90
## 39 baker 1 0.58 64.48
## 40 banker 1 0.58 65.06
## 41 Baseball Player 1 0.58 65.64
## 42 basketball 1 0.58 66.22
## 43 biologist 1 0.58 66.80
## 44 brain surgen 1 0.58 67.38
## 45 computer designer 1 0.58 67.96
## 46 Computer Scientist 1 0.58 68.54
## 47 cop 1 0.58 69.12
## 48 Docter 1 0.58 69.70
## 49 dont know 1 0.58 70.28
## 50 engenier 1 0.58 70.86
## 51 enginere 1 0.58 71.44
## 52 entrepreneur 1 0.58 72.02
## 53 fashion designer 1 0.58 72.60
## 54 geneticist 1 0.58 73.18
## 55 gymnast 1 0.58 73.76
## 56 happy 1 0.58 74.34
## 57 horse rider 1 0.58 74.92
## 58 I don't know 1 0.58 75.50
## 59 I don't Know 1 0.58 76.08
## 60 inventer 1 0.58 76.66
## 61 inventor 1 0.58 77.24
## 62 Investment banker 1 0.58 77.82
## 63 Investment Banker 1 0.58 78.40
## 64 IT Worker 1 0.58 78.98
## 65 landscaper 1 0.58 79.56
## 66 loyer 1 0.58 80.14
## 67 mechanic 1 0.58 80.72
## 68 millionaire 1 0.58 81.30
## 69 movue star 1 0.58 81.88
## 70 music industry 1 0.58 82.46
## 71 Nerosurgeon 1 0.58 83.04
## 72 neurosurgeon 1 0.58 83.62
## 73 NFL player 1 0.58 84.20
## 74 NHL Player 1 0.58 84.78
## 75 paleontologist 1 0.58 85.36
## 76 pediatrician 1 0.58 85.94
## 77 physisist 1 0.58 86.52
## 78 pilot 1 0.58 87.10
## 79 professional baseball player 1 0.58 87.68
## 80 professional soccer player 1 0.58 88.26
## 81 proffesional 1 0.58 88.84
## 82 programmer 1 0.58 89.42
## 83 rich 1 0.58 90.00
## 84 rich man 1 0.58 90.58
## 85 robot creator 1 0.58 91.16
## 86 sergent 1 0.58 91.74
## 87 sergeon 1 0.58 92.32
## 88 soccer 1 0.58 92.90
## 89 soccer player 1 0.58 93.48
## 90 Soccer Plyer 1 0.58 94.06
## 91 software designer 1 0.58 94.64
## 92 Soldier 1 0.58 95.22
## 93 Speech Therapist 1 0.58 95.80
## 94 sports analyst 1 0.58 96.38
## 95 sports journalist 1 0.58 96.96
## 96 swimmer 1 0.58 97.54
## 97 Vet 1 0.58 98.12
## 98 Vetranerian 1 0.58 98.70
## 99 window washer 1 0.58 99.28
## 100 zoologist 1 0.58 100.00
## Superpower frequency percentage cumulative_perc
## 1 fly 10 5.81 5.81
## 2 invisibility 9 5.23 11.04
## 3 teleportation 9 5.23 16.27
## 4 flying 8 4.65 20.92
## 5 teleport 7 4.07 24.99
## 6 invisible 5 2.91 27.90
## 7 shape shift 5 2.91 30.81
## 8 speed 5 2.91 33.72
## 9 super speed 5 2.91 36.63
## 10 mind reading 4 2.33 38.96
## 11 time travel 4 2.33 41.29
## 12 Fly 3 1.74 43.03
## 13 wishes 3 1.74 44.77
## 14 All Powers 2 1.16 45.93
## 15 Fire 2 1.16 47.09
## 16 flight 2 1.16 48.25
## 17 Infinite everything 2 1.16 49.41
## 18 Invisibility 2 1.16 50.57
## 19 Read minds 2 1.16 51.73
## 20 Read Minds 2 1.16 52.89
## 21 reading minds 2 1.16 54.05
## 22 telaport 2 1.16 55.21
## 23 Teleportation 2 1.16 56.37
## 24 vampire 2 1.16 57.53
## 25 All 1 0.58 58.11
## 26 Amazing At Everything 1 0.58 58.69
## 27 anything he wants 1 0.58 59.27
## 28 bend reality 1 0.58 59.85
## 29 change probability 1 0.58 60.43
## 30 Conjure 1 0.58 61.01
## 31 Conjuring 1 0.58 61.59
## 32 Control Nature 1 0.58 62.17
## 33 control over time 1 0.58 62.75
## 34 Cunjuring 1 0.58 63.33
## 35 death ray 1 0.58 63.91
## 36 E.S.P. 1 0.58 64.49
## 37 everything 1 0.58 65.07
## 38 everything (little) 1 0.58 65.65
## 39 fast 1 0.58 66.23
## 40 fire 1 0.58 66.81
## 41 Fire Power 1 0.58 67.39
## 42 Fire powers 1 0.58 67.97
## 43 Flight 1 0.58 68.55
## 44 flight 1 0.58 69.13
## 45 fly 1 0.58 69.71
## 46 Flying 1 0.58 70.29
## 47 good at everything 1 0.58 70.87
## 48 have everything 1 0.58 71.45
## 49 infinite knowledge 1 0.58 72.03
## 50 infinity stones 1 0.58 72.61
## 51 invincable 1 0.58 73.19
## 52 invincible 1 0.58 73.77
## 53 invisable 1 0.58 74.35
## 54 Invisible 1 0.58 74.93
## 55 lazer eyes 1 0.58 75.51
## 56 make anything 1 0.58 76.09
## 57 making money out of thin air 1 0.58 76.67
## 58 Manipulate the Laws of Phisycs 1 0.58 77.25
## 59 manipulating physics 1 0.58 77.83
## 60 materialize anything 1 0.58 78.41
## 61 mind bending 1 0.58 78.99
## 62 mind control 1 0.58 79.57
## 63 mind controle 1 0.58 80.15
## 64 Mind Reading 1 0.58 80.73
## 65 molecular manipulation 1 0.58 81.31
## 66 munipulate time 1 0.58 81.89
## 67 never tired 1 0.58 82.47
## 68 pause time 1 0.58 83.05
## 69 phycic 1 0.58 83.63
## 70 physich 1 0.58 84.21
## 71 plasma 1 0.58 84.79
## 72 power to answer any question 1 0.58 85.37
## 73 power to grant wishes 1 0.58 85.95
## 74 powerful kick 1 0.58 86.53
## 75 read minds 1 0.58 87.11
## 76 reality manipulation 1 0.58 87.69
## 77 Rearanging Atoms 1 0.58 88.27
## 78 regeneration 1 0.58 88.85
## 79 remember everything 1 0.58 89.43
## 80 Shape-Shift 1 0.58 90.01
## 81 shape shifter 1 0.58 90.59
## 82 shape shifting 1 0.58 91.17
## 83 Shape Shifting 1 0.58 91.75
## 84 sonic speed 1 0.58 92.33
## 85 Speak Any Language 1 0.58 92.91
## 86 Speed 1 0.58 93.49
## 87 strength 1 0.58 94.07
## 88 super strength 1 0.58 94.65
## 89 telekinesis 1 0.58 95.23
## 90 telepathy 1 0.58 95.81
## 91 Telepathy 1 0.58 96.39
## 92 telephathy 1 0.58 96.97
## 93 teleportaion 1 0.58 97.55
## 94 Time and space control 1 0.58 98.13
## 95 time powers 1 0.58 98.71
## 96 Time Travel 1 0.58 99.29
## 97 to know everything 1 0.58 100.00
## data
##
## 17 Variables 172 Observations
## --------------------------------------------------------------------------------
## ID
## n missing distinct Info Mean Gmd .05 .10
## 172 0 172 1 91.58 62.33 9.55 18.10
## .25 .50 .75 .90 .95
## 45.75 89.50 137.25 166.90 175.45
##
## lowest : 1 2 3 4 5, highest: 180 181 182 183 184
## --------------------------------------------------------------------------------
## Gender
## n missing distinct
## 172 0 3
##
## Value Don't Identify female male
## Frequency 2 85 85
## Proportion 0.012 0.494 0.494
## --------------------------------------------------------------------------------
## Grade
## n missing distinct Info Mean Gmd
## 172 0 6 0.945 5.767 1.565
##
## lowest : 3 4 5 6 7, highest: 4 5 6 7 8
##
## Value 3 4 5 6 7 8
## Frequency 1 40 34 52 13 32
## Proportion 0.006 0.233 0.198 0.302 0.076 0.186
## --------------------------------------------------------------------------------
## Horoscope
## n missing distinct
## 172 0 12
##
## lowest : Aquarius Aries Cancer Capricorn Gemini
## highest: Pisces Sagittarius Scorpio Taurus Virgo
##
## Aquarius (10, 0.058), Aries (21, 0.122), Cancer (18, 0.105), Capricorn (13,
## 0.076), Gemini (14, 0.081), Leo (16, 0.093), Libra (11, 0.064), Pisces (15,
## 0.087), Sagittarius (10, 0.058), Scorpio (17, 0.099), Taurus (14, 0.081), Virgo
## (13, 0.076)
## --------------------------------------------------------------------------------
## Subject
## n missing distinct
## 172 0 5
##
## lowest : Art Gym History Math Science
## highest: Art Gym History Math Science
##
## Value Art Gym History Math Science
## Frequency 36 64 7 40 25
## Proportion 0.209 0.372 0.041 0.233 0.145
## --------------------------------------------------------------------------------
## IntExt
## n missing distinct
## 172 0 3
##
## Value Don't Know Extravert Introvert
## Frequency 34 91 47
## Proportion 0.198 0.529 0.273
## --------------------------------------------------------------------------------
## OptPest
## n missing distinct
## 172 0 3
##
## Value Don't Know Optimist Pessimist
## Frequency 31 92 49
## Proportion 0.180 0.535 0.285
## --------------------------------------------------------------------------------
## ScreenTime
## n missing distinct Info Mean Gmd .05 .10
## 172 0 13 0.959 2.968 2.298 1.0 1.0
## .25 .50 .75 .90 .95
## 1.0 2.5 4.0 5.0 7.0
##
## lowest : 0.0 0.5 1.0 2.0 3.0, highest: 7.0 8.0 9.0 10.0 18.0
##
## Value 0.0 0.5 1.0 2.0 3.0 4.0 5.0 6.0 7.0 8.0 9.0
## Frequency 3 1 51 31 31 23 16 5 3 3 1
## Proportion 0.017 0.006 0.297 0.180 0.180 0.134 0.093 0.029 0.017 0.017 0.006
##
## Value 10.0 18.0
## Frequency 3 1
## Proportion 0.017 0.006
## --------------------------------------------------------------------------------
## Sleep
## n missing distinct Info Mean Gmd .05 .10
## 172 0 12 0.94 8.608 1.561 6.00 7.00
## .25 .50 .75 .90 .95
## 8.00 9.00 10.00 10.00 10.45
##
## lowest : 2.0 3.0 4.0 5.0 6.0, highest: 9.0 9.5 10.0 11.0 12.0
##
## Value 2.0 3.0 4.0 5.0 6.0 7.0 8.0 9.0 9.5 10.0 11.0
## Frequency 1 2 1 3 5 14 45 55 1 36 7
## Proportion 0.006 0.012 0.006 0.017 0.029 0.081 0.262 0.320 0.006 0.209 0.041
##
## Value 12.0
## Frequency 2
## Proportion 0.012
## --------------------------------------------------------------------------------
## PhysActive
## n missing distinct Info Mean Gmd .05 .10
## 172 0 33 0.994 11.8 9.983 2.00 3.00
## .25 .50 .75 .90 .95
## 6.00 9.00 13.25 20.90 28.90
##
## lowest : 0 1 2 3 4, highest: 40 50 70 72 82
## --------------------------------------------------------------------------------
## HrsHomework
## n missing distinct Info Mean Gmd .05 .10
## 172 0 17 0.983 4.142 4.442 0 0
## .25 .50 .75 .90 .95
## 1 3 6 8 14
##
## lowest : 0.0 0.5 1.0 2.0 3.0, highest: 12.0 14.0 20.0 21.0 35.0
##
## Value 0.0 0.5 1.0 2.0 3.0 4.0 5.0 6.0 7.0 8.0 9.0
## Frequency 23 1 38 17 18 14 13 13 14 5 2
## Proportion 0.134 0.006 0.221 0.099 0.105 0.081 0.076 0.076 0.081 0.029 0.012
##
## Value 10.0 12.0 14.0 20.0 21.0 35.0
## Frequency 2 2 5 2 2 1
## Proportion 0.012 0.012 0.029 0.012 0.012 0.006
## --------------------------------------------------------------------------------
## SpendTime1
## n missing distinct
## 172 0 90
##
## lowest : reading Active activeitys Art Baking
## highest: watching youtube with friends xbox youtube Youtube
## --------------------------------------------------------------------------------
## SpendTime2
## n missing distinct
## 172 0 102
##
## lowest : art baking basket ball basketball Beating friend
## highest: watching videos Work Writitng you tube youtube
## --------------------------------------------------------------------------------
## Self1
## n missing distinct
## 172 0 98
##
## lowest : active Active active adventurous agressive
## highest: weird Weird wierd Wierd Witty
## --------------------------------------------------------------------------------
## Self2
## n missing distinct
## 172 0 94
##
## lowest : active Active amazing Amazing annoying
## highest: thiccc tired unpredictable Video Game Lover witty
## --------------------------------------------------------------------------------
## Career
## n missing distinct
## 172 0 100
##
## lowest : actor/model actress animator architect Architect
## highest: vet Vet Vetranerian window washer zoologist
## --------------------------------------------------------------------------------
## Superpower
## n missing distinct
## 172 0 97
##
## lowest : All All Powers Amazing At Everything anything he wants bend reality
## highest: time travel Time Travel to know everything vampire wishes
## --------------------------------------------------------------------------------
the glimpse function from the dplyr package. This will display a vertical preview of the dataset. It allows us to easily preview data type and sample data.
The skim function from the skimr package. The skim function is a good addition to the summary function. It displays most of the numerical attributes from the summary, but it also displays missing values, more quantile information, and an inline histogram for each variable!
?df_status
?freq
?profiling_num
?plot_num
?describelibrary(DataExplorer)
DataExplorer::create_report(df)