The data collection process relates to my New Year’s resolutions to better my life, through: a reduction in unproductive behavior (television viewing and social media), improved dietary habits, and increased physical activity/exercise. My data has six variables that can be linked to my New Year’s objectives and these are Date, SocialMedia, ShowsViewed, CalorieIntake, SleepRegiment, and ExerciseIntensity. • Date: An interval variable that represents each of the days in January of 2020. It represents the 31 days across which the data was collected, recorded, and stored. • SocialMedia: This is a nominal scale variable that indicates the social medial platform that was most utilized on a given day of January 2020 based on my mobile phone’s data usage statistics. The variable assumes either one of these qualitative values Facebook, YouTube, Twitter, Snapchat, or Instagram. • ShowsViewed: This is another nominal variable that represents a television series that was viewed for the most prolonged duration on a particular day in the same month of January. The variable takes on seven values based on these popular Netflix programs You, Dark, Game of Thrones, Glow, Fleabag, Narcos, and Peaky Blinders. • CalorieIntake: This is a ratio variable that represents the number of calories consumed on a particular day. • SleepRegiment: An Ordinal variable that indicates how much time during that particular day was spent sleeping. The variable has three levels limited (less than 6 hours), Normal (Between 6 and 8 hours), Extended (more than 8 hours). • ExerciseIntensity: This is also a ratio variable that illustrates the number of minutes dedicated to physical activity/ exercise on a given day.
install.packages("plotrix")
##
## The downloaded binary packages are in
## /var/folders/7r/wsdtfqh523b8z62b981v9rp40000gn/T//RtmpGo4CUu/downloaded_packages
library(plotrix)
piedata<-table(dailydata$SocialMedia)
label<-c("Facebook", "Instagram","Snapchat","Twitter","YouTube")
pie3D(piedata, labels = label, explode = 0.1, main = "Social Media Usage")
bardata<-table(dailydata$ShowsViewed)
barplot(bardata[order(bardata, decreasing = TRUE)], main ="Ordered Viewing of Netflix Program", col="Green", xlab = "Program", ylab = "Frequency")
install.packages("ggplot2")
##
## The downloaded binary packages are in
## /var/folders/7r/wsdtfqh523b8z62b981v9rp40000gn/T//RtmpGo4CUu/downloaded_packages
library(ggplot2)
ggplot(dailydata, aes(x=Date, y=CalorieIntake)) + geom_area(fill="Blue")+ geom_point(colour= "Red")+ ggtitle("Daily Calorie Intake")
Question 1: Which social media platform was the most used in January? - The visualization tool used to answer this question was a 3D pie chart. This chart is employed because it can represent the frequencies of the different social media platforms clearly and concisely. Looking at Figure 1 below, it is evident that YouTube was the most used social media platform, followed closely by Instagram. Therefore, to increase the amount of time spent doing productive activities, the consumption of YouTube and Instagram content has to be minimized.
Question 2: Is it possible to rank the Netflix programs from most to least viewed? - An ordered Bar chart as used to illustrate the viewing numbers associated with each of the seven Netflix programs. This visual is appropriate because it provides an informative ranking mechanism that is easy to understand. From the ordering presented in Figure 2 below, it is clear that programs can be ranked from most to least viewed as follows: (1) Game of Thrones, (2) Dark & Narcos (3) Peaky Blinders, (4) Glow, and (5) Fleabag & You.
Question 3: Was there a consistency in caloric intake across the month to demonstrate the observance of a particular diet? - An area chart is the best visual aid to use when checking for balanced or level performance across a given interval. From Figure 3 below, it is evident that the chart has a lot of irregular peaks and toughs; this is an indication of inconsistent eating habits. Therefore, the graph presented suggests that there was no specific diet being followed within January.
Question 4: Is there evidence to support different levels of Calorie Intake across various Sleep Regiments? - A grouped bar chart was used to visualize the differences in calorie intake that are witnessed for the three sleep categories in January. From Figure 4 below, it is clear that for “Extended” sleep, the amount of calorie intake was generally high. On the other hand, there was generally low calorie intake when “Limited” sleep was experienced. Assuming balanced calorie intake is witnessed at 1,500, then “Moderate” sleep does seem to align with almost balanced calorie intake. Hence, we can conclude that calorie intake is indeed different across different sleep regiments.