Learn R Programming

Covid19 Wastewater Analysis Package

This is an R package of utilities to perform wastewater data analysis for pathogenic surveillance and monitoring.

This project is a collaboration between the University of Wisconsin-Madison Data Science Institute (DSI), the Wisconsin Department of Health Services (DHS), and the State Lab of Hygiene (SLH).

Getting started

View our getting started guide to learn more about this R package, or follow the steps below to install, view examples, and get help inside your favorite R interpreter.

Installation

Install from CRAN using this command

install.packages("Covid19Wastewater")

Otherwise, we have comprehensive instructions here.

After installation, view our vignettes

vignette(package = "Covid19Wastewater")

or get help.

help(package = "Covid19Wastewater")

Examples

We've included a set of instructional examples to make this package easy to learn and understand.

Documentation

vignette(package = "Covid19Wastewater")
  • Look at all package functionality with:
help(package = "Covid19Wastewater")

Package Application

We applied this package to Covid-19 data from Wisconsin in our analysis repository here.

License

Distributed under the MIT License. See the license for more information.

Team

Email:

Repos:

Copy Link

Version

Install

install.packages('Covid19Wastewater')

Monthly Downloads

9

Version

1.0.1

License

MIT + file LICENSE

Issues

Pull Requests

Stars

Forks

Maintainer

Marlin Lee

Last Published

August 24th, 2023

Functions in Covid19Wastewater (1.0.1)

InterceptorCase_data

Madison interceptor case data
OOB_MSE_num_trees

get OOB MSE vs number of forest in trees
HFGWaste_data

High frequency Waste data
DF_date_vector

DF_date_vector
OffsetHeatmap

Outputs a heatmap of the offset for variant / time windows and population size / region
Case_data

Case data
createCaseFlag

Create Case flags
Example_data

Example data
Covariants_data

Covariants data
bagging

Bootstrap aggregating of dataset gen a list of dataframes using row resampling and column downsizing
Flag_From_Trend

Flag values as outliers based on error from estimated trend This function can be done within group if the data fed into it was grouped
createWasteFlags

Create waste flags
flagOutliers

Create column with Boolean based on a threshold
buildCaseAnalysisDF

Prep case data into right format
VariantPlot

Shows each variant in proportion to the others in 2 week time periods
diffLookup

lookup
Pop_data

Sewer shed population data
regressionInnerLoop

regressionInnerLoop
WasteWater_data

Wastewater data set
gen_INCMSE

get increased mean square error for each column
random_linear_forest-class

random_linear_forest model class using a random forest of linear forest models
computeRankQuantiles

computeRankQuantiles
classifyRegressionAnalysis

classifyRegressionAnalysis
classifyCaseRegression

Create Case Flags based on regression slope
computeJumps

compute first difference Jumps for N1 and N2
countFlags

Create counts of flag data
random_linear_forest

Fitting linear random forest
Covid19Wastewater

Covid19Wastewater: A package for running Covid19 wastewater concentration analysis
heatmapcorfunc

Outputs a heatmap where the color is the r squared of wastewater data and center day + x many future days and y many past days Helps inform Offset Analysis
classifyQuantileFlagRegression

Classify FlagRegression with rolling Quantile info
rankJumps

rankJumps
date_distance_remove

remove distances above threshold
buildWasteAnalysisDF

Convert wastewater_data data to workset4 shape
buildRegressionEstimateTable

Run DHS analysis at a top level
date_distance_calc

date_distance_calc
makeQuantileColumns

Add many combo of rolling quantile columns to dataframe have info for each quant window combo
predict,random_linear_forest-method

predict new data from random_linear_forest models
date_distance_clamp

remove distances above threshold
Data_Description

Data Description This package contains a lot of data with many column names, here is a list of them all: [https://github.com/UW-Madison-DSI/Covid19Wastewater/blob/main/docs/data/data_columns_discription.md](https://github.com/UW-Madison-DSI/Covid19Wastewater/blob/main/docs/data/data_columns_discription.md)
OffsetDFMaker

Returns a dataframe with the multiple ways to analyze how offset the Wastewater is from cases data
gen_OOB_pred

get OOB predictions of the training dataset returns the predictions of each row of the input data using only trees not trained on the row
summary,random_linear_forest-method

summary method for linear forest class
expSmoothMod

expSmoothMod Add a column of the smoothed values using exponential smoothing
OffsetDF_Plot

Given output from OffsetDFMaker returns a 2x3 grid of all the plots with highlighted values
removeOutliers

Add column with NA values where the data was flagged
factorVecByVec

Get ordering for ploting based on factoring vector
expand_formula

Expand formula for increased info takes a formula with shape A ~ B | C and convert . to its real representation
loessSmoothMod

loessSmoothMod Add a column of the smoothed values using Loess
show,random_linear_forest-method

display form for random_linear_forest class
factorVecByNumPoints

convert column to factor based on amount of entries
nGuess

nGuess for sgolaySmoothMod number of points per polynomial
parameterGuess

Get a fitting parameter for the model
uniqueVal

Find all unique values in the column selected
windowingQuantFunc

create rolling quantile column based on date
runRegressionAnalysis

runRegressionAnalysis
sgolaySmoothMod

sgolaySmoothMod Add a column of the smoothed values using sgolayfilt
HFGCase_data

High frequency case data
Aux_info_data

Auxiliary data