ANLY512: Data Visualization
The Quantified Self (QS) is a movement motivated to leverage the synergy of wearables, analytics, and “Big Data”. This movement exploits the ease and convenience of data acquisition through the internet of things (IoT) to feed the growing obsession of personal informatics and quotidian data. The website http://quantifiedself.com/ is a great place to start to understand more about the QS movement.
I have provided Information on my daily calorie intake and exercise . The data consists of a measure on daily activities like calories intake, walk activity, wine intake and many more. The data is collected from feb 8th 2019 to April 10th 2019.
Summary of 5 Quantified Self Questions:
In most days the calorie consumption is under 3000. This can be interpreted as the usual daily requirement. However there are several days with a calories consumption of over 4000 calories.
From the boxplots it can be seen that on average there was a net decrease in weight change during the days of a brisque walk of more than 20 minutes as oppsed to the days without a brisque walk. The days without a brisque walk actual show a slight net gain in weight.
The correlation plot shows there is a positive correlation between increase in weight and the amount of consumed calories per ounce. Between 0.5 and 1.25 units of consumed calories there is an average net weight loss and an average increase aftewards.
There seems to be an average net gain in weight on the days wine is taken. This could be justified by thye extra calories associated with wine.
There is consistent fluctuation in the daily weight change. There is a regular weight gain and weight loss which roughly averages to zero net gain. this shows that an observation over a longer period of time is required for further insight into a weight change trend.
Based on the visual analytics, following conclusions can be drawn
There is an average weight loss associated with brisk walking activities.
An increase in calories intake is associated with a net weight gain.
Taking wine causes a slight increase in weight change..
The daily weight fluctuates consistently hence there other factors affecting weight gain. .
---
title: "ANLY 512 Final Project"
author: "Karoli Sakwa"
output:
flexdashboard::flex_dashboard:
storyboard: true
social: menu
source: embed
orientation: columns
vertical_layout: fill
---
```{r setup, include=FALSE}
library(flexdashboard)
library(knitr)
library(ggplot2)
library(tidyverse)
library(dplyr)
library(xts)
library(zoo)
library(lubridate)
health<- read.csv("myhealth.csv")
```
###Overview of the Quantified Self movement

***
ANLY512: Data Visualization
The Quantified Self (QS) is a movement motivated to leverage the synergy of wearables, analytics, and "Big Data". This movement exploits the ease and convenience of data acquisition through the internet of things (IoT) to feed the growing obsession of personal informatics and quotidian data. The website http://quantifiedself.com/ is a great place to start to understand more about the QS movement.
I have provided Information on my daily calorie intake and exercise . The data consists of a measure on daily activities like calories intake, walk activity, wine intake and many more. The data is collected from feb 8th 2019 to April 10th 2019.
Summary of 5 Quantified Self Questions:
1. What is the amount of total Calories consumed each day?
2. How does weight change compare to days with brisk walking activity as opposed to days without.
3. Is there a correlation calories sonsumed per per Oz and weight change?
4. Is there a relationship between taking wine and weight change?
5. How did the weight change during the period of study ?
###Q1: What is the amount of total Calories consumed each day?
```{r 1, echo=FALSE}
ggplot(health) +
aes(day, calories) +
geom_bar(stat = "identity", color = 'Green') +
labs(title = 'Consumed calories per day plot', x = 'day', y = 'consumed calories')
```
***
In most days the calorie consumption is under 3000. This can be interpreted as the usual daily requirement. However there are several days with a calories consumption of over 4000 calories.
###Q2: Is there a correlation between brisk walking activity taken to resulting daily weight change?
```{r 2, echo=FALSE}
ggplot(health) +
aes(walk, change) +
geom_boxplot(fill = "#4271AE", colour = "#1F3552", alpha = 0.5) +
scale_x_discrete(name = "brisk walk days of over 20 minutes") +
scale_y_continuous(name = "change in weight in ounces") +
ggtitle("Boxplot of change in weight by brisk walk days") +
theme_bw()
```
***
From the boxplots it can be seen that on average there was a net decrease in weight change during the days of a brisque walk of more than 20 minutes as oppsed to the days without a brisque walk. The days without a brisque walk actual show a slight net gain in weight.
### Q3: Is there a correlation calories consumed per per Oz and weight change??
```{r 3, echo=FALSE}
ggplot(health) +
aes(cals_per_oz, change) +
geom_point(color = 'Blue') +
geom_smooth(method = "lm",color = 'Red') +
labs(title = 'Consumed calories per Oz vs change in weight plot', x = 'cosumed calories per ounce', y = 'change in weight')
```
***
The correlation plot shows there is a positive correlation between increase in weight and the amount of consumed calories per ounce. Between 0.5 and 1.25 units of consumed calories there is an average net weight loss and an average increase aftewards.
###Q4: Is there a relationship between taking wine and weight change?
```{r 4, echo=FALSE}
health$wine <- as.factor(health$wine)
ggplot(health) +
aes(wine, change) +
geom_boxplot(fill = "#4271AE", colour = "#1F3552", alpha = 0.5) +
scale_x_discrete(name = "day finished with at least one large glass of wine when not accompanied by other fluids") +
scale_y_continuous(name = "change in weight in ounces") +
ggtitle("Boxplot of change in weight by wine days") +
theme_bw()
```
***
There seems to be an average net gain in weight on the days wine is taken. This could be justified by thye extra calories associated with wine.
###Q5: How did the weight change during the period of study ?
```{r 5, echo=FALSE}
ggplot(health) +
aes(day, change) +
geom_line(stat = "identity", color = 'blue') +
labs(title = 'Daily change in weight plot', x = 'day', y = 'change in weight')
```
***
There is consistent fluctuation in the daily weight change. There is a regular weight gain and weight loss which roughly averages to zero net gain. this shows that an observation over a longer period of time is required for further insight into a weight change trend.
###Conclusion
Based on the visual analytics, following conclusions can be drawn
1. There is an average weight loss associated with brisk walking activities.
2. An increase in calories intake is associated with a net weight gain.
3. Taking wine causes a slight increase in weight change..
4. The daily weight fluctuates consistently hence there other factors affecting weight gain. .