Case Background:
Founded in 2013, Bellabeat, a high-tech company that manufactures health-focused smart products for women. Since its establishment, the company has grown rapidly and positioned itself as a tech-driven wellness company. Bellabeat has invested in digital marketing, including maintaining active social media pages and running video and display ads. As a analyst I have been tasked to analyze smart device usage data in order to gain insight into consumer behavior and make recommendations on how these trends can inform Bellabeat’s marketing strategy. The team is to select one Bellabeat product to focus on in an the analysis process.
Analysis Goals:
Installed packages:
install.packages("lubridate")
install.packages("dplyr")
install.packages("tidyverse")
install.packages("knitr")
library(lubridate)
library(dplyr)
library(tidyverse)
library(knitr)Between March 12th and May 12th of 2016, 30 Fitbit users participated in a survey distributed via Amazon Mechanical Turk and consented to the submission of their personal tracker data, which included minute-by-minute data on physical activity, heart rate, and sleep monitoring. This data had been made publicly available here –> www.kaggle.com/datasets/arashnic/fitbit and had been used for the purposes of this analysis.
Preview Hourly Steps
| day_of_week | hour | total_steps |
|---|---|---|
| Friday | 00:00:00 | 44.27778 |
| Friday | 01:00:00 | 19.00794 |
| Friday | 02:00:00 | 16.27778 |
| Friday | 03:00:00 | 10.80159 |
| Friday | 04:00:00 | 14.43651 |
Preview Activity, Steps & Calories
| Id | ActivityHour | TotalIntensity | AverageIntensity | StepTotal | Calories |
|---|---|---|---|---|---|
| 1503960366 | NA | 20 | 0.333333 | 373 | 81 |
| 1503960366 | NA | 8 | 0.133333 | 160 | 61 |
| 1503960366 | NA | 7 | 0.116667 | 151 | 59 |
| 1503960366 | NA | 0 | 0.000000 | 0 | 47 |
| 1503960366 | NA | 0 | 0.000000 | 0 | 48 |
| 1503960366 | NA | 0 | 0.000000 | 0 | 48 |
| Id | ActivityDate | TotalSteps | TotalDistance | VeryActiveMinutes | FairlyActiveMinutes | LightlyActiveMinutes | SedentaryMinutes | Calories |
|---|---|---|---|---|---|---|---|---|
| 1503960366 | 2016-04-12 | 13162 | 8.50 | 25 | 13 | 328 | 728 | 1985 |
| 1503960366 | 2016-04-13 | 10735 | 6.97 | 21 | 19 | 217 | 776 | 1797 |
| 1503960366 | 2016-04-14 | 10460 | 6.74 | 30 | 11 | 181 | 1218 | 1776 |
| 1503960366 | 2016-04-15 | 9762 | 6.28 | 29 | 34 | 209 | 726 | 1745 |
| 1503960366 | 2016-04-16 | 12669 | 8.16 | 36 | 10 | 221 | 773 | 1863 |
Use Horizontal Scroll To View Other Columns
The relationship between the number of calories burned and the total number of steps taken on a daily basis is shown below. The data is presented visually, with each point color-coded based on the level of activity associated with it.
#function for adjusting size of plot
fig <- function(width, heigth) {
options(repr.plot.width = width, repr.plot.height = heigth, scales = "free")
}
#plot1
ggplot(data = daily_activity,aes(x = TotalSteps, y = Calories, color = VeryActiveMinutes), fig(25,30)) +
geom_point() +
geom_smooth() +
labs(title = "Calories vs. Total Daily Steps") +
scale_colour_gradient(low="yellow", high="blue")
#plot2
ggplot(data = daily_activity,aes(x = TotalSteps, y = Calories, color = FairlyActiveMinutes), fig(25,30)) +
geom_point() +
geom_smooth() +
labs(title = "Calories vs. Total Daily Steps") +
scale_colour_gradient(low="pink", high="grey")
#plot2
ggplot(data = daily_activity,aes(x = TotalSteps, y = Calories, color = LightlyActiveMinutes), fig(25,30)) +
geom_point() +
geom_smooth() +
labs(title = "Calories vs. Total Daily Steps") +
scale_colour_gradient(low="orange", high="purple")
#plot3
ggplot(data = daily_activity,aes(x = TotalSteps, y = Calories, color = SedentaryMinutes), fig(25,30)) +
geom_point() +
geom_smooth() +
labs(title = "Calories vs. Total Daily Steps") +
scale_colour_gradient(low="red", high="turquoise") Analyzing these graphs reveals that the majority of data points fall below 15,000 daily steps and 3,000 calories burned. The last two graphs support this conclusion, as they show that most users participate in light physical activity and sedentary behaviors. Bellabeat can use this information to align its marketing strategy with its typical market audience, which may consist of people who work in office settings and have limited opportunities for vigorous exercise. However, it’s important to note that there is a small minority of users who occasionally engage in very active exercise.
The plots below depict the average number of steps taken per hour by survey participants, separated by day of the week.
ggplot() +
stat_identity(data = hourly_steps, aes(hour,total_steps,fill = day_of_week),geom = "bar") +
facet_wrap(~factor(day_of_week,c("Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday")),scales="free_x") +
theme(axis.text.x = element_text(angle = 90)) +
labs(title = "Hourly Steps Taken By Week Day")Use Horizontal Scroll To View Other Graphs
The charts show data on the walking and running habits of Fitbit users, which can inform Bellabeat’s marketing efforts. For example, the data illustrates a significant decrease in step count after 7:00 PM every day of the week. Additionally, it highlights that the peak time for step taking is between 1:00 PM and 2:00 PM on Saturdays, followed by the period between 5:00 PM and 7:00 PM on Wednesdays. This information can be used to determine the most effective times to run advertising and to inform the content used in those ads.
Seen previously, the relationship between physical activity and calorie burn is well-established. To further explore this connection, the visualization below plots the total active minutes against the total number of steps taken on a daily basis.
Use Horizontal Scroll To View Other Grapahsggplot(data = activity_v_steps) +
geom_point(mapping = aes(x = StepTotal, y = TotalIntensity, color = TotalIntensity)) +
labs(title = "Steps vs. Intensity") +
scale_colour_gradient(low="red", high="turquoise") The graph shows a strong correlation between daily exercise levels and physical activities like walking or running. This indicates that people who are likely to use Bellabeat products are likely to achieve their fitness goals through these activities. Therefore, it would be beneficial for Bellabeat’s marketing efforts to focus on this segment of activity, specifically running and walking, to better target these potential users.
As seen previously, the graphs demonstrate insights into Fitbit user exercise habits. These insights can be used to develop Bellbeat’s marketing strategy to reach their target market more effectively by doing the following:
Focus on individuals who have mostly sedentary lifestyles and achieve light workout levels through walking. Utilizing communication channels such as podcasts or music streaming ads can be an effective approach to reach customers during the times they are most likely to be walking or light jogging, which is typically between 4:00 PM and 7:00 PM.
As running and walking are common forms of exercise, future product development should focus on designs that increase the intensity of these movements for the user. This approach will better align the products with the needs of users and enhance their satisfaction with Bellabeat’s offerings.
Advertise products during the evening hours (7:00 PM-12:00 AM) on weekdays, with the majority of the budget allocated to the times and days when the most steps are taken, as indicated by data. These high budget times should be after 1:00 PM on Saturdays and 7:00 PM on Wednesdays. This approach will help to keep Bellabeat top of mind for customers after they have finished their daily excercise as well, as help highlight the benefits of their products.
Thank you for taking the time to read through my project! Please reach out if you have any questions, feedback or comments. - Hunter Sprigings :)