Calculated Info

knitr::opts_chunk$set(Warning = FALSE, message = FALSE, echo = FALSE)

This package contains a couple tools to create useful views of the data not by default in the dataframe. These mostly come in the form of the default case and wastewater dataframe augment function.

Wastewater augmeanting function

The wastewater function does three things. first it replaces Concentrations below the level of detection (LOD) with LOD / 2 which is considered best practice. Second it calculates a geometric average of the two gene concentrations. Finally it gets a flow and population normalized loged version of the data which previous work has shown the best results.

library(Covid19Wastewater)
library(dplyr)
data(WasteWater_data, package = "Covid19Wastewater")
data(Pop_data, package = "Covid19Wastewater")

WasteWater_data%>%
  left_join(Pop_data)%>%
  buildWasteAnalysisDF()%>%
  head()%>%
  knitr::kable()

Case augmeanting function

The case function does two things. first it normalizes the data by population. Second it calculates a rolling sum and average of the data. This needs the population data contained in its own data frame.

data(Case_data, package = "Covid19Wastewater")
data("Pop_data", package = "Covid19Wastewater")#need to fix Pop_data

case_df <- left_join(Case_data, Pop_data)%>%
  rename(population_served = pop)%>%
  buildCaseAnalysisDF()%>%
  head()#



case_df%>%
  select(site:regions)%>%
  knitr::kable()

case_df%>%
  select(county:FirstConfirmed.Per100K)%>%
  knitr::kable()

case_df%>%
  select(pastwk.sum.casesperday.Per100K:pastwk.avg.casesperday.Per100K)%>%
  knitr::kable()

These functions are slightly out of date and not used in many new analysis projects

#TODO work on comparing the output of these methods 


Try the Covid19Wastewater package in your browser

Any scripts or data that you put into this service are public.

Covid19Wastewater documentation built on Aug. 25, 2023, 1:07 a.m.