title: “Activity levels & Sleep patterns during a pandemic” author: “Group 3 - Ramya Rambhatla & Flor Guillen” date: “2020-07-30” output: flexdashboard::flex_dashboard: orientation: columns vertical_layout: fill social: scroll source_code: embed —
2020 has been a very strange year to say the least. It feels like suddenly everyone everywhere started talking about coronavirus and how highly contagious and dangerous it was because there was no vaccine for it. The number of infected people kept rising but we all continued with our lives. Then suddenly, China ordered to have a localized “lockdown”, and many countries followed suit.
Here in the US, the restrictions varied from State to State, but many adopted stay-at-home orders around mid March 2020. For many people, this was a struggle as it meant a complete change to their routines, especially those with children or those who cared for elderly relatives. Many people lost their jobs and many were furloughed as businesses struggled to keep up.
For some of us this also meant the possibility of working from home, reducing the amount of time spent in a car and allowing ourselves to engage in outdoor activities (whilst keeping social distancing, of course!), spending more time with our families/pets, etc.
We would like to examine our data in terms of whether the variables collected are of relevance, if there is any correlation between them and whether there was a shift between having a normal routine and being in a lockdown.
Data Collection
Our group has collected data from someone in our team with the following characteristics:
*Individual: 30-35 age range
*Activity level: Moderately active
*Data collected: daily between March 1st & June 30th 2020
*Stay-at-home order: between March 16th - May 29th 2020
Variables
The data collected focuses on the following variables:
*Calories burned
*Steps taken
*Distance walked
*Activity levels
*Minutes in bed
*Time asleep / awake
*Depths of sleep
# A tibble: 6 x 16
Date `Calories Burne~ Steps Distance `Minutes Sedent~
<dttm> <dbl> <dbl> <dbl> <dbl>
1 2020-03-01 00:00:00 1984 7632 3.14 1144
2 2020-03-02 00:00:00 2034 6869 2.78 1096
3 2020-03-03 00:00:00 1978 5122 2.1 717
4 2020-03-04 00:00:00 2062 7321 3 778
5 2020-03-05 00:00:00 2120 7261 2.92 536
6 2020-03-06 00:00:00 1907 5002 2.05 821
# ... with 11 more variables: `Minutes Lightly Active` <dbl>, `Minutes Fairly
# Active` <dbl>, `Minutes Very Active` <dbl>, `Activity Calories` <dbl>,
# `Minutes Asleep` <chr>, `Minutes Awake` <chr>, `Number of
# Awakenings` <chr>, `Time in Bed` <chr>, `Minutes REM Sleep` <chr>, `Minutes
# Light Sleep` <chr>, `Minutes Deep Sleep` <chr>
Rows: 122
Columns: 16
$ Date <dttm> 2020-03-01, 2020-03-02, 2020-03-03, 2020-...
$ `Calories Burned` <dbl> 1984, 2034, 1978, 2062, 2120, 1907, 2059, ...
$ Steps <dbl> 7632, 6869, 5122, 7321, 7261, 5002, 7900, ...
$ Distance <dbl> 3.14, 2.78, 2.10, 3.00, 2.92, 2.05, 3.24, ...
$ `Minutes Sedentary` <dbl> 1144, 1096, 717, 778, 536, 821, 438, 525, ...
$ `Minutes Lightly Active` <dbl> 278, 344, 304, 320, 406, 293, 311, 217, 27...
$ `Minutes Fairly Active` <dbl> 14, 0, 5, 0, 0, 0, 6, 22, 0, 0, 8, 0, 9, 1...
$ `Minutes Very Active` <dbl> 4, 0, 1, 0, 0, 0, 3, 3, 0, 0, 2, 0, 0, 2, ...
$ `Activity Calories` <dbl> 899, 946, 856, 928, 1094, 776, 971, 753, 7...
$ `Minutes Asleep` <chr> "336", "N/A", "372", "454", "304", "294", ...
$ `Minutes Awake` <chr> "49", "N/A", "41", "44", "38", "32", "N/A"...
$ `Number of Awakenings` <chr> "29", "N/A", "26", "36", "24", "21", "N/A"...
$ `Time in Bed` <chr> "385", "N/A", "413", "498", "342", "326", ...
$ `Minutes REM Sleep` <chr> "85", "N/A", "108", "118", "63", "51", "N/...
$ `Minutes Light Sleep` <chr> "192", "N/A", "211", "244", "186", "201", ...
$ `Minutes Deep Sleep` <chr> "59", "N/A", "53", "92", "55", "42", "N/A"...
This scatterplot shows the relationship between the number of steps taken on a daily basis and the calories burned. As you can see there is a positive relationship between those two variables. The amount of calories burned increase with the number of steps taken. You can also observe that there’s a relationship between those two variables and the minutes very active - which means the longer the individual was highly (or very) active, the most calories they burned.
The scatterplot shows there is positive relationship between the distance walked and the activity calories, which is different from the calories burned. The Rsquare value of 0.83 shows that there is a strong positive linear relationship between these two variables. The line plot shows there is a positive correlation between the The amount of calories burned increase with the number of steps taken. You can also observe that there’s a relationship between those two variables and the minutes very active - which means the longer the individual was highly (or very) active, the most calories they burned.
After examining all the plots presented in this dashboard, there seems to be a strong correlation between the activity levels, distance walked and the number of calories burned.
Despite what we originally thought, there doesn’t seem to be a strong relationship between the number of steps taken and the minutes of deep sleep. Also, it looks like being under a stay-at-home order did not change the activity levels of the individuals in any major way.