Final Visual

.

Theme, Font and Color Settings

Theme and font settings

theme_blue  <-  function(base_size = 11, base_family = "") {
 
  theme_grey(base_size = base_size, base_family = base_family) %+replace%
 
    theme(line  = element_line(colour = "white", size = I(1.5), linetype = "solid",
  lineend = "round", arrow = NULL, inherit.blank = FALSE),
rect  = element_rect(fill = "#00010F", colour = "#00010F", size = 0, linetype = "solid", inherit.blank = FALSE),
text  = element_text(family = "Helvetica", face = "plain", colour = "white", size = base_size,hjust = I(.5), vjust = I(.5), angle = 0, lineheight = base_size,color = NULL,margin = margin(I(.2),I(.2),I(.2),I(.2),unit="pt"),debug=F, inherit.blank = FALSE),
title  = element_text(family = "AvantGarde", face = "plain", colour = "white", size = I(base_size),hjust = I(.5), vjust = I(1), angle = 0, lineheight = I(base_size),color = NULL,margin = margin(I(1),I(1),I(1),I(1),unit="pt"), inherit.blank = FALSE),
      axis.line  = element_line(colour = "#3A42B0", size = 1, linetype = "solid",
  lineend = "round", inherit.blank = FALSE),  
      axis.text.x = element_text(size = base_size*0.6, color = "white", lineheight = 0.6,hjust = I(1), vjust = I(1),angle=60),  
      axis.text.y = element_text(size = base_size*0.6, color = "white", lineheight = 0.9,hjust = I(.5), vjust = I(1),angle=60),  
      axis.ticks = element_line(colour = "#3A42B0", size  =  0.2),
      axis.title  = element_text(family = "Helvetica", face = "italic", colour = "white", size = I(base_size*1),hjust = I(.5), vjust = I(.5), lineheight = I(base_size*1), inherit.blank = FALSE),
      axis.title.x = element_text(size = base_size, color = "white", margin = margin(0, .5, 0, 0)),  
      axis.title.y = element_text(size = base_size, color = "white", angle = 90, margin = margin(0, .5, 0, 0)),  
      axis.ticks.length = unit(0.3, "lines"),   
      # Specify legend options
      legend.background = element_rect(color = NA, fill = "#060713"),  
      legend.key = element_rect(color = "white",  fill = "black"),  
      legend.key.size = unit(1.2, "lines"),  
      legend.key.height = NULL,  
      legend.key.width = NULL,      
      legend.text = element_text(size = base_size*0.8, color = "white"),  
      legend.title = element_text(size = base_size*0.8, face = "bold", hjust = 0, color = "white"),  
      legend.position = "right",  
      legend.text.align = NULL,  
      legend.title.align = NULL,  
      legend.direction = "vertical",  
      legend.box = NULL, 
      # Specify panel options
      panel.background  = element_rect(fill = "#060713",color="#060713", inherit.blank = FALSE),  
      panel.border = element_rect(fill = NA, color = NA),  
      panel.grid.major  = element_line(colour = "#34415B", size = I(.1), linetype = "solid",lineend = "butt", inherit.blank = FALSE),
panel.grid.minor  = element_line(colour = "#1C2D52", size = I(.1), linetype = "dotted",lineend = "butt", inherit.blank = FALSE), 
      panel.spacing = margin(rep(.5,4),unit="pt"), 
      panel.spacing.x  = unit(.5,"pt"),
      panel.spacing.y  = unit(.5,"pt"),
      # Specify facetting options
      strip.background = element_rect(fill = "#060713", color = "#060713"),  
      strip.text  = element_text(family = "Helvetica", face = "plain", colour = "white", size = I(base_size*.8),hjust = .5,lineheight = I(base_size*1),margin = margin(rep(1,4), "pt"),inherit.blank = FALSE),
      strip.text.x = element_text(color = "white"),  
      strip.text.y = element_text(color = "white",angle = -90),  
      # Specify plot options
      plot.background  = element_rect(fill = "#00010F",colour = "#00010F", linetype = "solid", inherit.blank = FALSE),  
      plot.title = element_text(family=base_family,size = base_size, color = "white", lineheight = I(1.2),vjust=1),
      plot.subtitle  = element_text( size = I(base_size*.8),hjust = I(.5),vjust=1, lineheight = I(1.2), inherit.blank = FALSE),
      plot.margin = margin(.2,.2,.2,.2,unit="cm"),
strip.switch.pad.grid  = unit(0, "cm")
 
    )
 
}
update_geom_defaults("bar",   list(fill = "#0686DB"))
theme_set(theme_blue(base_family = "AvantGarde"))
update_geom_defaults("text",list(colour="white",size=rel(2.5)))
windowsFonts(AvantGarde=windowsFont("TT AvantGarde-Book"))
windowsFonts(Helvetica=windowsFont("TT Helvetica"))
options(scipen=12)

Data Wrangling

Load Data

Types of Health Activity by Week number for the Year 2017

Filter Data and add to Sheet

D Fs of Health Activities

Import Rescuetime Data

## [1] "integer"
##  [1] "Reference & Learning"       "Communication & Scheduling"
##  [3] "Social Networking"          "Business"                  
##  [5] "Utilities"                  "Design & Composition"      
##  [7] "Entertainment"              "Software Development"      
##  [9] "Uncategorized"              "News & Opinion"            
## [11] "Shopping"                   "Miscellaneous"

Sum of time and percent of total time in each category of productivity for 2017

Productivity sum P
-2 84.27556 0.0311079
-1 489.65000 0.1807400
0 934.40833 0.3449095
1 527.00972 0.1945302
2 673.79722 0.2487125

Total % of time spent in productive activities during 2017: 0.443242717273937

Totals

Total Hours of Digital Activity in 2017: 2701.25611111111

Ratio of Productive:Distracting Digital Activity in 2017: 2.09226951617806

Total Hours of Meditation in 2017: 424.233333333333

Total Hours of Yoga in 2017: 289.25

Total Hours of R Usage in 2017: 188.762222222222

Mean, Max, and Total Time in Hrs + Total # of Events per Productivity level for Each week of 2017

Visualization

Rescuetime (Digital Activities)

Graph 1 Timeseries

The rate at which RStudio Usage increases by week in hrs: 0.500887190402477

Graph 1 Time by Category

RT Top Activities by Cat

Initialize API

Read and Prepare Data from Rescuetime API

Density by Hour of Day Graph

Productivity by Day of Week

Graph of Productivity by Day of Week

Linear Correlation Meditation and Productivity

Is there a correlation between Meditation and Productivity in 2017?

## 
## Call:
## lm(formula = Sum.x ~ Sum.y, data = MedPro)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -2.4204 -0.4679 -0.0238  0.4647  3.5432 
## 
## Coefficients:
##              Estimate Std. Error t value Pr(>|t|)
## (Intercept) 3.212e-16  1.360e-01   0.000    1.000
## Sum.y       1.948e-01  1.373e-01   1.418    0.162
## 
## Residual standard error: 0.9904 on 51 degrees of freedom
## Multiple R-squared:  0.03795,    Adjusted R-squared:  0.01909 
## F-statistic: 2.012 on 1 and 51 DF,  p-value: 0.1621

There does not appear to be a correlation

Initialize Parallel

Facebook Activities

Scrape Facebook Activity

Clean FB Activity

Types of FB activities, the sum of total occurences, and the percent of total activities that sum represents:

SAction Sum P
likes 2046 36.98%
liked 897 16.21%
reacted 662 11.97%
commented 510 9.22%
saved 437 7.9%
shared 290 5.24%
replied 282 5.1%
added 106 1.92%
posted 65 1.17%
became 49 0.89%
wrote 49 0.89%
is 42 0.76%
updated 35 0.63%
reached 26 0.47%
was 18 0.33%
followed 11 0.2%
recommended 4 0.07%
created 2 0.04%
poked 1 0.02%

Graph Activity