Business Task

Analyse smart device usage data in order to gain insight into how consumers use non-Bellabeat smart devices. Identify: * Trends in smart device usage. * How can these trends apply to Bellabeat customers. * How these trends help influence Bellabeat marketing strategy.

Description of all Data Sources

The Kaggle data set used is FitBit Fitness Tracker Data a public domain, dataset made available through Mobius. It contains personal fitness trackers from 30 Fitbit users. The users consented the submission of their personal tracker data, such as: physical activity, heart rate, and sleep monitoring. It includes information about daily activity, steps, and heart rate.

Summary Data Overview

library(kableExtra)
dailyActivity_merged %>%
head() %>%
  knitr::kable(caption = "Sample of Daily Activity") %>%
  kable_styling(bootstrap_options = c("striped", "hover", "condensed"),
    full_width = FALSE)
Sample of Daily Activity
Id ActivityDate TotalSteps TotalDistance TrackerDistance LoggedActivitiesDistance VeryActiveDistance ModeratelyActiveDistance LightActiveDistance SedentaryActiveDistance VeryActiveMinutes FairlyActiveMinutes LightlyActiveMinutes SedentaryMinutes Calories
1503960366 4/12/2016 13162 8.50 8.50 0 1.88 0.55 6.06 0 25 13 328 728 1985
1503960366 4/13/2016 10735 6.97 6.97 0 1.57 0.69 4.71 0 21 19 217 776 1797
1503960366 4/14/2016 10460 6.74 6.74 0 2.44 0.40 3.91 0 30 11 181 1218 1776
1503960366 4/15/2016 9762 6.28 6.28 0 2.14 1.26 2.83 0 29 34 209 726 1745
1503960366 4/16/2016 12669 8.16 8.16 0 2.71 0.41 5.04 0 36 10 221 773 1863
1503960366 4/17/2016 9705 6.48 6.48 0 3.19 0.78 2.51 0 38 20 164 539 1728
library(kableExtra)
sleepDay_merged %>%
  head() %>%
  knitr::kable(caption = "Sample of Sleep Day Data") %>%
  kable_styling(
    bootstrap_options = c("striped", "hover", "condensed"),
    full_width = FALSE)
Sample of Sleep Day Data
Id SleepDay TotalSleepRecords TotalMinutesAsleep TotalTimeInBed
1503960366 4/12/2016 12:00:00 AM 1 327 346
1503960366 4/13/2016 12:00:00 AM 2 384 407
1503960366 4/15/2016 12:00:00 AM 1 412 442
1503960366 4/16/2016 12:00:00 AM 2 340 367
1503960366 4/17/2016 12:00:00 AM 1 700 712
1503960366 4/19/2016 12:00:00 AM 1 304 320

Summary Statistics: Daily Activity Metrics

summary.table <- dailyActivity_merged %>%  
  select(TotalSteps,
         TotalDistance,
         SedentaryMinutes) %>%
  summary() %>%
as.data.frame()

knitr::kable( summary.table, caption = "Summary Statistics: Daily Activity Metrics")
Summary Statistics: Daily Activity Metrics
Var1 Var2 Freq
TotalSteps Min. : 0
TotalSteps 1st Qu.: 3790
TotalSteps Median : 7406
TotalSteps Mean : 7638
TotalSteps 3rd Qu.:10727
TotalSteps Max. :36019
TotalDistance Min. : 0.000
TotalDistance 1st Qu.: 2.620
TotalDistance Median : 5.245
TotalDistance Mean : 5.490
TotalDistance 3rd Qu.: 7.713
TotalDistance Max. :28.030
SedentaryMinutes Min. : 0.0
SedentaryMinutes 1st Qu.: 729.8
SedentaryMinutes Median :1057.5
SedentaryMinutes Mean : 991.2
SedentaryMinutes 3rd Qu.:1229.5
SedentaryMinutes Max. :1440.0

Summary Statistics: Sleep Metrics

summary.table <- sleepDay_merged %>%  
  select(TotalSleepRecords, TotalMinutesAsleep, TotalTimeInBed) %>%
  summary() %>%
as.data.frame()

knitr::kable( summary.table, caption = "Summary Statistics: Sleep Metrics")
Summary Statistics: Sleep Metrics
Var1 Var2 Freq
TotalSleepRecords Min. :1.000
TotalSleepRecords 1st Qu.:1.000
TotalSleepRecords Median :1.000
TotalSleepRecords Mean :1.119
TotalSleepRecords 3rd Qu.:1.000
TotalSleepRecords Max. :3.000
TotalMinutesAsleep Min. : 58.0
TotalMinutesAsleep 1st Qu.:361.0
TotalMinutesAsleep Median :433.0
TotalMinutesAsleep Mean :419.5
TotalMinutesAsleep 3rd Qu.:490.0
TotalMinutesAsleep Max. :796.0
TotalTimeInBed Min. : 61.0
TotalTimeInBed 1st Qu.:403.0
TotalTimeInBed Median :463.0
TotalTimeInBed Mean :458.6
TotalTimeInBed 3rd Qu.:526.0
TotalTimeInBed Max. :961.0

Trend 1 - Minutes Asleep vs. Time in Bed

ggplot(sleepDay_merged, aes(x=TotalMinutesAsleep, y=TotalTimeInBed)) + geom_point()

Trend 2 - Total Steps vs. Sedentary Minutes

ggplot(dailyActivity_merged, aes(x=TotalSteps, y=SedentaryMinutes)) + geom_point()