Introduction to Bellabeat Tech Company
Bellabeat is a tech company which wants to build marketing strategy
in a way that will facilitate growth. I will identify the trends in non-
Bellabeat smart device usage using external datasets and find out how
these trends affect or apply to Bellabeat customers. I will also find
out how those trends can help influence Bellabeat marketing strategy to
enhance productivity and growth.
Data Sources used for Analysis
FitBit Fitness Tracker Data, a public dataset on Kaggle made
available through Mobius. This Kaggle data set contains personal fitness
tracker from thirty Fitbit users who consented to the submission of
personal tracker data, including minute-level output for physical
activity, heart rate, and sleep monitoring. It includes information
about daily activity, steps, and heart rate that can be used to explore
users’ habits.
Summary, Key Findings and Recommendations
From the dataset, I found that the average person walks 6,546 steps,
4.7km distance and burns 2189 calories daily.
I also discovered that the average hours for sleep was 3 although
the data provided for this makes the results seem a bit inconclusive
because as a result of insufficient data.
The average weight by individuals was 73kg and the average
heartrate, 80pm.
I recommend that clients should be encouraged more to sleep and make
sure the records are entered on the devices to enable data accuracy.
Bellabeat can promote ads which inform clients to make proper use of
their devices.
Although the average heartrate was healthy, the maximum showed that
some users have unhealthy heartrates which should be checked to prevent
health complications.
These are the factors that Bellabeat should consider while creating
or modifying their fitness tracker device as it gives them an edge over
competitors and an opprotunity to do better.
Step 1: Install tidyverse packages
The first thing I did before I began my analysis was to install the
tidyverse packages which enabled me run my analysis in R
seamlessly.
install.packages("tidyverse")
## Installing package into '/cloud/lib/x86_64-pc-linux-gnu-library/4.4'
## (as 'lib' is unspecified)
library(tidyverse)
## ── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
## ✔ dplyr 1.1.4 ✔ readr 2.1.5
## ✔ forcats 1.0.0 ✔ stringr 1.5.1
## ✔ ggplot2 3.5.1 ✔ tibble 3.2.1
## ✔ lubridate 1.9.3 ✔ tidyr 1.3.1
## ✔ purrr 1.0.2
## ── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
## ✖ dplyr::filter() masks stats::filter()
## ✖ dplyr::lag() masks stats::lag()
## ℹ Use the conflicted package (<http://conflicted.r-lib.org/>) to force all conflicts to become errors
library(janitor)
##
## Attaching package: 'janitor'
##
## The following objects are masked from 'package:stats':
##
## chisq.test, fisher.test
library(skimr)
Step 2: Import the dataset.
Next, I imported the dataset which I needed for the analysis to
begin the process of cleaning the data.
bellabeat_activity <- read.csv("/cloud/project/mturkfitbit_export_3.12.16-4.11.16/Fitabase Data 3.12.16-4.11.16/dailyActivity_merged.csv")
bellabeat_heartrate <- read_csv("/cloud/project/mturkfitbit_export_3.12.16-4.11.16/Fitabase Data 3.12.16-4.11.16/heartrate_seconds_merged.csv")
## Rows: 1154681 Columns: 3
## ── Column specification ────────────────────────────────────────────────────────
## Delimiter: ","
## chr (1): Time
## dbl (2): Id, Value
##
## ℹ 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.
bellabeat_calories <- read.csv("/cloud/project/mturkfitbit_export_3.12.16-4.11.16/Fitabase Data 3.12.16-4.11.16/hourlyCalories_merged.csv")
bellabeat_steps <- read.csv("/cloud/project/mturkfitbit_export_3.12.16-4.11.16/Fitabase Data 3.12.16-4.11.16/hourlySteps_merged.csv")
bellabeat_sleep <- read.csv("/cloud/project/mturkfitbit_export_3.12.16-4.11.16/Fitabase Data 3.12.16-4.11.16/minuteSleep_merged.csv")
bellabeat_weight <- read.csv("/cloud/project/mturkfitbit_export_3.12.16-4.11.16/Fitabase Data 3.12.16-4.11.16/weightLogInfo_merged.csv")
Step 3: View the data to understand it.
This was done using the head function
head(bellabeat_activity)
head(bellabeat_calories)
head(bellabeat_heartrate)
head(bellabeat_sleep)
head(bellabeat_steps)
head(bellabeat_weight)
Step 4 :Summarize the data
The data was summarized to gain insights by using some aggregate
functions in the tidyverse package.
activity_summary <-
bellabeat_activity %>%
summarise(average_TotalSteps=mean(TotalSteps),
min_TotalSteps=min(TotalSteps),
max_TotalSteps=max(TotalSteps),
average_TotalDistance=mean(TotalDistance),
min_TotalDistance=min(TotalDistance),
max_TotalDistance=max(TotalDistance),
average_Calories=mean(Calories),
min_Calories=min(Calories),
max_Calories=max(Calories))
head(activity_summary)
calories_summary <-
bellabeat_calories %>%
summarise(average_Calories=mean(Calories),
min_Calories=min(Calories),
max_Calories=max(Calories))
head(calories_summary)
heartrate_summary <-
bellabeat_heartrate %>%
summarise(average_heartrate=mean(Value),
min_heartrate=min(Value),
max_heartrate=max(Value))
head(heartrate_summary)
weight_summary <-
bellabeat_weight %>%
summarise(average_weight=mean(WeightKg),
min_weight=min(WeightKg),
max_weight=max(WeightKg),
average_BMI=mean(BMI),
min_BMI=min(BMI),
max_BMI=max(BMI))
head(weight_summary)
sleep_summary <-
bellabeat_sleep %>%
summarise(average_sleep=mean(value),
min_sleep=min(value),
max_sleep=max(value))
head(sleep_summary)
Step 5: Understanding trends with visualization
The data had been summarized and some insights gotten from it. The
next thing I did was visualize the trends using the gglpot package. I
merged some tables before I began the visualization.
merged_activity_weight <-merge(bellabeat_activity, bellabeat_weight, by=c('Id'))
head(merged_activity_weight)
Using the ggplot function, I created Visualizations to better
understand trends in the dataset.
ggplot(data = bellabeat_activity, aes(x = TotalSteps, y = Calories))+
geom_point(color="blue")+
labs(title = "TotalSteps vs. Calories", x = "TotalSteps", y = "Calories")+
geom_smooth()
## `geom_smooth()` using method = 'loess' and formula = 'y ~ x'

ggplot(data= merged_activity_weight, aes(x= WeightKg, y = Calories))+
geom_point(color="green")+
labs(title = "WeightKg vs. Calories", x = "WeightKg", y = "Calories")+
geom_smooth()
## `geom_smooth()` using method = 'loess' and formula = 'y ~ x'
