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.
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()
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
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.