Covid Health Metrics

Although I was able to avoid contracting COVID for over 2 years, I eventually tested positive on 5/23/2022. Thankfully, my symptoms seemed relatively mild. Laid out below are some of the changes I saw across my health metrics (data obtained utilizing FitBit Versa 3).

library(data.table)
library(plotly)


br <- c(15, 14, 17, 17, 14,12, 15, 15)
hrv <- c(20,18,11,16,20,23,19,18)
skin_temp <- c(1.6,0,4.1, 5.7, -.3, -.6, 0, 1.3)
o2 <- c(96, 98, 95, 96, 97, 94, 97, 97)
rhr <- c(59, 60, 62, 65, 62, 60, 59, 58)
dates <- c("2022-05-22", "2022-05-23","2022-05-24","2022-05-25",
           "2022-05-26", "2022-05-27","2022-05-28","2022-05-29")

data <- data.table(dates, br, hrv, skin_temp, o2, rhr)

br_plot <- plot_ly(data, x=dates, y=br)
hrv_plot <- plot_ly(data, x=dates, y=hrv)
rhr_plot <- plot_ly(data, x=dates, y=rhr)
o2_plot <- plot_ly(data, x=dates, y=o2)
skin_temp_plot <- plot_ly(data, x=dates, y=skin_temp)

fig <-subplot(skin_temp_plot, hrv_plot, nrows = 1) %>%
  layout(plot_bgcolor='#e5ecf6', 
         xaxis = list( 
           zerolinecolor = '#ffff', 
           zerolinewidth = 2, 
           gridcolor = 'ffff'), 
         yaxis = list( 
           zerolinecolor = '#ffff', 
           zerolinewidth = 2, 
           gridcolor = 'ffff'))

annotations = list(
  list( 
    x = 0.2,  
    y = 1.0,  
    text = "Skin Temp",  
    xref = "paper",  
    yref = "paper",  
    xanchor = "center",  
    yanchor = "bottom",  
    showarrow = FALSE 
  ),  
  list( 
    x = 0.8,  
    y = 1,  
    text = "HRV",  
    xref = "paper",  
    yref = "paper",  
    xanchor = "center",  
    yanchor = "bottom",  
    showarrow = FALSE 
  ))

fig2 <-subplot(rhr_plot, o2_plot, nrows = 1) %>%
  layout(plot_bgcolor='#e5ecf6', 
         xaxis = list( 
           zerolinecolor = '#ffff', 
           zerolinewidth = 2, 
           gridcolor = 'ffff'), 
         yaxis = list( 
           zerolinecolor = '#ffff', 
           zerolinewidth = 2, 
           gridcolor = 'ffff'))

annotations2 = list( 
  list( 
    x = 0.2,  
    y = 1.0,  
    text = "RHR",  
    xref = "paper",  
    yref = "paper",  
    xanchor = "center",  
    yanchor = "bottom",  
    showarrow = FALSE 
  ),  
  list( 
    x = 0.8,  
    y = 1,  
    text = "O2",  
    xref = "paper",  
    yref = "paper",  
    xanchor = "center",  
    yanchor = "bottom",  
    showarrow = FALSE 
  ))


fig <- fig %>%layout(annotations = annotations)
fig2 <- fig2 %>%layout(annotations = annotations2)

htmlwidgets::saveWidget(fig, file = "fig1.html", selfcontained = TRUE)
htmlwidgets::saveWidget(fig2, file = "fig2.html", selfcontained = TRUE)