QUANTIFIED SELF BY DEEPSHIKA RAO 04/25/2018

library(readr)
Health <- read_csv("~/Desktop/QS/Health.csv")
## Parsed with column specification:
## cols(
##   Start = col_character(),
##   Finish = col_character(),
##   `Distance (mi)` = col_double(),
##   `Flights Climbed (count)` = col_integer(),
##   `Steps (count)` = col_double(),
##   `sleep (hours)` = col_integer(),
##   Calories = col_integer()
## )
View(Health)
  1. Maximum number of steps taken in the month of April 2018. Draw histogram to show number of steps
summary(Health)
##     Start              Finish          Distance (mi)  
##  Length:24          Length:24          Min.   :1.345  
##  Class :character   Class :character   1st Qu.:2.141  
##  Mode  :character   Mode  :character   Median :2.459  
##                                        Mean   :3.008  
##                                        3rd Qu.:3.420  
##                                        Max.   :8.016  
##  Flights Climbed (count) Steps (count)   sleep (hours)      Calories   
##  Min.   : 2.00           Min.   : 3358   Min.   :5.000   Min.   :1000  
##  1st Qu.: 5.00           1st Qu.: 5329   1st Qu.:6.000   1st Qu.:1200  
##  Median :10.00           Median : 5936   Median :7.000   Median :1300  
##  Mean   :12.83           Mean   : 7177   Mean   :6.958   Mean   :1317  
##  3rd Qu.:13.00           3rd Qu.: 7697   3rd Qu.:8.000   3rd Qu.:1400  
##  Max.   :71.00           Max.   :18211   Max.   :9.000   Max.   :1600
hist(Health$`Steps (count)`,main = "Histogram of steps", col = "pink")

  1. How much distance was covered in April, 2018. Plot a graph to show distance covered
Health$`Distance (mi)`
##  [1] 2.224869 2.348472 1.945463 2.913119 2.446193 2.278856 2.480661
##  [8] 1.702812 3.934069 3.371769 2.173985 2.042230 1.900050 2.299052
## [15] 5.783319 2.561159 1.816144 2.472709 3.967598 8.015688 5.889224
## [22] 3.566189 2.714752 1.345443
plot(Health$`Distance (mi)`)

  1. Total calorie intake during the month of April 2018
Health$Calories
##  [1] 1300 1200 1100 1300 1400 1300 1400 1200 1500 1300 1400 1200 1100 1300
## [15] 1600 1400 1200 1300 1500 1600 1500 1300 1200 1000
summary(Health)
##     Start              Finish          Distance (mi)  
##  Length:24          Length:24          Min.   :1.345  
##  Class :character   Class :character   1st Qu.:2.141  
##  Mode  :character   Mode  :character   Median :2.459  
##                                        Mean   :3.008  
##                                        3rd Qu.:3.420  
##                                        Max.   :8.016  
##  Flights Climbed (count) Steps (count)   sleep (hours)      Calories   
##  Min.   : 2.00           Min.   : 3358   Min.   :5.000   Min.   :1000  
##  1st Qu.: 5.00           1st Qu.: 5329   1st Qu.:6.000   1st Qu.:1200  
##  Median :10.00           Median : 5936   Median :7.000   Median :1300  
##  Mean   :12.83           Mean   : 7177   Mean   :6.958   Mean   :1317  
##  3rd Qu.:13.00           3rd Qu.: 7697   3rd Qu.:8.000   3rd Qu.:1400  
##  Max.   :71.00           Max.   :18211   Max.   :9.000   Max.   :1600
  1. Draw a plot to show correlation between distance covered by steps and number of sleep hours
plot(Health$`Distance (mi)`,Health$`sleep (hours)`)

plot(Health$`Distance (mi)`,Health$`sleep (hours)`,xlab = "Distance",ylab = "sleep")

plot(Health$`Distance (mi)`,Health$`sleep (hours)`,xlab = "Distance",ylab = "sleep",main ="Health Distance and Sleep")

x=rnorm(100)
hist(x, xlab = "Distance",ylab = "sleep",main = "Health Distance and Sleep", col = "blue")

  1. Draw a plot to show correlation between distance covered and calorie intake. Draw histogram to show calorie intake. Also, draw a histogram to show correlation between distance covered and calorie intake.
plot(Health$`Distance (mi)`,Health$Calories)

plot(Health$`Distance (mi)`,Health$Calories,xlab = "Distance",ylab = "Calories")

plot(Health$`Distance (mi)`,Health$Calories,xlab = "Distance",ylab = "Calories",main ="Health Distance and Calories")

hist(Health$Calories,main = "Histogram of Calorie Intake", col = "pink")

x=rnorm(10000)
hist(x, xlab = "Distance",ylab = "Calories",main = "Histogram of Distance and Calories", col = "orange")

library(readr)
Health <- read_csv("~/Desktop/QS/Health.csv")
## Parsed with column specification:
## cols(
##   Start = col_character(),
##   Finish = col_character(),
##   `Distance (mi)` = col_double(),
##   `Flights Climbed (count)` = col_integer(),
##   `Steps (count)` = col_double(),
##   `sleep (hours)` = col_integer(),
##   Calories = col_integer()
## )
View(Health)