library(tidyverse)
library(lubridate)
library(googlesheets4)
theme_set(theme_bw())
gs4_deauth()
weight_data <- read_sheet("https://docs.google.com/spreadsheets/d/1zCgp7nbmJswdgbH8z8owSXgA2y86XR4j1mOQyfAHcew/edit?usp=sharing") %>%
rename(Date = Timestamp,
Pounds = `How much do you weigh in pounds?`) %>%
mutate(Date = as_date(Date))
outliers <- weight_data %>%
filter(!is.na(Label))
weight_data %>%
ggplot(aes(x = Date, y = Pounds)) +
geom_line() +
geom_point() +
geom_point(data = outliers, aes(x = Date, y = Pounds), color = "Red") +
geom_text(data = outliers, aes(x = Date, y = Pounds, label = Label), nudge_y = 3.5, nudge_x = 15) +
geom_hline(yintercept = 200) +
geom_label(aes(x = mdy("5/1/20"), y = 200, label = "Goal Weight"), label.size = NA) +
geom_hline(yintercept = 184) +
geom_label(aes(x = mdy("5/1/20"), y = 184, label = "\"Normal\" BMI"), label.size = NA) +
ggtitle("Jameson's Weight") +
theme(legend.position = "none", legend.title = element_blank())
