|
|
- {
- "cells": [
- {
- "cell_type": "code",
- "execution_count": 1,
- "metadata": {},
- "outputs": [
- {
- "name": "stderr",
- "output_type": "stream",
- "text": [
- "── \u001b[1mAttaching packages\u001b[22m ─────────────────────────────────────── tidyverse 1.3.0 ──\n",
- "\n",
- "\u001b[32m✔\u001b[39m \u001b[34mggplot2\u001b[39m 3.3.0 \u001b[32m✔\u001b[39m \u001b[34mpurrr \u001b[39m 0.3.3\n",
- "\u001b[32m✔\u001b[39m \u001b[34mtibble \u001b[39m 3.0.1 \u001b[32m✔\u001b[39m \u001b[34mdplyr \u001b[39m 0.8.4\n",
- "\u001b[32m✔\u001b[39m \u001b[34mtidyr \u001b[39m 1.0.2 \u001b[32m✔\u001b[39m \u001b[34mstringr\u001b[39m 1.4.0\n",
- "\u001b[32m✔\u001b[39m \u001b[34mreadr \u001b[39m 1.3.1 \u001b[32m✔\u001b[39m \u001b[34mforcats\u001b[39m 0.5.0\n",
- "\n",
- "── \u001b[1mConflicts\u001b[22m ────────────────────────────────────────── tidyverse_conflicts() ──\n",
- "\u001b[31m✖\u001b[39m \u001b[34mdplyr\u001b[39m::\u001b[32mfilter()\u001b[39m masks \u001b[34mstats\u001b[39m::filter()\n",
- "\u001b[31m✖\u001b[39m \u001b[34mdplyr\u001b[39m::\u001b[32mlag()\u001b[39m masks \u001b[34mstats\u001b[39m::lag()\n",
- "\n",
- "------------------------------------------------------------------------------\n",
- "\n",
- "You have loaded plyr after dplyr - this is likely to cause problems.\n",
- "If you need functions from both plyr and dplyr, please load plyr first, then dplyr:\n",
- "library(plyr); library(dplyr)\n",
- "\n",
- "------------------------------------------------------------------------------\n",
- "\n",
- "\n",
- "Attaching package: ‘plyr’\n",
- "\n",
- "\n",
- "The following objects are masked from ‘package:dplyr’:\n",
- "\n",
- " arrange, count, desc, failwith, id, mutate, rename, summarise,\n",
- " summarize\n",
- "\n",
- "\n",
- "The following object is masked from ‘package:purrr’:\n",
- "\n",
- " compact\n",
- "\n",
- "\n",
- "\n",
- "Attaching package: ‘lubridate’\n",
- "\n",
- "\n",
- "The following objects are masked from ‘package:dplyr’:\n",
- "\n",
- " intersect, setdiff, union\n",
- "\n",
- "\n",
- "The following objects are masked from ‘package:base’:\n",
- "\n",
- " date, intersect, setdiff, union\n",
- "\n",
- "\n",
- "Parsed with column specification:\n",
- "cols(\n",
- " date = \u001b[31mcol_character()\u001b[39m,\n",
- " class = \u001b[31mcol_character()\u001b[39m,\n",
- " club = \u001b[32mcol_double()\u001b[39m,\n",
- " hw = \u001b[32mcol_double()\u001b[39m,\n",
- " stress = \u001b[32mcol_double()\u001b[39m,\n",
- " fatigue = \u001b[32mcol_double()\u001b[39m,\n",
- " productivity = \u001b[32mcol_double()\u001b[39m,\n",
- " diet = \u001b[32mcol_double()\u001b[39m,\n",
- " work_total = \u001b[32mcol_double()\u001b[39m,\n",
- " total_hours = \u001b[32mcol_double()\u001b[39m\n",
- ")\n",
- "\n"
- ]
- }
- ],
- "source": [
- "library(tidyverse)\n",
- "\n",
- "library(plyr)\n",
- "library(lubridate)\n",
- "\n",
- "data <- read_csv(\"data.csv\", col_names=TRUE)"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 2,
- "metadata": {},
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "\u001b[90m# A tibble: 251 x 10\u001b[39m\n",
- " date class club hw stress fatigue productivity diet work_total\n",
- " \u001b[3m\u001b[90m<chr>\u001b[39m\u001b[23m \u001b[3m\u001b[90m<chr>\u001b[39m\u001b[23m \u001b[3m\u001b[90m<dbl>\u001b[39m\u001b[23m \u001b[3m\u001b[90m<dbl>\u001b[39m\u001b[23m \u001b[3m\u001b[90m<dbl>\u001b[39m\u001b[23m \u001b[3m\u001b[90m<dbl>\u001b[39m\u001b[23m \u001b[3m\u001b[90m<dbl>\u001b[39m\u001b[23m \u001b[3m\u001b[90m<dbl>\u001b[39m\u001b[23m \u001b[3m\u001b[90m<dbl>\u001b[39m\u001b[23m\n",
- "\u001b[90m 1\u001b[39m 1/3/… 0 0 0 4 8 6 2 3.82\n",
- "\u001b[90m 2\u001b[39m \u001b[31mNA\u001b[39m \u001b[31mNA\u001b[39m \u001b[31mNA\u001b[39m \u001b[31mNA\u001b[39m \u001b[31mNA\u001b[39m \u001b[31mNA\u001b[39m \u001b[31mNA\u001b[39m \u001b[31mNA\u001b[39m \u001b[31mNA\u001b[39m \n",
- "\u001b[90m 3\u001b[39m 1/4/… 0 0 0 5 7 6 3 0 \n",
- "\u001b[90m 4\u001b[39m \u001b[31mNA\u001b[39m \u001b[31mNA\u001b[39m \u001b[31mNA\u001b[39m \u001b[31mNA\u001b[39m \u001b[31mNA\u001b[39m \u001b[31mNA\u001b[39m \u001b[31mNA\u001b[39m \u001b[31mNA\u001b[39m \u001b[31mNA\u001b[39m \n",
- "\u001b[90m 5\u001b[39m 1/5/… 0 0 0 4 6 6 1 0 \n",
- "\u001b[90m 6\u001b[39m \u001b[31mNA\u001b[39m \u001b[31mNA\u001b[39m \u001b[31mNA\u001b[39m \u001b[31mNA\u001b[39m \u001b[31mNA\u001b[39m \u001b[31mNA\u001b[39m \u001b[31mNA\u001b[39m \u001b[31mNA\u001b[39m \u001b[31mNA\u001b[39m \n",
- "\u001b[90m 7\u001b[39m 1/6/… 0 2 0 6 7 5 4 3.95\n",
- "\u001b[90m 8\u001b[39m \u001b[31mNA\u001b[39m \u001b[31mNA\u001b[39m \u001b[31mNA\u001b[39m \u001b[31mNA\u001b[39m \u001b[31mNA\u001b[39m \u001b[31mNA\u001b[39m \u001b[31mNA\u001b[39m \u001b[31mNA\u001b[39m \u001b[31mNA\u001b[39m \n",
- "\u001b[90m 9\u001b[39m 1/7/… 0 0 0 3 5 7 7 5.8 \n",
- "\u001b[90m10\u001b[39m \u001b[31mNA\u001b[39m \u001b[31mNA\u001b[39m \u001b[31mNA\u001b[39m \u001b[31mNA\u001b[39m \u001b[31mNA\u001b[39m \u001b[31mNA\u001b[39m \u001b[31mNA\u001b[39m \u001b[31mNA\u001b[39m \u001b[31mNA\u001b[39m \n",
- "\u001b[90m# … with 241 more rows, and 1 more variable: total_hours \u001b[3m\u001b[90m<dbl>\u001b[90m\u001b[23m\u001b[39m\n"
- ]
- }
- ],
- "source": [
- "print(data)"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 3,
- "metadata": {},
- "outputs": [],
- "source": [
- "data <- data %>% drop_na(date)\n",
- "\n",
- "data$class <- as.numeric(data$class)\n",
- "\n",
- "data[is.na(data)] = 0"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 4,
- "metadata": {},
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "\u001b[90m# A tibble: 6 x 10\u001b[39m\n",
- " date class club hw stress fatigue productivity diet work_total\n",
- " \u001b[3m\u001b[90m<date>\u001b[39m\u001b[23m \u001b[3m\u001b[90m<dbl>\u001b[39m\u001b[23m \u001b[3m\u001b[90m<dbl>\u001b[39m\u001b[23m \u001b[3m\u001b[90m<dbl>\u001b[39m\u001b[23m \u001b[3m\u001b[90m<dbl>\u001b[39m\u001b[23m \u001b[3m\u001b[90m<dbl>\u001b[39m\u001b[23m \u001b[3m\u001b[90m<dbl>\u001b[39m\u001b[23m \u001b[3m\u001b[90m<dbl>\u001b[39m\u001b[23m \u001b[3m\u001b[90m<dbl>\u001b[39m\u001b[23m\n",
- "\u001b[90m1\u001b[39m 2020-01-03 0 0 0 4 8 6 2 3.82\n",
- "\u001b[90m2\u001b[39m 2020-01-04 0 0 0 5 7 6 3 0 \n",
- "\u001b[90m3\u001b[39m 2020-01-05 0 0 0 4 6 6 1 0 \n",
- "\u001b[90m4\u001b[39m 2020-01-06 0 2 0 6 7 5 4 3.95\n",
- "\u001b[90m5\u001b[39m 2020-01-07 0 0 0 3 5 7 7 5.8 \n",
- "\u001b[90m6\u001b[39m 2020-01-08 0 0 3 3 4 5 6 4.63\n",
- "\u001b[90m# … with 1 more variable: total_hours \u001b[3m\u001b[90m<dbl>\u001b[90m\u001b[23m\u001b[39m\n"
- ]
- }
- ],
- "source": [
- "data$date <- parse_date(data$date, \"%m/%d/%y\")\n",
- "print(head(data))"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 5,
- "metadata": {},
- "outputs": [],
- "source": [
- "\n",
- "data$ymd = lubridate::isoweek(ymd(data$date))\n",
- "\n",
- "data$wday = wday(data$date)"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 6,
- "metadata": {},
- "outputs": [
- {
- "data": {
- "image/png": "iVBORw0KGgoAAAANSUhEUgAAA0gAAANICAIAAAByhViMAAAACXBIWXMAABJ0AAASdAHeZh94\nAAAgAElEQVR4nOzdZ3xU1dr38TUtmfROCoQWSkIHAUFAASnSQRRFlGI54C2oNxiEwzliBTyK\nigVQQEEsoIiIIFgQBAsWkHpThABCQghppE7fz4s5Z56cgMmEzJoMe37fT17MXllz5RoSMv+s\n3TSKoggAAABc+7R13QAAAAA8g2AHAACgEgQ7AAAAlSDYAQAAqATBDgAAQCUIdgAAACpBsAMA\nAFAJgl31Zs2apdFoli5d6tz8xz/+odFoXn/99brtCgAAoBK1Bbt9+/Zp/ltoaGjTpk1vu+22\nlStXlpWVXUXNqKioRo0ahYWFebbJZs2a/dWE0NBQjUaTnZ3tqa8IAAD8gb6uG5AiNDR0yJAh\nzsclJSUZGRnr16//5JNP/vGPf7zzzjv9+/evUbXHH3/88ccfl9AmAACAJ6kz2MXHx69Zs6bi\nyJkzZ5577rlly5YNGTJk06ZNAwYMqKveAAAAJFHbrti/0qhRo7feeutf//qX1Wq97777ysvL\nXZ8qKiqaPXt2WlpaUFBQYGBg8+bN09PTi4qKXBMqHWNXUc+ePTUazebNmyuN79ixQ6PR9OzZ\n01P9W63WRYsWdenSJSwszGg0NmvWbOrUqVlZWa4JU6dO1Wg0K1eurPis3bt3azSaoUOHOjfn\nzJmj0Wg2bty4ePHi+vXrR0ZGOsfXrVvXt2/f6OjogICApKSkQYMGbdmyxVOdAwAAr/GXYOf0\n2GOPdejQ4dy5c+vWrXOOWK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ptv8vLyxo4dazAYPNKwc/+poiiXf8rhcLgmuK9SYwaD\nYenSpWfOnFm6dOmIESPOnj37r3/9KzU11bnuCAAAriH+FewsFssHH3wghBg8eLBz5OmnnxZC\nbNq06eWXXx47duzgwYNvueWW+Pj4GpWdOHGiRqNZu3atoijO+s6o5xGhoaHBwcFWq7WwsLDS\npy5evCj+swJ3xfx3/vx5N79KYmLi5MmTN2zYkJOTs2TJEofDMXnyZLPZ7IEXAAAAvMW/gt1j\njz2WmZnZpk0b535Ss9mcmZkZGhp64403uuYoirJ169YalW3cuHHv3r0zMzO3bt366aefpqWl\n1eigt2o5q/3www8VB/Pz848dOxYUFNS6dWshhNFoFEIUFBRUnPPrr79WW/zMmTMV85/RaJwy\nZcoNN9xQWFiYkZHhkf4BAIB3+EuwO3fu3Lhx41577bXg4OB3333Xub4VGBgYHR1dUlJy9uxZ\n5zRFUZ5++mnnObOXr5BVYeLEiUKIhx56qKSkxONXCXEe/TZv3jyLxeIanDdvns1mGzdunPNU\n2aZNmwohNm7c6Fq0O3LkyLJly6quvH///saNG999990VKxcXF2dkZOh0unr16nn2hQAAAKnU\nefJEdnb2bbfd5nxssVjOnj174MABh8NRv379jz76qGPHjq6ZEydOfOmll26++eYJEyYIITZt\n2lRQULBq1aqBAweuWbMmOTl53Lhx7nzF2267berUqadOndJqtXfffbdnX84999yzfv36zz77\n7Lrrrhs0aJDBYPj555+3bdvWokWLBQsWOOeMHj161qxZ3333XY8ePbp163b+/PlNmzbNnTs3\nPT3deSjeFbVv3/6uu+764IMP0tLSBg0aFBMTk5ubu3nz5nPnzj3yyCOuK/MBAIBrgjqDXWlp\n6SeffOJ8rNVqY2Ji+vTpM3LkyPvuu6/SJd+ee+65oKCgNWvWPPPMM/Xq1Rs2bNjTTz8dExMz\nceLEjz/++JVXXnEdjVe14ODgMWPGrFixonfv3snJyZ59ORqNZt26dW+88ca77777xhtv2O32\nJk2azJ49e+bMma5L5dWrV++HH3545JFHdu/effDgwdatW7/33ns9evRIT0+v+rotq1ev7tGj\nx/vvv7927dqCgoLQ0NB27drNnTvXuQYJAACuIZornm6JqzB//vy///3vq1ev9viKHQAAgDsI\ndp5htVpTUlLKy8vPnTtX8f4QAAAAXuMvJ0/INnPmzLNnzz788MOkOgAAUFdYsauVo0ePrly5\n8ocffvj+++/bt2//008/uXnbVgAAAI8j2NXKt99+279//+Dg4GHDhi1atKjS3boAAAC8iWAH\nAACgEhxjBwAAoBIEOwAAAJUg2AEAAKgEwQ4AAEAlCHYAAAAqQbADAABQCYIdAACAShDsAAAA\nVEJf1w140iuvvHL8+PFqp9lsNo1Go9PpvNBSXXE4HEIIrVbNwd1utyuKoter6me4EkVRHA6H\n6n9Wna9Ro9HUdS8S2e12vo8qoPrvo6Iodrtdq9W68/Zx//33d+rUyQtdoUZU9aZ45MiRBx54\nIDExsepphYWFGo0mIiLCO13VCbPZ7HA41H3j2uLiYpvNFhUVVdeNSGSz2cxmc0hISF03IlFZ\nWZnZbA4PD1fx+6WiKEVFRar/nVNWVhYSEhIQEFDXvUhUWFgYGRlZ111IZLPZiouLAwMDg4OD\nq565YsWKvLw873SFGlFVsBNCxMfH169fv+o5RqNRq9WqOxCYTCaHw1Ht/8xr2qVLl6xWa2xs\nbF03IpHVajWZTGFhYXXdiEQlJSUmkykyMlLFi6+KooSEhKj+d05JSUlYWFhgYGBd9yJRUFBQ\ndHR0XXchkdVqvXTpUlBQULV/T6r799I1Tc276gAAAPwKwQ4AAEAlCHYAAAAqQbADAABQCYId\nAACAShDsAAAAVIJgBwAAoBIEOwAAAJUg2AEAAKgEwQ4AAEAlCHYAAAAqQbADAABQCYIdAACA\nShDsAAAAVIJgBwAAoBIEOwAAAJUg2AEAAKgEwQ4AAEAlCHYAAAAqQbADAABQCYIdAACAShDs\nAAAAV
- "text/plain": [
- "plot without title"
- ]
- },
- "metadata": {
- "image/png": {
- "height": 420,
- "width": 420
- },
- "text/plain": {
- "height": 420,
- "width": 420
- }
- },
- "output_type": "display_data"
- }
- ],
- "source": [
- "ggplot(data, aes(ymd, wday))+ \n",
- " geom_tile(aes(fill= total_hours), color=\"purple\") +\n",
- " ggtitle(\"Daily Hours\") +\n",
- " labs(x=\"School Week\", y=\"Day of Week\") +\n",
- " scale_y_continuous(name=\"Day of week\",trans = \"reverse\",\n",
- " breaks=c(1,2,3,4,5,6,7),\n",
- " labels=c(\"Sun\", \"Mon\", \"Tue\", \"Wed\",\"Thr\",\"Fri\",\"Sat\")) +\n",
- " theme_bw()\n",
- "ggsave(file=\"weekly.png\", width=10, height=4, dpi=300)"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 7,
- "metadata": {},
- "outputs": [
- {
- "data": {
- "image/png": "iVBORw0KGgoAAAANSUhEUgAAA0gAAANICAIAAAByhViMAAAACXBIWXMAABJ0AAASdAHeZh94\nAAAgAElEQVR4nOzdeXxU5b0/8OecM3PO7FuALDNhCQiERSqggoDILkZr1aq1WtqrP8VWpbZe\nt1tbtXVr1RZr9Vq1arX1ou211lZRSFhEEEUF2UG2kJ0ss+9n+f1xktwYCNlm5sw55/P+w5dM\nhsl3AoQPz/N9vg8lSRIBAAAAAPWjlS4AAAAAADIDwQ4AAABAIxDsAAAAADQCwQ4AAABAIxDs\nAAAAADQCwQ4AAABAIxDsAAAAADQCwa4f7rvvPoqi/vCHPwz4CQAAAADZo4Jgd/7551MU9cor\nr5z8oSVLllAUde+99578oZtvvpmiqLvvvjvr9WXUjh07KIoaM2ZMT0+w2WwURTU2NuayKgAA\nAFAFFQS7iy++mBCyevXqbo/H4/EPP/zwlB8ihHzwwQedPxcAAABAD1QT7NauXSsIQtfHN2zY\nkEgkhg8fvnPnzm4rWPv37z927JjH4znvvPNyWisAAACAclQQ7CZMmFBWVub3+7du3dr18fff\nf58QsmLFCkmS5P/v9qELL7yQYRj5EUmSXnzxxZkzZ9rtdrPZXF5e/vOf/zwajXb9WX15Tjdt\nbW3jxo1jGOZvf/tbtw/Nnj2boqh333232+MbNmygKGr27Nn9+BKcVjqdfuqpp84++2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df\nfbWgoODBBx/csmXLacr+wQ9+QAi55ZZbIpFIpsbXdZLLfuSRR1KpVOeDjzzyCM/z1157rbyo\nVlZWRgh55513Ohft9u3bJ58CPo0vv/xy5MiR1113XddXDofDR44cYRhm2LBhmX0jAAAAMHiq\n2YolhEyZMqW0tFRus+u6DytbtGjRX//6V1EUL7/88m4nN6+66qq33377f/7nf84666yrr77a\nbrfv3r37nXfeMZvNd955Z9+f043X633xxRcvu+yy7373uzt27Ohpgsm3v/3tW2+99ejRozRN\nX3fddYP+MnzN9773vbfeeuuf//zntGnTli5dajQaP/nkk6qqqrFjxz722GPyc6644op77rln\n48aNs2bNmjFjRkNDw7///e/777//zjvvlFvxTmnKlCnf/e53X3/99fLy8qVLlxYUFLS0tLz7\n7ru1tbU//vGPCwoKMvtGAAAAIANyMy4vU374wx/KZXedmiv7y1/+In/opZdeOvknCoLwwgsv\nyNeFGQwGn8+3bNmyffv29es5XecPd1q+fDkh5Morr+zpCZIkyetq8+fP7/UN9ndAsSRJ6XR6\n5cqVU6dOtVgsHMeNHz/+3nvv7TYAedeuXfPnz7dYLDab7dxzz3377bflhckLLrhAfsKjjz5K\nCHn88ce7fUGeeeaZ8847b8iQIQzDOJ3OOXPmvPTSS6Io9vpGAAAAIPco6VRnKiGzHn300f/6\nr/967bXXMr5iBwAAANAJwS7r0un06NGj4/F4bW0tTpICAABA9qjp8IRK3XXXXTU1NStWrECq\nAwAAgKzCil227N+//5VXXtm8efNHH300ZcqUjz/+2Gw2K10UAAAAaBmCXbasW7du0aJFFovl\nkksueeqpp3qdewwAAAAwSAh2AAAAABqBHjsAAAAAjUCwAwAAANAIBDsAAAAAjUCwAwAAANAI\nBDsAAAAAjUCwAwAAANAIBDsAAAAAjUCwAwAAANAIg9IF9G7lypUHDx5UuorsEgSBpmmKopQu\nJBdEURRFkWEY/bxfiqL082ZFUaRpmqZ18Y9GSZIkSdLPm5W/U+nn/crfqZQuJLvGjx+/YsUK\npauAT
- "text/plain": [
- "plot without title"
- ]
- },
- "metadata": {
- "image/png": {
- "height": 420,
- "width": 420
- },
- "text/plain": {
- "height": 420,
- "width": 420
- }
- },
- "output_type": "display_data"
- }
- ],
- "source": [
- "data %>% group_by(ymd) %>%\n",
- " dplyr::summarise(total = sum(total_hours),\n",
- " work_t = sum(work_total), \n",
- " class_t = sum(class),\n",
- " hw_t = sum(hw)) %>%\n",
- " gather(key,value, total, work_t, class_t, hw_t) %>%\n",
- " ggplot(mapping=aes(x = ymd)) + \n",
- " ggtitle(\"Weekly Hours\") +\n",
- " geom_line(mapping=aes(y = value, colour = key)) +\n",
- " labs(x=\"School Week\", y=\"Hours\") +\n",
- " scale_colour_discrete(name=\"Categories\",\n",
- " breaks=c(\"total\", \"work_t\", \"class_t\", \"hw_t\"),\n",
- " labels=c(\"Total Hours\", \"Work\", \"In Class\", \"HW\")) + \n",
- " theme_bw()\n",
- "ggsave(file=\"weeklyLineGraph.png\", width=8, height=4, dpi=300)"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 8,
- "metadata": {},
- "outputs": [
- {
- "data": {
- "image/png": "iVBORw0KGgoAAAANSUhEUgAAA0gAAANICAIAAAByhViMAAAACXBIWXMAABJ0AAASdAHeZh94\nAAAgAElEQVR4nOzdeZhU1bkv/u/au+bq6qrqeaAHQAQEUUEQEAUZNA4JxilRY4wxuWqGk/x8\nbqKJJ2qMU07Mz5zjTdQYTbjGGOcBZxFBUQSERgSZaeh5rq6uqq5x73X/2E3Zdld317B3VXX1\n+3nucx971x7W7pNu3l7rfd/FOOcghBBCCCHjn5DpARBCCCGEEHVQYEcIIYQQkiMosCOEEEII\nyREU2BFCCCGE5AgK7AghhBBCcgQFdoQQQgghOYICO0IIIYSQHEGB3VfceuutjLFHHnkk0wMh\nhBBCCElYdgV2O3fuZIwxxi6++OKRznnttdeUc/7zP/8zoZs/+eSTr7766ujnOJ3Ompoam82W\n0J2T4/P57HY7Y+ycc85Jw+MIIYQQkvOyK7BTMMZef/31jo6OmJ+uWbOGMZbEbX/5y1+OGdjd\ncsstR48evfrqq5O4f6Keeuqpvr6+KVOmbNiwYf/+/Wl4IiGEEEJyWzYGdqecckokEvnnP/85\n/COXy7V27dpZs2Yles8jR460tbWpMTrVPPzwwzab7cEHHwRAi7+EEEIISV02Bnbz5s0rLi7+\n+9//Pvyjf//738FgcNWqVUOOc87/9re/LVq0yGazmc3mmTNn/uY3v/H5fMqnl1122dSpUwE8\n/vjjjLElS5YAuO222xhjr7766l/+8pfKykqHw4FYOXayLP/lL3+ZP39+Xl6ezWZbsWLFBx98\nMPjRzz///PLlywsKCgwGQ0VFxfnnn//mm2+O+Y6bN2/euXPnxRdffOGFF5aXl69ZsyYQCAw+\nYdmyZYyxtWvXDrlQWYlesWJFPC8+0msC6Ovr+9WvfjVz5kyz2Ww0GqdNm/aLX/yir69v8LMa\nGhquuuqq4uJii8Uyf/78F198saenhzF2xhlnxPmdJ4QQQkg6ZWNgxzm/9NJLd+/e/emnnw75\n6B//+EdpaemiRYuGHP/ud7/7wx/+8NixYzfccMPNN9/scDjuvvvuJUuWeDweANddd933vvc9\nAAsXLnzwwQd/9rOfATAYDAA2btz4i1/8YunSpVdccUXMwXzrW9/68Y9/3N/ff+21165evXrr\n1q1Lly598sknlU8fe+yxyy+/fPfu3VdcccWtt956/vnnb9269cILL4yeMJKHH34YwLXXXiuK\n4jXXXONyuZ599tnBJ1x11VUAXnjhhSEXKqddc8018bz4SK8ZDocvuuii+++/32q1/uQnP7np\npptEUXzggQdWrlwpSZJyYXd395IlS55++unp06f/8pe/POWUU66++mpl2CaTKc7vPCGEEELS\nimeTuro6ANdee+3WrVsB/OhHPxr86d69ewHcfPPNzz33HIDbbrtNOf7MM88AmDdvXl9fn3JE\nluWf/OQnAG699VbliHLJ9ddfH73bvffeC8But7/99tvRg7fccguAhx9+WPny6aefBnD++edH\nIhHlyL59+ywWi9Vq9Xg8nPOTTz4ZwKFDh6J3aGxstNlsCxcuHOU1u7q6TCZTbW2tLMvKPQEs\nWrRo8Dk9PT0Gg8HpdIZCoejBQCBgt9vNZrPypvG8eMzXVOLFhQsXRt8rGAzOmDEDwKuvvqoc\nue222wBcfvnl0as++ugjs9kMYOnSpfF/5wkhhBCSNtk4Ywdg/vz5J5988tNPPx0MBqMH16xZ\nA+D73//+kJMfe+wxAPfdd1+0mpUx9rvf/U6v1yuXxKRUYMycOfPcc88d6RxlOfjXv/61KIrK\nkenTp99zzz033nijUtvR29vLGLNardFLJk2a1NXVtXnz5lHe7oknnggEAtddd50yhunTpy9e\nvHjz5s27du2KnuN0Os877zyXy7V+/frowbfeesvtdq9evVp503hePOZrzp0798UXX3zooYei\n72UwGFavXg0gOgZlFfgXv/hF9KrFixd/+9vfHvwiyX3nCSGEEKKRLA3sAFx//fUul+ull15S\nvpRl+Z///OeCBQuGV0588sknABYvXjz4oMPhmD17dmtra0NDwyhPGb6qO9hHH30EYN68eYMP\n/vznP3/ggQemTJkC4Otf/zrn/JxzznniiSeixRnK6udIOOePPvqoIAjK6rBCiVYfffTRwWcq\nq7HPP/989MiQddj4X3zIa9bW1n7zm988/fTTAXg8nra2tra2NovFAsDv9wOQZXnfvn2CIJx6\n6qmDL7zwwgsHf5nKd54QQgghqsvewO473/mO0WiMllCsW7euqanpuuuuG3Ka3+/3er0A8vLy\n2FcpC7vNzc2jPKW4uHikj3w+n8/nM5lMyvpjTH/6059uuOGGw4cPX3/99eXl5bNmzbrlllvq\n6+tHeeLbb799+PDhlStXVldXRw9+61vfslqt//znPweXHXzjG9/Iy8t7+eWXlby3QCCwdu3a\nkpISZe4toRcf/povv/zykiVLzGZzfn5+eXl5eXn5HXfcEf3U6/WGQiGbzabX6wdfVVNTE/3v\nFL/zhBBCCFGdLtMDGFFhYeHq1auff/75xsbGqqqqNWvWmM3mK6+8cshpylIjY+z222+PeZ+y\nsrJRnjIkcBlMEAQA4XCYcz5S5zy9Xv/II4/ccccdr7766ptvvrl+/fr/+q//+tOf/vTkk0+O\nVI2h1B+88847Me/5r3/964c//KHy3xaLZfXq1U899dTGjRuXL1/+xhtveDye6667TqfTJfri\nQ17zr3/96w033GCz2W688cYFCxbY7XZBEF5++eXolCHnPPqIwQYfSfE7TwghhBDVZW9gB+D6\n669/9tlnn3zyyZ/+9KcvvfTSJZdcYrfbh5xjMpnsdrvb7f7xj388yvRbEsxms81m83g83d3d\nRUVFo5xZXl5+ww033HDDDYFA4B//+MdPf/rTG264YfXq1UajcciZjY2Nr7/+usPhUBLaBvP5\nfM8///yjjz4aDewAXHXVVU899dQLL7ywfPlypf4jug6byovfddddAF577bWzzz47enBwXmBe\nXp4oih6PR5KkaB6eMv7of2v3nSeEEEJIcrJ3KRaAsl758ssvv/zyy36/f3jZhEJpqzakvRyA\nnp6eFAegZKGtW7du8MH77rtv5cqVH3/8MYBjx461trZGPzKZTDfeeOPixYt7e3uPHDky/IaP\nPvqoJEnXXXfdP4Z57rnnZsyYsX379sFNXs4999yioqK1a9f6/f61a9fOmDFDGVIqLx4MBpub\nm/Py8gZHdZzzt956K/qlKIqTJ0+WJEmp2I0afE7SAyCEEEKIRrI6sBME4brrrtu+ffuaNWsm\nT5480p6q119/PYA777yzs7MzevDDDz8sLS29/PLLlS+V1mvd3d0JDeDaa68F8MADD0RT344e\nPfqHP/xh8+bNM2fO/Oyzz2pra7/zne+EQqHoJR6P58iRI6IolpSUDLlbOBx+/PHHAfzgBz8Y\n5UUGt0fW6XSXX355Y2Pjgw8+6PP5vvOd7yT64sMZjcaCggKv1xudfuOc33XXXUqtQ29vr3Lw\nvPPOA/DQQw9FL9y6deu//vWv1AdACCGEEK1kstfKMNE+dtEjR48eVXLdfvvb30YPDuljxzlX\ncu8qKytvvvnmO+6449JLL9Xr9TabbcuWLcoJhw4dYozp9frvf//7N954I+f8vvvuA/CHP/xh\n8ACG9LGTJOmiiy4CUFNTc+ONN15zzTXRPiPKCUrh6pQpU3784x/ffvvtP/rRj5Tygp/97GfD\n307p+rZkyZKRXr+jo8NgMFit1t7e3ujBDz/8EIDNZmOM1dfXD7lkzBeP+Zo333wzgGnTpt19\n99133333woULp0+f/vbbbwMoLCy8//77Gxsb6+vrlYXvr33ta7fffvu1115rs9l+//vfY1Af\nu3gGQAghhJC0yfbAjnO+atUqQRCOHTsWPTI8sJMk6bHHHlM2ttLpdJMmTfrud7+7d+/ewfe5\n//77i
- "text/plain": [
- "plot without title"
- ]
- },
- "metadata": {
- "image/png": {
- "height": 420,
- "width": 420
- },
- "text/plain": {
- "height": 420,
- "width": 420
- }
- },
- "output_type": "display_data"
- }
- ],
- "source": [
- "data %>% group_by(ymd) %>%\n",
- " dplyr::summarise(stress_a = mean(stress), \n",
- " fatigue_a = mean(fatigue), \n",
- " productivity_a = mean(productivity)) %>%\n",
- " gather(key,value, stress_a, fatigue_a, productivity_a) %>%\n",
- " ggplot(mapping=aes(x = ymd)) + \n",
- " ggtitle(\"Metrics Average\") +\n",
- " geom_line(mapping=aes(y = value, colour = key)) +\n",
- " labs(x=\"School Week\", y=\"Average (1-10)\") +\n",
- " scale_colour_discrete(name=\"Metrics\",\n",
- " breaks=c(\"stress_a\", \"fatigue_a\", \"productivity_a\"),\n",
- " labels=c(\"Stress\", \"Fatigue\", \"Productivity\")) + \n",
- " theme_bw()\n",
- "ggsave(file=\"weeklyLineGraphMetrics.png\", width=8, height=4, dpi=300)"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 9,
- "metadata": {},
- "outputs": [
- {
- "data": {
- "image/png": "iVBORw0KGgoAAAANSUhEUgAAA0gAAANICAIAAAByhViMAAAACXBIWXMAABJ0AAASdAHeZh94\nAAAgAElEQVR4nOzdd3xUVf7/8XNnMplk0kOkhN4EFJYi0hVEEjAEKTYQBTsIqHxXQ7OgKyKL\nCCiKqCyw4FcsKxsQCShNQhUwCEqRBMEQCARIn8xkyv39cfc7v9kQQjJkMszh9Xzw4DH3zLn3\nfu6U5J1zm6KqqgAAAID/0/m6AAAAAFQPgh0AAIAkCHYAAACSINgBAABIgmAHAAAgCYIdAACA\nJAh2AAAAkiDYVdkrr7yiKMoHH3zg60KqgWfbcuDAAUVR+vTp452iAACAh/wj2GlJokWLFlfq\nEBoaqihKdnZ2TVblMW1z3On1+qioqC5dukyfPv3SpUu+LhAAAPilAF8XcOMKDQ0dOHCg9thm\ns2VnZ+/du3fv3r3Lly/fu3dvTEyMb8sDAAB+h2DnM3Xq1Pniiy/cW86ePdu3b9+jR49+8skn\n06ZN81VhAADAT/nHrlgP2Gy299577/bbbw8LCwsKCmrRosWECRPOnDnj6jBhwgRFUZYtW+Y+\n1+7duxVFSUxM1CZffvllRVHWrFmzcOHC+vXrR0ZGlllLr169FEX57rvvyrRv3bpVUZRevXpV\nqeZ69eqNHDlSCHHy5ElX45VqUFV18eLF3bt3DwsLCw4ObtOmzauvvlpcXOy+wIKCgqlTp7Zp\n0yY4ONhoNLZs2TIpKamgoKCCGi5dutSqVSu9Xv/1119rLadOnRo+fHhMTIzJZOrQocOSJUsu\nn6viV7t+/frBwcGlpaWu/nv37tX2QWdlZbkac3JydDrd7bffLoR49dVXta3+7bffhg4dWrt2\n7aCgoA4dOqxcudJ9vf/617/69u0bHR0dGBgYGxt7zz33pKSkXPV1BgBAVnIGO6fTOXjw4IkT\nJxYVFT355JOTJk26+eabP/zww86dO586daryywkMDBRC/Pjjj0lJSb17937wwQfLdHj88ceF\nEEuXLi3T/tVXXwkhHn300apW/ueffwohbr311qvWMGrUqKeffvrUqVNjxoz561//GhkZOWPG\njF69ehUWFmodbDZbYmLirFmzQkJCJkyY8Oyzz+r1+jlz5vTr18/hcJS7dqvVOnjw4N9///3D\nDz984IEHhBC5ubl33HHHl19+eeutt7744ovdunV7+eWX33//ffe5rvpqx8XFWSyWn376yTXL\nli1bXNvlaty6dauqqv3793dtdVpaWs+ePc1m8yOPPNKvX79ffvnl4Ycf3rx5s9b/008/feCB\nB3799dcHH3xwypQp99xzz08//TRw4MAVK1ZU9WUHAEASqj9IS0sTQjRv3vxKHUJCQoQQZ8+e\n1SY/+eQTIUT37t0tFourzyuvvCKEePDBB7XJ8ePHCyGW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+3IrFZrVlZWaGioe6pTVXX9+vWXL61/\n//5GozEpKalv374//vjjW2+9pbXr9fqWLVuKy0622L59u/tkJV/tXr16bd++fceOHRaLxXWf\n2TvuuOPw4cOHDx8+evRomf2wV3Xq1Cn3IB4UFDR27NgePXrk5eWdOHGiSosCAEAOcgY77aCr\nmTNnul8Ud+bMmXa7feTIkdpYjjY4pF34Q+ugnbXg2Rofe+wxIcT48eOLioo8uHydxul0Lliw\nYNOmTUaj0XWR5HJpG/j6669ro2Ka1NTUOnXqaKeOGo3G6OjooqIi7Tg2IYSqqn/729+06+Tl\n5eVdvkydTrd8+fJatWq98cYbO3fu1BoTEhKEEHPnznV1++OPP/7xj39cXkzFr7YQIi4u7uLF\ni//4x
- "text/plain": [
- "plot without title"
- ]
- },
- "metadata": {
- "image/png": {
- "height": 420,
- "width": 420
- },
- "text/plain": {
- "height": 420,
- "width": 420
- }
- },
- "output_type": "display_data"
- }
- ],
- "source": [
- "data %>% \n",
- " group_by(date) %>%\n",
- " gather(key,value, class, club, hw, work_total, total_hours) %>%\n",
- " ggplot(mapping=aes(x = date)) + \n",
- " ggtitle(\"Hourly Breakdowns\") +\n",
- " geom_boxplot(mapping=aes(y = value, colour = key)) +\n",
- " labs(y=\"Hours\") +\n",
- " scale_colour_discrete(name=\"Categories\",\n",
- " breaks=c(\"total_hours\", \"hw\", \"work_total\", \"class\", \"club\"),\n",
- " labels=c(\"Total Hours\", \"HW\", \"Work\", \"Class\", \"Club\")) + \n",
- " theme_bw() +\n",
- " theme(axis.title.x=element_blank(),\n",
- " axis.text.x=element_blank(),\n",
- " axis.ticks.x=element_blank())\n",
- "ggsave(file=\"hourlyBoxPlots.png\", width=6, height=4, dpi=300)"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 10,
- "metadata": {},
- "outputs": [
- {
- "data": {
- "image/png": "iVBORw0KGgoAAAANSUhEUgAAA0gAAANICAIAAAByhViMAAAACXBIWXMAABJ0AAASdAHeZh94\nAAAgAElEQVR4nOzdd3wU1f7/8TO7STabZJMQWoAgJSBFSaT3IhC4FA1RhIgKSDERC1w1CqLS\nRPxqBCyAAhekXHNBkCpcpTdBmhQFRMRgaEKA9LZlfn/M1/3uL40k7LLJ4fV88EfmzJmZzywn\nyTtTFVVVBQAAACo+nbsLAAAAgHMQ7AAAACRBsAMAAJAEwQ4AAEASBDsAAABJEOwAAAAkQbAD\nAACQBMHOacaPH68oyueff+7uQu6Gt956S1GUzz77rFRLHTt2TFGUbt26uaYoAADudfIEOy00\nKIoyYMCAovps3LhR6/PWW2+VauXLli1bv3598X0qVapUp04dk8lUqjWXin0f7fR6faVKldq0\naTNp0qSbN2+6btMAAKD883B3AU6mKMq333577dq1atWqFZy7ZMkSRVHK8LKN119/vV+/fo8+\n+mgxfd5444033nijtGsuAz8/v379+mlfm83mq1evHjp06NChQ0uXLj106FCVKlXuQg0AAKAc\nkueInSY8PNxisSxfvrzgrFu3bm3YsOGBBx4o7TrPnz9/9epVZ1TnHNWrV//P31avXr1v374L\nFy40btw4MTFx/vz57q4OAAC4jWzBrmXLllWrVl28eHHBWf/5z39yc3MjIiLytauqunDhwvbt\n25tMJqPR2KRJk7fffjszM1ObO3DgwNDQUCHEv/71L0VROnXqJISYOHGioijr16+fO3durVq1\nAgMDRWHX2Nlstrlz57Zu3drPz89kMvXo0WP37t2Om161alX37t2DgoK8vLxq1qzZp0+fzZs3\nl2Gva9So8dRTTwkhEhMT7Y2FFnnb/dWkpaVNmDChSZMmRqPRYDA0bNgwLi4uLS2tmBpu3rzZ\nqFEjvV7/9ddfay0XLlyIjo6uUqWKj4/PQw89tGjRooJLmc3mjz/+uHXr1iaTydvbu0GDBi++\n+OLly5e1ubVq1TIajXl5efb+hw4d0s5BX7p0yd54/fp1nU7XunVrIcTbb7+t7fUvv/wSFRVV\nrVo1b2/vhx56KCEhwXG7zvrkAQAoV2QLdqqqPv744z///PPhw4fzzfryyy+rV6/evn37fO1D\nhw4dPXr0hQsXYmJiXnnllcDAwHfffbdTp07p6elCiGeffXb48OFCiHbt2s2aNWvs2LFCCC8v\nLyHErl274uLiunbtOmjQoEKLGTx48AsvvJCVlTVs2LDIyMiDBw927dp12bJl2twFCxY88cQT\nP//886BBg8aPH9+nT5+DBw/269fP3qFU/vzzTyGE4/HIooosfn+FEGazuX///u+//76vr++L\nL774/PPP6/X6+Pj4nj17Wq3WQreem5sbGRl59uzZOXPmPPHEE0KIW7dude7cecWKFQ888MCr\nr77arl27iRMnfvLJJ45L2Wy2yMjIcePGZWRkjBw58vXXX7///vvnzJnTqlWrCxcuCCEiIiJy\ncnIOHjxoX2THjh32/bI37ty5U1XV3r172/f6p59+6tixY1ZW1tNPP92zZ8/jx48PGTJk+/bt\nrvjkAQAoR1RZ/PTTT0KIYcOGaTlgzJgxjnNPnz4thHjllVe040kTJ07U2lesWCGEaNmyZVpa\nmtZis9lefPFFIcT48eO1Fm2RkSNH2tf23nvvCSECAgK+++47e6N2gd28efO0Se0QUZ8+fSwW\ni9Zy5swZHx8fX1/f9PR0VVWbNWsmhDh37px9DUlJSSaTqV27dsXvY2hoqL3FarVevHjxvffe\n0+v1TZs2zcjIKL7Ikuzv6tWrhRDt2rWzV56bm9u4cWMhxPr167WWiRMnCiE+/fRTbQ1aapwy\nZYp9Q++8844QYvDgwfaWK1euBAcHCyG6du2qtWgnjtu3b5+Tk2Pvpt3XMmjQIFVVtVPq06dP\nt8/t3bt3+/bt69Sp89xzz9kbx4wZI4TYvXu3qqozZswQQnh5eS1btsze4bXXXtPGhjZZhk8e\nAIAKQbYjdkKI1q1bN2vWLCEhITc31964ZMkSIcSIESPydV6wYIEQYsaMGfa7WRVFmTZtmqen\np7ZIoRRFEUI0adKkV69eRfXRTge/+eaber1ea2nUqNH06dNjY2OvXbsmhEhJSVEUxdfX175I\nSEhIcnLy/v37i9/B33//3fGu2JCQkHfeeWfcuHH79+93XFuhRZZkf1u0aPHNN998+umn9sq9\nvLwiIyOFECdOnChYz+uvv75y5coXX3xRC3OadevWCSHGjRtnbwkODn7++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HmBjvde5Atbjmw2m72D\nFux2797dqlWr7du3P/DAA1WqVAkKCvL399eC3Y4dO4QQxZwTL8iJnzwAAOWKnMFOCDFy5MiV\nK1cuW7bspZdeWrNmzWOPPVbwyJC3t3dAQEBqauoLL7xQzOG3MjAajSaTKT09/caNG8U/MbhG\njRoxMTExMTE5OTlffvnlSy+9FBMTExkZ6XjZWQlpZ3jPnDlTVIcS7u/UqVOFEBs3buzSpYu9\nsdDrz/r3779q1arZs2ePHz/+6aef3r59u5Zo/fz89Hp9bm5udna240E7x8cB+vn5+fj4ZGVl\npaSk2B/Forl+/br4+7hdly5dvL29d+/e/cILL+zfv3/UqFFCCJ1O16FDB+0yu507dzZs2FDb\n91Jx4icPAEA5Iec1dkKInj173nfffWvXrtUuwy9424RGu+or3+PlhBB3/nou7Rq1rVu3OjbO\nmDGjZ8+eP/zwgxDiwoULV65csc/y9vaOjY3t0KFDSkrK+fPny7BF7eYA7Xqyotx2f3Nzcy9d\nuuTn5+eY6lRV/e9//1twbb179zYYDHFxcd27d9+1a9f06dO1dr1e37BhQ1HgZou9e/c6Tmof\nkXYxo
- "text/plain": [
- "plot without title"
- ]
- },
- "metadata": {
- "image/png": {
- "height": 420,
- "width": 420
- },
- "text/plain": {
- "height": 420,
- "width": 420
- }
- },
- "output_type": "display_data"
- }
- ],
- "source": [
- "data %>% \n",
- " group_by(date) %>%\n",
- " gather(key,value, stress, fatigue, productivity) %>%\n",
- " ggplot(mapping=aes(x = date)) + \n",
- " ggtitle(\"Metrics Breakdowns\") +\n",
- " geom_boxplot(mapping=aes(y = value, colour = key)) +\n",
- " labs(y=\"Metric\") +\n",
- " scale_colour_discrete(name=\"Metrics\",\n",
- " breaks=c(\"stress\", \"fatigue\", \"productivity\"),\n",
- " labels=c(\"Stress\", \"Fatigue\", \"Productivity\")) + \n",
- " theme_bw() +\n",
- " theme(axis.title.x=element_blank(),\n",
- " axis.text.x=element_blank(),\n",
- " axis.ticks.x=element_blank())\n",
- "ggsave(file=\"metricsBoxPlots.png\", width=6, height=4, dpi=300)"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 11,
- "metadata": {},
- "outputs": [
- {
- "name": "stderr",
- "output_type": "stream",
- "text": [
- "Loading required package: PerformanceAnalytics\n",
- "\n",
- "Loading required package: xts\n",
- "\n",
- "Loading required package: zoo\n",
- "\n",
- "\n",
- "Attaching package: ‘zoo’\n",
- "\n",
- "\n",
- "The following objects are masked from ‘package:base’:\n",
- "\n",
- " as.Date, as.Date.numeric\n",
- "\n",
- "\n",
- "\n",
- "Attaching package: ‘xts’\n",
- "\n",
- "\n",
- "The following objects are masked from ‘package:dplyr’:\n",
- "\n",
- " first, last\n",
- "\n",
- "\n",
- "\n",
- "Attaching package: ‘PerformanceAnalytics’\n",
- "\n",
- "\n",
- "The following object is masked from ‘package:graphics’:\n",
- "\n",
- " legend\n",
- "\n",
- "\n",
- "Loading required package: quantmod\n",
- "\n",
- "Loading required package: TTR\n",
- "\n",
- "Registered S3 method overwritten by 'quantmod':\n",
- " method from\n",
- " as.zoo.data.frame zoo \n",
- "\n",
- "Version 0.4-0 included new data defaults. See ?getSymbols.\n",
- "\n",
- "\u001b[30m══\u001b[39m \u001b[30mNeed to Learn tidyquant?\u001b[39m \u001b[30m════════════════════════════════════════════════════\u001b[39m\u001b[34m\n",
- "Business Science offers a 1-hour course - Learning Lab #9: Performance Analysis & Portfolio Optimization with tidyquant!\n",
- "\u001b[39m\u001b[34m</> Learn more at: https://university.business-science.io/p/learning-labs-pro </>\u001b[39m\n",
- "\n",
- "Loading required package: lattice\n",
- "\n",
- "Loading required package: grid\n",
- "\n",
- "Loading required package: chron\n",
- "\n",
- "NOTE: The default cutoff when expanding a 2-digit year\n",
- "to a 4-digit year will change from 30 to 69 by Aug 2020\n",
- "(as for Date and POSIXct in base R.)\n",
- "\n",
- "\n",
- "Attaching package: ‘chron’\n",
- "\n",
- "\n",
- "The following objects are masked from ‘package:lubridate’:\n",
- "\n",
- " days, hours, minutes, seconds, years\n",
-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b17z22mttP85TsnPnzmuvvXbPnj0Oh6OpqSk3N9fr9bZYecLTN5lMZrM5Ojq6b9++N998\n84cffuh2u9t48Kfk3DrYAAPg3ADOPXv27LnuuuuOHDnSfGF5efmWLVu2bNmyePHil19+edas\nWe01PASitLS0Z8+eXq83Ozu7T58+gX/jmjVr5s6de8LCtWvXturozro33nhDfRAZGfnkk092\n6dIlODg4wO9VFKWmpqampubnn39+++23k5KS3nzzzXHjxp3qGAYNGrR06VIhBCeJASPh5xnn\nmD179lx00UWNjY3qf0NCQvr372+z2Q4fPlxZWSmEqK2tnT17ts1mmzlzZruOFDIffvih3jkq\nua+++qqhoSE8PFxb4nQ6v/zyy9YbWlsoLCxUH1x//fX33XdfgN91+eWX22w2n89XVVW1b9++\nhoYGdVUTJkz46KOPpk2bdkpjyMjICHzTAM4VfBSLc4nX6501a5aa6kwm05NPPllRUbF79+7v\nv/++oqJizZo1PXv2VCvvv/9+p9PZroOFzAcffHCq35KQkCCEcDgcX3zxRfPlmzZtqq+vF0Jo\nr37H53K51AedOnUK/LveeeedNWvWrF27dtu2bZWVlcuWLQsNDRVC+Hy+2bNnFxUVnZWxAjin\nEOxwLlmzZs3BgwfVx4sWLVqwYEHzMzdTp07dvHmz+lZns9n27NmjLlcU5f333588eXJcXJzN\nZouIiBg+fPiyZcsCPGN08ODBO++8MzMzMyQkJCIiYtiwYS+++KLH49EKXn/9dfUioYsvvlgI\nsXXr1okTJ0ZHR3fq1Omiiy766quvTl7nm2++OXTo0PDw8JiYmClTpuzevdtkMrW49UAGrw1g\nzJgxH
- "text/plain": [
- "plot without title"
- ]
- },
- "metadata": {
- "image/png": {
- "height": 420,
- "width": 420
- },
- "text/plain": {
- "height": 420,
- "width": 420
- }
- },
- "output_type": "display_data"
- }
- ],
- "source": [
- "# install tidyquant \n",
- "\n",
- "#install.packages('tidyquant', repos = \"http://cran.us.r-project.org\")\n",
- "#library(tidyquant)\n",
- "\n",
- "\n",
- "library(tidyquant) \n",
- "source(\"https://raw.githubusercontent.com/iascchen/VisHealth/master/R/calendarHeat.R\")\n",
- "\n",
- "\n",
- "r2g <- c(\"#D61818\", \"#FFAE63\", \"#FFFFBD\", \"#B5E384\") \n",
- "calendarHeat(data$date, data$total_hours, ncolors = 99, color = \"g2r\", varname=\"Daily Hours\")\n",
- "ggsave(file=\"calendarHeatMap.png\", width=8, height=4, dpi=300)"
- ]
- }
- ],
- "metadata": {
- "kernelspec": {
- "display_name": "R",
- "language": "R",
- "name": "ir"
- },
- "language_info": {
- "codemirror_mode": "r",
- "file_extension": ".r",
- "mimetype": "text/x-r-source",
- "name": "R",
- "pygments_lexer": "r",
- "version": "3.6.2"
- }
- },
- "nbformat": 4,
- "nbformat_minor": 4
- }
|