The Quantified Self Project-Screen Time


Introduction

The phenomena of “quantified self” imply self-tracking by using technology, hence enhancing physical, mental, and emotional health. The accessibility to self-tracking has increased, as a large segment of the population is using wearable fitness and sleep tracker. The quantified self-data helps improve the health and wellness of the people. It also develops the personal and professional growth of a person by tracking the activities, using devices. One of the other purposes is to enhance student’s learning abilities by using self-tracking wearable devices. There is a different type of devices one can use to track physical activity, caloric intake, sleep quantity, posture, and other factors involved in personal well-being.

Recently, we have seen a tremendous increase in mobile use technology. Globally, people are relying more on the smartphone to manage their daily life activities. Using a smartphone might be bad for health, but great at storing an infinite amount of data. For example, Fitbit to track sleep patterns, advanced tools to help you sleep better, have more energy, and improve your health. On the other hand, there are highly addictive apps that are not good for health, and we spend so much time on the phone. We can easily get distracted whenever the phone beeps or social media apps. Luckily, we have a feature in Apple I-phone to track our screen time use.

Apple’s Screen Time helps to address growing concerns around increasing device usage, and social media apps impacting health. The concept is to help you to track the amount of time spent on your device. We have downloaded the data by using the Moment app on the phone. We are trying to monitor how much time spent on various apps.For this self-quantified project, we decided to analyze the amount of time spent on mobile phones with the help of data visualization.

Photo Source:Digital Image, MoneyMow, April 11, 2018 https://www.moneymow.com/30-fastest-growing-personal-finance-blogs-2018-according-data/

Data Screening

Sample dataset
Date Week_Day Total_Screen_Time Social_Networking Reading_and_Reference Other Productivity Health_and_Fitness Entertainment Creativity Yoga Total_pick_ups
2020-06-10 Wednesday 198 76 8 29 15 0 32 0 0 67
2020-06-06 Saturday 189 68 0 9 3 4 0 0 0 63
2020-06-01 Monday 187 89 17 41 22 0 0 0 0 61
2020-06-16 Tuesday 170 60 3 2 11 0 0 0 1 58
2020-06-24 Wednesday 161 93 13 17 16 1 0 0 1 53
2020-06-07 Sunday 158 56 18 41 12 15 0 0 0 49
2020-06-20 Saturday 144 81 4 5 3 0 0 0 1 44
2020-06-08 Monday 135 98 3 33 16 0 0 0 0 41
2020-06-19 Friday 133 109 5 1 3 0 0 0 1 40
2020-06-15 Monday 127 90 0 10 7 0 0 0 1 40
2020-06-02 Tuesday 123 78 17 8 9 0 0 0 0 39
2020-06-22 Monday 122 53 25 26 15 0 0 0 1 37
2020-06-11 Thursday 116 75 10 20 5 0 0 0 0 35
2020-06-03 Wednesday 112 52 40 8 4 0 3 0 0 36
2020-06-29 Monday 111 43 25 26 15 0 0 0 1 40
2020-06-21 Sunday 110 70 5 6 15 0 9 0 1 38
2020-06-13 Saturday 109 46 8 13 9 15 1 0 1 36
2020-06-04 Thursday 101 69 9 38 2 0 3 0 0 33
2020-06-23 Tuesday 96 42 15 16 19 0 0 0 1 33
2020-06-30 Tuesday 93 42 13 16 19 0 0 0 1 31

We have collected the data from the smart phone for the month of June 2020. There are 30 observations in the data with 13 variables. We measured amount of time spent on screen usage. The unit of measure is in minutes. The dataset includes the following variables: date, total screen time, social networking time, reading and reference, other, productivity, health and fitness, entertainment, creativity, yoga, and total pick-up time.

Average Screen Time/Phone pick ups


Question 1: What is the average amount of time spent on Screen and the number of times phone has been picked ?

We used Plotly and ggplot2 to create an interactive dot plot. From this plot, we can find average screen time spent and average phone-up by week. It shows the maximum time spent on Wednesday for both screen time and phone. Least time spent on screen Friday and for phone pick-ups on Thursday.

Screen Time over a Month


Question 2: what is the pattern of the Time spent on Phone over a month?

We also used plotly and ggplot2 to create an interactive box plot. This box plot showed very random results. However, we can see that we have spent more time during the initial time of the month as compared to the end of the month.

Productivity Analysis


Question 3 : On which apps did I spend most of my time over a week ?

We used ggplot2 to create a stack bar chart to shows the amount of time spent on various apps by week of the day. As we can see that maximum time was spent on social networking on every day of the week. We can see opposite results for yoga app. The social networking apps is the most used app where we spent 70% of our screen time. The second most used app is “others”. After than we have spent most of our time on productivity and reading. Exceptionally we have spent most time on entertainment on Wednesday. Heath , creativity, and Yoga apps are least used ones.

Phone Usage Trend


Question 4: What is the trend of my phone’s screen time and number of pick ups over time ?

We used the Time series analysis to analyze the trend over time. Screen time and Phone pickups nearly have the same trend over a month which is highest at the starting of the month and lowest at the end of the month. The random component in the graph can be seen easily. The number of phone pickups and screen time seems to have a positive relationship. We will check the relationship in the next graph.

Relationship Between Phone picks ups and Screen Time


Question 5: what is the relationship between the Phone picks ups and Screen Time

We used the dot plot along with the regression line to find the relation between Phone picks ups and Screen Time in ggplot2. The graph clearly explains the more number of times we pick up the phone and the more time we spend on the phone. If the number of times the phone is picked is less than less amount of time is spent on screen.

---
title: "ANLY 512 Project"
author: "Ruchil Barya, Komal Bhagat"
date: "7/30/2020"
output: 
  flexdashboard::flex_dashboard:
    storyboard: true
    source_code: embed
---

### The Quantified Self Project-Screen Time {data-commentary-width=400}

```{r}
knitr::include_graphics("pic.jpg")
```

*** 
Introduction

The phenomena of “quantified self” imply self-tracking by using technology, hence enhancing physical, mental, and emotional health. The accessibility to self-tracking has increased, as a large segment of the population is using wearable fitness and sleep tracker. The quantified self-data helps improve the health and wellness of the people. It also develops the personal and professional growth of a person by tracking the activities, using devices. One of the other purposes is to enhance student’s learning abilities by using self-tracking wearable devices. There is a different type of devices one can use to track physical activity, caloric intake, sleep quantity, posture, and other factors involved in personal well-being. 

Recently, we have seen a tremendous increase in mobile use technology. Globally, people are relying more on the smartphone to manage their daily life activities. Using a smartphone might be bad for health, but great at storing an infinite amount of data. For example, Fitbit to track sleep patterns, advanced tools to help you sleep better, have more energy, and improve your health. On the other hand, there are highly addictive apps that are not good for health, and we spend so much time on the phone. We can easily get distracted whenever the phone beeps or social media apps. Luckily, we have a feature in Apple I-phone to track our screen time use. 

Apple’s Screen Time helps to address growing concerns around increasing device usage, and social media apps impacting health. The concept is to help you to track the amount of time spent on your device. We have downloaded the data by using the Moment app on the phone. We are trying to monitor how much time spent on various apps.For this self-quantified project, we decided to analyze the amount of time spent on mobile phones with the help of data visualization.

Photo Source:Digital Image, MoneyMow, April 11, 2018 https://www.moneymow.com/30-fastest-growing-personal-finance-blogs-2018-according-data/


### Data Screening

```{r}
library(flexdashboard)
library(knitr)
library(readr)
library(ggplot2)
library(tidyverse)
library(readxl)
library(dplyr)
library(ggthemes)
library(gridExtra)
library(reshape2)
sdata <- read_excel("Screen_Time_Data.xlsx")

sdata$Date <- as.Date(sdata$Date)
sdata$Week_Day <- as.factor(sdata$Week_Day)

kable(sdata[1:20,], caption="Sample dataset")
```

*** 
We have collected the data from the smart phone for the month of June 2020. There are 30 observations in the data with 13 variables. We measured amount of time spent on screen usage. The unit of measure is in minutes. The dataset includes the following variables: date, total screen time, social networking time, reading and reference, other, productivity, health and fitness, entertainment, creativity, yoga, and total pick-up time.  



### Average Screen Time/Phone pick ups

```{r}
byWeekday <- sdata %>%
  group_by(Week_Day) %>%
  summarise(avg_minute = mean(Total_Screen_Time),
            avg_pickup = mean(Total_pick_ups)) %>%
  arrange(desc(avg_minute))

g2 <- ggplot(byWeekday, aes(x = reorder(Week_Day, -avg_minute), y = avg_minute)) + 
  geom_bar(stat = "identity", alpha = .4, fill = "blue", colour="black") +
  labs(title = "Average Screen Time-Weekly ",
       x = "",
       y = "Minutes") +
  theme_minimal() +
  theme(plot.title = element_text(hjust = 0.5))+theme(axis.text.x = element_text(angle = 90, hjust = 1))

g3 <- ggplot(byWeekday, aes(x = reorder(Week_Day, -avg_pickup), y = avg_pickup)) + 
  geom_bar(stat = "identity", alpha = .4, fill = "red", colour="black") +
  labs(title = "Average Phone Pickups-Weekly",
       x = "",
       y = " Pickups") +
  theme_minimal() +
  theme(plot.title = element_text(hjust = 0.5))+theme(axis.text.x = element_text(angle = 90, hjust = 1))

grid.arrange(g2, g3, ncol=2)
```

*** 

Question 1: What is the average amount of time spent on Screen and the number of times phone has been picked ?

We used Plotly and ggplot2 to create an interactive dot plot. From this plot, we can find average screen time spent and average phone-up by week. It shows the maximum time spent on Wednesday for both screen time and phone. Least time spent on screen Friday and for phone pick-ups on Thursday.

### Screen Time over a Month

```{r}
ggplot(sdata, aes(x=Date, y=Total_Screen_Time)) +
  geom_point(aes(col=Total_Screen_Time, size=Total_Screen_Time)) +
  labs(title = "Phone usage over a Month", x = "Date", y = "Screen Time")
```

*** 
Question 2: what is the pattern of the Time spent on Phone over a month?

We also used plotly and ggplot2 to create an interactive box plot. This box plot showed very random results. However, we can see that we have spent more time during the initial time of the month as compared to the end of the month. 

### Productivity Analysis


```{r}
mdata <- melt(data=sdata,id.vars=c("Date","Week_Day","Total_Screen_Time","Total_pick_ups"),measure.vars =
                c("Social_Networking","Reading_and_Reference","Other","Productivity","Health_and_Fitness","Entertainment","Creativity", "Yoga"))



ggplot(mdata, aes(x = variable, y = value, fil=Week_Day))+
  geom_bar(
    aes(fill = Week_Day), stat = "identity")+
  
  
  labs(x="Day of Week",
       y="Screen Time")+
  scale_fill_discrete('Activities')+theme(axis.text.x = element_text(angle = 90, hjust = 1))


```

*** 
Question 3 : On which apps did I spend most of my time over a week ?

We used ggplot2 to create a stack bar chart to shows the amount of time spent on various apps by week of the day. As we can see that maximum time was spent on social networking on every day of the week. We can see opposite results for yoga app. The social networking apps is the most used app where we spent 70% of our screen time. The second most used app is “others”. After than we have spent most of our time on productivity and reading. Exceptionally we have spent most time on entertainment on Wednesday. Heath , creativity, and Yoga apps are least used ones.

### Phone Usage Trend 

```{r}
g4 <- ggplot(sdata, aes(x = Date, y = Total_Screen_Time)) +
  geom_line() +
  geom_smooth(se = FALSE) +
  labs(title = "Screen Minutes over time ",
       x = "Date",
       y = "Minutes") +
  theme_minimal() +
  theme(plot.title = element_text(hjust = 0.5))

g5 <- ggplot(sdata, aes(x = Date, y = Total_pick_ups)) +
  geom_line() +
  geom_smooth(se = FALSE) +
  labs(title = "Phone Pickups over time ",
       x = "Date",
       y = "Pickups") +
  theme_minimal() +
  theme(plot.title = element_text(hjust = 0.5))

grid.arrange(g4, g5, nrow=2)

```

*** 

Question 4: What is the trend of my phone's screen time and number of pick ups over time ?

We used the Time series analysis to analyze the trend over time. Screen time and Phone pickups nearly have the same trend over a month which is highest at the starting of the month and lowest at the end of the month. The random component in the graph can be seen easily. The number of phone pickups and screen time seems to have a positive relationship. We will check the relationship in the next graph.


### Relationship Between Phone picks ups and Screen Time

```{r}
ggplot(sdata, aes(x = Total_pick_ups, y = Total_Screen_Time)) + 
  geom_point(alpha = .6) + 
  geom_smooth(method = 'lm', formula = y ~ x, se = FALSE) +
  labs(title = "Minutes of Screen Time vs Phone Pickups",
       x = "Phone Pickups",
       y = "Minutes of Screen Time") +
  theme_minimal() +
  theme(plot.title = element_text(hjust = 0.5))
```


*** 

Question 5: what is the relationship between the Phone picks ups and Screen Time

We used the dot plot along with the regression line to find the relation between Phone picks ups and Screen Time in ggplot2. The graph clearly explains the more number of times we pick up the phone and the more time we spend on the phone. If the number of times the phone is picked is less than less amount of time is spent on screen.